Skip to content

Commit

Permalink
Comment/delete unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
acerioni authored and cleherny committed Sep 11, 2023
1 parent cf98eab commit d762e87
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions scripts/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ def main(cfg_file_path):
else:
MODEL_ZOO_CHECKPOINT_URL = None

if 'pth_file' in cfg['model_weights'].keys():
MODEL_PTH_FILE = cfg['model_weights']['pth_file']
else:
MODEL_PTH_FILE = None
# TODO: allow resuming from previous training
# if 'pth_file' in cfg['model_weights'].keys():
# MODEL_PTH_FILE = cfg['model_weights']['pth_file']
# else:
# MODEL_PTH_FILE = None

if MODEL_ZOO_CHECKPOINT_URL == None:
logger.critical("A model zoo checkpoint URL (\"model_zoo_checkpoint_url\") must be provided")
Expand All @@ -72,9 +73,9 @@ def main(cfg_file_path):

os.chdir(WORKING_DIR)
# let's make the output directories in case they don't exist
for DIR in [SAMPLE_TAGGED_IMG_SUBDIR, LOG_SUBDIR]:
if not os.path.exists(DIR):
os.makedirs(DIR)
for dir in [SAMPLE_TAGGED_IMG_SUBDIR, LOG_SUBDIR]:
if not os.path.exists(dir):
os.makedirs(dir)



Expand All @@ -88,10 +89,6 @@ def main(cfg_file_path):

registered_datasets = ['trn_dataset', 'val_dataset', 'tst_dataset']


registered_datasets_prefixes = [x.split('_')[0] for x in registered_datasets]


for dataset in registered_datasets:

for d in DatasetCatalog.get(dataset)[0:min(len(DatasetCatalog.get(dataset)), 4)]:
Expand Down

0 comments on commit d762e87

Please sign in to comment.