feat: add runs n' poses val set (#210)

* feat: add runs n' poses val set

* chore: ruff

* chore: remove from defaults
This commit is contained in:
Nathaniel Corley
2025-05-16 13:48:49 -07:00
committed by GitHub
parent 5629dec350
commit bd7b7413ac
4 changed files with 26 additions and 8 deletions

View File

@@ -0,0 +1,11 @@
defaults:
- base
dataset:
dataset_parser:
_target_: datahub.datasets.parsers.ValidationDFParserLikeAF3
dataset:
_target_: datahub.datasets.datasets.PandasDataset
data: ${paths.data.pdb_data_dir}/runs_n_poses_entry_level_df.parquet
filters:
- "n_tokens_total < 1000" # Subset to reasonably-sized examples for efficiency

View File

@@ -12,4 +12,7 @@ tags:
project: af3
ckpt_path: /net/software/containers/versions/modelhub_inference/ckpts/modelhub_af3_with_confidence_latest.ckpt
ckpt_config:
_target_: modelhub.utils.weights.CheckpointConfig
path: /net/software/containers/versions/modelhub_inference/ckpts/modelhub_af3_with_confidence_latest.ckpt
reset_optimizer: true

View File

@@ -42,8 +42,4 @@ callbacks:
dump_validation_structures_callback:
dump_predictions: True
one_model_per_file: False
dump_trajectories: False
# passing checkpoint path required for validation
# DO NOT set here; set in the experiment config file
ckpt_path: ???
dump_trajectories: False

View File

@@ -118,12 +118,20 @@ def validate(cfg: DictConfig) -> None:
loader_cfg=cfg.dataloader["val"],
)
# ... load the checkpoint configuration, regardless of whether it's a path or a config
if "ckpt_path" in cfg and cfg.ckpt_path:
ckpt_path = cfg.ckpt_path
elif "ckpt_config" in cfg and cfg.ckpt_config:
assert (
"path" in cfg.ckpt_config
), "No checkpoint path provided in `ckpt_config`!"
ckpt_path = cfg.ckpt_config.path
# ... validate the model
ranked_logger.info("Validating model...")
assert cfg.ckpt_path is not None, "No checkpoint path provided for validation!"
trainer.validate(
val_loaders=val_loaders,
ckpt_path=cfg.ckpt_path,
ckpt_path=ckpt_path,
)
ranked_logger.info("Validation complete!")