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

[Fix] Fix bug in 1-benchmark_valid.py if checkpoint_root is None. #489

Merged
merged 1 commit into from
Oct 25, 2021
Merged
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
Fix bug in 1-benchmark_valid.py if checkpoint_root is None.
  • Loading branch information
mzr1996 committed Oct 15, 2021
commit 57068c2c391247f4360d4878fd81aa7a15ff0754
3 changes: 2 additions & 1 deletion .dev_scripts/benchmark_regression/1-benchmark_valid.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,13 @@ def main(args):
if args.checkpoint_root is not None:
root = Path(args.checkpoint_root)
checkpoint = root / model_info.Weights[len(http_prefix):]
checkpoint = str(checkpoint)
else:
checkpoint = None

try:
# build the model from a config file and a checkpoint file
result = inference(MMCLS_ROOT / config, str(checkpoint),
result = inference(MMCLS_ROOT / config, checkpoint,
classes_map[dataset], args)
result['valid'] = 'PASS'
except Exception as e:
Expand Down