diff --git a/project/main_test.py b/project/main_test.py index 9c2f3a0b..3bc8ddbc 100644 --- a/project/main_test.py +++ b/project/main_test.py @@ -231,14 +231,21 @@ def test_fast_dev_run(experiment_dictconfig: DictConfig): assert isinstance(result["value"], float) -@pytest.mark.xfail(reason="TODO: cluster sweep example causes pydantic serialization error") def test_run_auto_schema_via_cli_without_errors(): """Checks that the command completes without errors.""" # Run programmatically instead of with a subprocess so we can get nice coverage stats. # assuming we're at the project root directory. from hydra_auto_schema.__main__ import main as hydra_auto_schema_main - hydra_auto_schema_main([str(CONFIG_DIR), "--stop-on-error", "-vv"]) + hydra_auto_schema_main( + [ + f"{REPO_ROOTDIR}", + f"--configs_dir={CONFIG_DIR}", + "--stop-on-error", + "--regen-schemas", + "-vv", + ] + ) # TODO: Add some more integration tests: diff --git a/project/utils/remote_launcher_plugin.py b/project/utils/remote_launcher_plugin.py index f0a1d682..4aca6afc 100644 --- a/project/utils/remote_launcher_plugin.py +++ b/project/utils/remote_launcher_plugin.py @@ -1,4 +1,3 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # https://github.com/facebookresearch/hydra/blob/main/examples/plugins/example_launcher_plugin/hydra_plugins/example_launcher_plugin/example_launcher.py import dataclasses @@ -60,7 +59,9 @@ def _instantiate(self: Plugins, config: DictConfig) -> Plugin: Plugins._instantiate = _instantiate -@dataclasses.dataclass(init=False) +# Made this a dataclass to avoid having an ugly default repr, but it causes issues with +# hydra-auto-schema because it tries to create a schema for everything here. +# @dataclasses.dataclass(init=False) class RemoteSlurmLauncher(BaseSubmititLauncher): _EXECUTOR: ClassVar[str] = "remoteslurm"