mirror of
https://github.com/RosettaCommons/foundry.git
synced 2026-06-04 13:24:22 +08:00
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:
11
configs/datasets/val/runs_and_poses.yaml
Normal file
11
configs/datasets/val/runs_and_poses.yaml
Normal 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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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!")
|
||||
|
||||
Reference in New Issue
Block a user