Skip to content

Commit

Permalink
model_type overwrite in config moved to right location in the code
Browse files Browse the repository at this point in the history
  • Loading branch information
allaffa committed Nov 27, 2024
1 parent 52d8d5a commit 98d5a94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/qm9/qm9.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def main(model_type=None):
with open(filename, "r") as f:
config = json.load(f)

# If a model type is provided, update the configuration accordingly.
if model_type:
config["NeuralNetwork"]["Architecture"]["model_type"] = model_type

verbosity = config["Verbosity"]["level"]
var_config = config["NeuralNetwork"]["Variables_of_interest"]

Expand Down Expand Up @@ -73,10 +77,6 @@ def main(model_type=None):
config, train_loader, val_loader, test_loader
)

# If a model type is provided, update the configuration accordingly.
if model_type:
config["NeuralNetwork"]["Architecture"]["model_type"] = model_type

model = hydragnn.models.create_model_config(
config=config["NeuralNetwork"],
verbosity=verbosity,
Expand Down

0 comments on commit 98d5a94

Please sign in to comment.