deepmodeling / dpgen2

2nd generation of the Deep Potential GENerator
https://docs.deepmodeling.com/projects/dpgen2/
GNU Lesser General Public License v3.0
32 stars 24 forks source link

how to set group_size in run_train_config? #191

Closed scott-5 closed 6 months ago

scott-5 commented 6 months ago

As described in the doc, the step_configs/run_train_config/template_slice_config can be set, but it occur like that:

Traceback (most recent call last):
  File "/home/user/miniconda3/envs/dp/bin/dpgen2", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/user/miniconda3/envs/dp/lib/python3.11/site-packages/dpgen2/entrypoint/main.py", line 329, in main
    submit_concurrent_learning(
  File "/home/user/miniconda3/envs/dp/lib/python3.11/site-packages/dpgen2/entrypoint/submit.py", line 621, in submit_concurrent_learning
    dpgen_step, finetune_step = workflow_concurrent_learning(
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/envs/dp/lib/python3.11/site-packages/dpgen2/entrypoint/submit.py", line 399, in workflow_concurrent_learning
    concurrent_learning_op = make_concurrent_learning_op(
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/envs/dp/lib/python3.11/site-packages/dpgen2/entrypoint/submit.py", line 142, in make_concurrent_learning_op
    prep_run_train_op = PrepRunDPTrain(
                        ^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/envs/dp/lib/python3.11/site-packages/dpgen2/superop/prep_run_dp_train.py", line 187, in __init__
    self = _prep_run_dp_train(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/envs/dp/lib/python3.11/site-packages/dpgen2/superop/prep_run_dp_train.py", line 240, in _prep_run_dp_train
    prep_train = Step(
                 ^^^^^
TypeError: Step.__init__() got an unexpected keyword argument 'template_slice_config'
zjgemi commented 6 months ago

The issue of run_train_config missing template_slice_config has indeed been resolved in the PR. Also, please note that the exception you mentioned is raised at instantiation of the prep_train step. Make sure that the template_slice_config is passed to the run_train_config, rather than prep_train_config. The prep_train step is a non-sliced step and not supposed to receive template_slice_config.

scott-5 commented 6 months ago

Okey. Thank you so much.