Skip to content

Commit

Permalink
fix(nyz): fix config conflict with data generation
Browse files Browse the repository at this point in the history
  • Loading branch information
PaParaZz1 committed Nov 23, 2022
1 parent 5d61990 commit db3290a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ding/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,12 @@ def compile_config(
default_config['reward_model'] = reward_model_config
if len(world_model_config) > 0:
default_config['world_model'] = world_model_config
stop_value_flag = 'stop_value' in cfg.env
cfg = deep_merge_dicts(default_config, cfg)
cfg.seed = seed
# check important key in config
if evaluator in [InteractionSerialEvaluator, BattleInteractionSerialEvaluator]: # env interaction evaluation
if 'stop_value' in cfg.env: # data generation task doesn't need these fields
if stop_value_flag: # data generation task doesn't need these fields
cfg.policy.eval.evaluator.n_episode = cfg.env.n_evaluator_episode
cfg.policy.eval.evaluator.stop_value = cfg.env.stop_value
if 'exp_name' not in cfg:
Expand Down

0 comments on commit db3290a

Please sign in to comment.