Skip to content

Commit a3147f0

Browse files
Negiiiinfcogidi
andauthored
Add Zero-shot Classification Evaluation Task (#17)
Co-authored-by: fcogidi <41602287+fcogidi@users.noreply.github.com>
1 parent b291ea0 commit a3147f0

27 files changed

Lines changed: 3463 additions & 652 deletions

.github/workflows/integration_tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,18 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- uses: actions/checkout@v4.2.1
36-
- name: Install poetry
37-
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry
36+
- name: Install and configure Poetry
37+
uses: snok/install-poetry@v1
38+
with:
39+
virtualenvs-create: true
40+
virtualenvs-in-project: true
3841
- uses: actions/setup-python@v5.2.0
3942
with:
4043
python-version: '3.10'
44+
cache: 'poetry'
4145
- name: Install dependencies and check code
4246
run: |
4347
poetry env use '3.10'
44-
source $(poetry env info --path)/bin/activate
48+
source .venv/bin/activate
4549
poetry install --with test
4650
pytest -m integration_test

mmlearn/conf/__init__.py

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -151,27 +151,29 @@ class MMLearnConf:
151151
},
152152
metadata={"help": "Configuration for torch.jit.compile."},
153153
)
154-
hydra: HydraConf = HydraConf(
155-
searchpath=["pkg://mmlearn.conf"],
156-
run=RunDir(
157-
dir=SI("./outputs/${experiment_name}/${now:%Y-%m-%d}/${now:%H-%M-%S}")
158-
),
159-
sweep=SweepDir(
160-
dir=SI("./outputs/${experiment_name}/${now:%Y-%m-%d}/${now:%H-%M-%S}"),
161-
subdir=SI("${hydra.job.num}_${hydra.job.id}"),
162-
),
163-
help=HelpConf(
164-
app_name="mmlearn",
165-
header="mmlearn: A modular framework for research on multimodal representation learning.",
166-
),
167-
job=JobConf(
168-
name=II("experiment_name"),
169-
env_set={
170-
"NCCL_IB_DISABLE": "1", # disable InfiniBand (the Vector cluster does not have it)
171-
"TORCH_NCCL_ASYNC_ERROR_HANDLING": "3",
172-
"HYDRA_FULL_ERROR": "1",
173-
},
174-
),
154+
hydra: HydraConf = field(
155+
default_factory=lambda: HydraConf(
156+
searchpath=["pkg://mmlearn.conf"],
157+
run=RunDir(
158+
dir=SI("./outputs/${experiment_name}/${now:%Y-%m-%d}/${now:%H-%M-%S}")
159+
),
160+
sweep=SweepDir(
161+
dir=SI("./outputs/${experiment_name}/${now:%Y-%m-%d}/${now:%H-%M-%S}"),
162+
subdir=SI("${hydra.job.num}_${hydra.job.id}"),
163+
),
164+
help=HelpConf(
165+
app_name="mmlearn",
166+
header="mmlearn: A modular framework for research on multimodal representation learning.",
167+
),
168+
job=JobConf(
169+
name=II("experiment_name"),
170+
env_set={
171+
"NCCL_IB_DISABLE": "1",
172+
"TORCH_NCCL_ASYNC_ERROR_HANDLING": "3",
173+
"HYDRA_FULL_ERROR": "1",
174+
},
175+
),
176+
)
175177
)
176178

177179

0 commit comments

Comments
 (0)