From 3eb89137834e27fc0ac5e3a1b1abff30947eed5f Mon Sep 17 00:00:00 2001 From: JonathanCrabbe Date: Wed, 31 Jan 2024 15:01:27 +0000 Subject: [PATCH] Correct typo --- cmd/sample.py | 4 ++-- src/fdiff/utils/extraction.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/sample.py b/cmd/sample.py index 84747e4..f6076a0 100644 --- a/cmd/sample.py +++ b/cmd/sample.py @@ -11,7 +11,7 @@ from fdiff.models.score_models import ScoreModule from fdiff.sampling.metrics import MetricCollection from fdiff.sampling.sampler import DiffusionSampler -from fdiff.utils.extraction import dict_to_str, get_best_checkpoint, get_model_typle +from fdiff.utils.extraction import dict_to_str, get_best_checkpoint, get_model_type from fdiff.utils.fourier import idft @@ -48,7 +48,7 @@ def __init__(self, cfg: DictConfig) -> None: # Load score model from checkpoint best_checkpoint_path = get_best_checkpoint(self.save_dir / "checkpoints") - model_type = get_model_typle(train_cfg) + model_type = get_model_type(train_cfg) self.score_model = model_type.load_from_checkpoint( checkpoint_path=best_checkpoint_path ) diff --git a/src/fdiff/utils/extraction.py b/src/fdiff/utils/extraction.py index bc2e6c8..4d22a41 100644 --- a/src/fdiff/utils/extraction.py +++ b/src/fdiff/utils/extraction.py @@ -55,7 +55,7 @@ def flatten_config(cfg: DictConfig | dict) -> dict[str, Any]: return cfg_flat -def get_model_typle(cfg: DictConfig | dict) -> ScoreModule | MLPScoreModule: +def get_model_type(cfg: DictConfig | dict) -> ScoreModule | MLPScoreModule: """Get the model type from a config. Args: