-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement webdataset input format and related improvements
* webdataset input format * save in batch * test files in tests folder * save metadata as parquet * use autofaiss in a new clip index * remove indexing from clip batch and rename to clip inference
- Loading branch information
Showing
17 changed files
with
658 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Continuous integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install, lint and unit tests | ||
run: | | ||
python3 -m venv .env | ||
source .env/bin/activate | ||
pip install --upgrade pip | ||
pip install -e . | ||
pip install -r requirements-test.txt | ||
python -m pytest -v tests -s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,7 @@ myimglist.txt | |
output_folder | ||
indice_folder | ||
image_folder | ||
cat | ||
cat | ||
embedding_folder | ||
index_folder | ||
indices_paths.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
from clip_retrieval.clip_back import clip_back | ||
from clip_retrieval.clip_batch import clip_batch | ||
from clip_retrieval.clip_inference import clip_inference | ||
from clip_retrieval.clip_filter import clip_filter | ||
from clip_retrieval.clip_index import clip_index | ||
import fire | ||
import logging | ||
|
||
|
||
def main(): | ||
"""Main entry point""" | ||
fire.Fire( | ||
{ | ||
"back": clip_back, | ||
"batch": clip_batch, | ||
"inference": clip_inference, | ||
"index": clip_index, | ||
"filter": clip_filter | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.