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

[BUG] input v0 converting to input v2 bug #919

Closed
yhliu918 opened this issue Aug 4, 2021 · 6 comments
Closed

[BUG] input v0 converting to input v2 bug #919

yhliu918 opened this issue Aug 4, 2021 · 6 comments
Labels

Comments

@yhliu918
Copy link
Contributor

yhliu918 commented Aug 4, 2021

attribute error when converting input versions
When I run input.json v0 under environment deepmd-kit v2.0.0.b3, it would first convert it into input_v2_compat.json. However, it still have key error like decay_rate/ n_neuron is not allowed in strict mode.
I attached my input file below:

{
    "model": {
        "descriptor": {
            "type": "se_a",
            "sel": [
                500
            ],
            "rcut_smth": 2.0,
            "rcut": 9.0,
            "neuron": [
                25,
                50,
                100
            ],
            "resnet_dt": false,
            "axis_neuron": 12,
            "seed": 1084011120
        },
        "fitting_net": {
            "n_neuron": [
                240,
                240,
                240
            ],
            "resnet_dt": true,
            "coord_norm": true,
            "type_fitting_net": false,
            "seed": 3151311092
        },
        "type_map": [
            "Re"
        ]
    },
    "learning_rate": {
        "type": "exp",
        "start_lr": 0.0001,
        "decay_steps": 25000,
        "decay_rate": 0.95
    },
    "loss": {
        "start_pref_e": 100,
        "limit_pref_e": 100,
        "start_pref_f": 1,
        "limit_pref_f": 1,
        "start_pref_v": 2.0,
        "limit_pref_v": 2.0
    },
    "training": {
        "systems": ['systems'],
        "set_prefix": "set",
        "stop_batch": 5000000,
        "batch_size": "auto",
        "seed": 813129136,
        "_comment": "that's all",
        "disp_file": "lcurve.out",
        "disp_freq": 2000,
        "numb_test": 2,
        "save_freq": 2000,
        "save_ckpt": "model.ckpt",
        "load_ckpt": "model.ckpt",
        "disp_training": true,
        "time_training": true,
        "profiling": false,
        "profiling_file": "timeline.json"
    }
}

The error log is like
image

@yhliu918 yhliu918 added the bug label Aug 4, 2021
@njzjz
Copy link
Member

njzjz commented Aug 4, 2021

load_ckpt is also deprecated. See #907.

@yhliu918
Copy link
Contributor Author

yhliu918 commented Aug 4, 2021

yeah, but n_neuron is not automatically converted into neuron? in other words, when I'm using v0 input, I should change the input file first by myself?

@amcadmus
Copy link
Member

amcadmus commented Aug 4, 2021

yeah, but n_neuron is not automatically converted into neuron? in other words, when I'm using v0 input, I should change the input file first by myself?

The format of your input is of v1.

What is the version of your dargs? Have you updated it to the latest release 0.2.6?

@yhliu918
Copy link
Contributor Author

yhliu918 commented Aug 5, 2021

it's the latest version 0.2.6

@njzjz
Copy link
Member

njzjz commented Aug 9, 2021

  • n_neuron was fixed in add aliases to Arguments #932 and add aliases to Arguments #933, but it does not work from v1.3.0 to v1.3.3
  • decay_rate and load_ckpt should be processed in compat.py. I think load_ckpt has already deprecated in v1, but we never remove it in examples and documents?
  • coord_norm and type_fitting_net are keys in v0 that are deprecated in v1? But we never processed it in compat.py

@amcadmus
Copy link
Member

amcadmus commented Aug 9, 2021

* `n_neuron` was fixed in [add aliases to Arguments #932](https://github.com/deepmodeling/deepmd-kit/pull/932) and [add aliases to Arguments #933](https://github.com/deepmodeling/deepmd-kit/pull/933), but it does not work from v1.3.0 to v1.3.3

* `decay_rate` and `load_ckpt` should be processed in `compat.py`. I think `load_ckpt` has already deprecated in v1, but we never remove it in examples and documents?

* `coord_norm` and `type_fitting_net` are keys in v0 that are deprecated in v1? But we never processed it in `compat.py`

I will rm load_ckpt from examples.

coord_norm and type_fitting_net are deprecated keys

njzjz added a commit to njzjz/deepmd-kit that referenced this issue Aug 11, 2021
amcadmus pushed a commit that referenced this issue Aug 12, 2021
* convert `decay_rate` to `stop_lr` from old inputs

close #919.

* fix tests
@njzjz njzjz closed this as completed Aug 12, 2021
gzq942560379 pushed a commit to HPC-AI-Team/deepmd-kit that referenced this issue Sep 2, 2021
* convert `decay_rate` to `stop_lr` from old inputs

close deepmodeling#919.

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants