INNER CODE UNIT · Python

_search_checkpoint

Linketic/CityGaussian · internal/cli.py:65

    def _search_checkpoint(self, path: str) -> str:
        from internal.utils.gaussian_model_loader import GaussianModelLoader
        ckpt_path = GaussianModelLoader.search_load_file(path)
        assert ckpt_path.endswith(".ckpt"), "not a checkpoint can be found in {}".format(path)
        print("Auto select checkpoint file: {}".format(ckpt_path))
        return ckpt_path

    def before_instantiate_classes(self) -> None:
        config = getattr(self.config, self.config.subcommand)
        if config.name is None:
            # auto set experiment name base on --data.path
            config.name = "_".join(config.data.path.strip("/").split("/")[-3:])
            print("auto determine experiment name: {}".format(config.name))

        if config.max_steps is not None:
            config.trainer.max_steps = config.max_steps
        if config.max_epochs is not None:
            config.trainer.max_epochs = config.max_epochs

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…