Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develope #1212

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions mmf/configs/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ env:

# Config path for dataset zoo, can be overridden via environment
# variable MMF_DATASET_ZOO as well.
dataset_zoo: ${env:MMF_DATASET_ZOO,configs/zoo/datasets.yaml}
model_zoo: ${env:MMF_MODEL_ZOO, configs/zoo/models.yaml}
dataset_zoo: ${oc.env:MMF_DATASET_ZOO,configs/zoo/datasets.yaml}
model_zoo: ${oc.env:MMF_MODEL_ZOO, configs/zoo/models.yaml}

# Similar to cache dir, but can be used if specifically want to override
# where MMF stores your data. Default would be cache_dir/data.
Expand All @@ -294,32 +294,32 @@ env:

# Directory for saving checkpoints and other metadata
# Use MMF_SAVE_DIR or env.save_dir to override
save_dir: ${env:MMF_SAVE_DIR, ./save}
save_dir: ${oc.env:MMF_SAVE_DIR, ./save}

# Directory for saving logs, default is "logs" inside the save folder
# If log_dir is specifically passed, logs will be written inside that folder
# Use MMF_LOG_DIR or env.log_dir to override
log_dir: ${env:MMF_LOG_DIR,}
log_dir: ${oc.env:MMF_LOG_DIR,""}

# Directory for saving reports, if not passed a opts based folder will be generated
# inside save_dir/reports and reports will be saved there
# Use MMF_REPORT_DIR or env.report_dir to override
report_dir: ${env:MMF_REPORT_DIR,}
report_dir: ${oc.env:MMF_REPORT_DIR,""}

# Log directory for tensorboard, default points to same as logs
# Only used when training.tensorboard is enabled.
# Use MMF_TENSORBOARD_LOGDIR or env.tensorboard_logdir to override
tensorboard_logdir: ${env:MMF_TENSORBOARD_LOGDIR,}
tensorboard_logdir: ${oc.env:MMF_TENSORBOARD_LOGDIR,""}

# Log directory for Weights and Biases, default points to same as logs
# Only used when training.wandb is enabled.
# Use MMF_WANDB_LOGDIR or env.wandb_logdir to override
wandb_logdir: ${env:MMF_WANDB_LOGDIR,}
wandb_logdir: ${oc.env:MMF_WANDB_LOGDIR,""}

# User directory where user can keep their own models independent of MMF
# This allows users to create projects which only include MMF as dependency
# Use MMF_USER_DIR or env.user_dir to specify
user_dir: ${env:MMF_USER_DIR,}
user_dir: ${oc.env:MMF_USER_DIR,""}

###
# Configuration for the distributed setup
Expand Down
2 changes: 1 addition & 1 deletion mmf/datasets/builders/hateful_memes/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def build(self, config, *args, **kwargs):
"datasets",
self.dataset_name,
"defaults",
"annotations",
"images",
"train.jsonl",
)
)
Expand Down
10 changes: 5 additions & 5 deletions mmf_cli/hm_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def __init__(self):
self.configuration = Configuration()

def assert_files(self, folder):
files_needed = self.JSONL_PHASE_ONE_FILES
phase_one = True
files_needed = self.JSONL_PHASE_TWO_FILES
phase_one = False
for file in files_needed:
try:
assert PathManager.exists(
os.path.join(folder, "data", file)
os.path.join(folder, file)
), f"{file} doesn't exist in {folder}"
except AssertionError:
phase_one = False
Expand All @@ -49,7 +49,7 @@ def assert_files(self, folder):
files_needed = self.JSONL_PHASE_TWO_FILES
for file in files_needed:
assert PathManager.exists(
os.path.join(folder, "data", file)
os.path.join(folder, file)
), f"{file} doesn't exist in {folder}"
else:
warnings.warn(
Expand All @@ -62,7 +62,7 @@ def assert_files(self, folder):
exists = False

for file in files_needed:
exists = exists or PathManager.exists(os.path.join(folder, "data", file))
exists = exists or PathManager.exists(os.path.join(folder, file))

if not exists:
raise AssertionError("Neither img or img.tar.gz exists in current zip")
Expand Down