Skip to content

Commit

Permalink
fix export config
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunting78 committed Oct 14, 2024
1 parent 1326bec commit a5803f5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def export(args, model=None):
if not os.path.exists(save_path):
os.makedirs(save_path)

cfg = Config(args.config)
if os.path.exists(os.path.join(weight_path, 'config.yaml')):
cfg = Config(os.path.join(weight_path, 'config.yaml'))
else:
cfg = Config(args.config)

if cfg.dic.get('info_params', None) is None:
raise ValueError("`info_params` is necessary, but it is None.")
Expand Down

0 comments on commit a5803f5

Please sign in to comment.