ACEsuit / mace

MACE - Fast and accurate machine learning interatomic potentials with higher order equivariant message passing.
Other
412 stars 155 forks source link

Training flag not working #429

Open ericyuan00000 opened 1 month ago

ericyuan00000 commented 1 month ago

Describe the bug

When running

python <mace_repo_dir>/mace/cli/run_train.py ... --pin_memory=False

the flag pin_memory remains True.

The code

parser.add_argument(
    "--pin_memory",
    help="Pin memory for data loading",
    default=True,
    type=bool,
)

in arg_parser.py does not seem to be the correct syntax.

bernstei commented 1 month ago

If the default is True, you could use "--no_pin_memory", dest="pin_memory", action="store_false"?

bernstei commented 1 month ago

Also, some additional alternatives including some more modern (py >= 3.9 specific) in https://stackoverflow.com/questions/15008758/parsing-boolean-values-with-argparse