Skip to content

Fix config path in V2 de novo generation command in README - #30

Open
haokun-zhao wants to merge 1 commit into
NVIDIA-BioNeMo:mainfrom
haokun-zhao:fix/readme-denovo-v2-config-path
Open

Fix config path in V2 de novo generation command in README#30
haokun-zhao wants to merge 1 commit into
NVIDIA-BioNeMo:mainfrom
haokun-zhao:fix/readme-denovo-v2-config-path

Conversation

@haokun-zhao

Copy link
Copy Markdown

The GenMol V2 De Novo Generation command in the README currently reads:

python scripts/exps/denovo/run.py -c scripts/exps/frag/hparams_v2.yaml

This fails for two independent reasons:

  1. Wrong relative path. denovo/run.py resolves the -c argument relative to the script's own directory:

    config = yaml.safe_load(open(os.path.join(os.path.dirname(os.path.realpath(__file__)), config)))

    So scripts/exps/frag/hparams_v2.yaml expands to scripts/exps/denovo/scripts/exps/frag/hparams_v2.yaml and raises FileNotFoundError.

  2. Wrong config schema. Even when pointed at frag/hparams_v2.yaml by absolute path, that file nests its hyperparameters under per-task keys (linker_design, motif_extension, scaffold_decoration, ...). denovo/run.py reads flat top-level keys (config['softmax_temp'], config['randomness'], config['min_add_len']), so it raises KeyError: 'softmax_temp'.

The intended config is denovo/hparams_v2.yaml, which is flat and already in the repo. Because run.py resolves relative to its own directory, the argument is simply -c hparams_v2.yaml — consistent with the V1 De Novo command earlier in the README.

python scripts/exps/denovo/run.py -c hparams_v2.yaml

I verified the fixed command runs cleanly on GenMol V2 and produces metrics consistent with the de novo benchmark table in the README (validity 1.0, uniqueness ~0.95, diversity ~0.83, quality ~0.86).

The Fragment-constrained command below is unchanged — frag/run.py correctly consumes the nested frag/hparams_v2.yaml.

The README's GenMol V2 de novo command passes
`-c scripts/exps/frag/hparams_v2.yaml`, which fails two ways:

1. `denovo/run.py` resolves the `-c` path relative to the script's
   own directory (os.path.dirname(os.path.realpath(__file__))), so
   the argument expands to
   scripts/exps/denovo/scripts/exps/frag/hparams_v2.yaml
   -> FileNotFoundError.

2. Even by absolute path, frag/hparams_v2.yaml nests its parameters
   under per-task keys (linker_design, motif_extension, ...), whereas
   denovo/run.py reads flat top-level keys, so it raises
   KeyError: 'softmax_temp'.

The correct config is denovo/hparams_v2.yaml, which is flat and
already present. Since run.py resolves relative to its own dir, the
argument is just `-c hparams_v2.yaml` (matching the V1 de novo
command above).

Verified: the fixed command runs cleanly on GenMol V2, producing
metrics consistent with the paper's de novo benchmark table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant