diff --git a/MANIFEST.in b/MANIFEST.in index 48d1458..e9dc594 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ global-exclude *.pyc global-exclude __pycache__ -recursive-include jz_hydra_submitit_launcher/* *.yaml \ No newline at end of file +recursive-include hydra_plugins/jz_hydra_submitit_launcher/* *.yaml \ No newline at end of file diff --git a/jz_hydra_submitit_launcher/__init__.py b/hydra_plugins/jz_hydra_submitit_launcher/__init__.py similarity index 100% rename from jz_hydra_submitit_launcher/__init__.py rename to hydra_plugins/jz_hydra_submitit_launcher/__init__.py diff --git a/jz_hydra_submitit_launcher/bin/hydra-submitit-launch b/hydra_plugins/jz_hydra_submitit_launcher/bin/hydra-submitit-launch similarity index 81% rename from jz_hydra_submitit_launcher/bin/hydra-submitit-launch rename to hydra_plugins/jz_hydra_submitit_launcher/bin/hydra-submitit-launch index 5cf08e1..46acc48 100644 --- a/jz_hydra_submitit_launcher/bin/hydra-submitit-launch +++ b/hydra_plugins/jz_hydra_submitit_launcher/bin/hydra-submitit-launch @@ -11,4 +11,4 @@ if [ "$1" == "--help" ]; then exit 0 fi -python $1 -m hydra/launcher=$2 'hydra.searchpath=[pkg://jz_hydra_submitit_launcher]' "${@:3}" \ No newline at end of file +python $1 -m hydra/launcher=$2 "${@:3}" \ No newline at end of file diff --git a/jz_hydra_submitit_launcher/hydra/launcher/4gpus_dev.yaml b/hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/4gpus_dev.yaml similarity index 100% rename from jz_hydra_submitit_launcher/hydra/launcher/4gpus_dev.yaml rename to hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/4gpus_dev.yaml diff --git a/jz_hydra_submitit_launcher/hydra/launcher/4gpus_t3.yaml b/hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/4gpus_t3.yaml similarity index 100% rename from jz_hydra_submitit_launcher/hydra/launcher/4gpus_t3.yaml rename to hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/4gpus_t3.yaml diff --git a/jz_hydra_submitit_launcher/hydra/launcher/4gpus_t4.yaml b/hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/4gpus_t4.yaml similarity index 100% rename from jz_hydra_submitit_launcher/hydra/launcher/4gpus_t4.yaml rename to hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/4gpus_t4.yaml diff --git a/jz_hydra_submitit_launcher/hydra/launcher/base.yaml b/hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/base.yaml similarity index 100% rename from jz_hydra_submitit_launcher/hydra/launcher/base.yaml rename to hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/base.yaml diff --git a/jz_hydra_submitit_launcher/hydra/launcher/dev.yaml b/hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/dev.yaml similarity index 100% rename from jz_hydra_submitit_launcher/hydra/launcher/dev.yaml rename to hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/dev.yaml diff --git a/jz_hydra_submitit_launcher/hydra/launcher/t3.yaml b/hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/t3.yaml similarity index 100% rename from jz_hydra_submitit_launcher/hydra/launcher/t3.yaml rename to hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/t3.yaml diff --git a/jz_hydra_submitit_launcher/hydra/launcher/t4.yaml b/hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/t4.yaml similarity index 100% rename from jz_hydra_submitit_launcher/hydra/launcher/t4.yaml rename to hydra_plugins/jz_hydra_submitit_launcher/hydra/launcher/t4.yaml diff --git a/hydra_plugins/jz_hydra_submitit_launcher/resolvers.py b/hydra_plugins/jz_hydra_submitit_launcher/resolvers.py new file mode 100644 index 0000000..1cb898c --- /dev/null +++ b/hydra_plugins/jz_hydra_submitit_launcher/resolvers.py @@ -0,0 +1,3 @@ +from omegaconf import OmegaConf + +OmegaConf.register_new_resolver("multiply10", lambda x: x * 10) diff --git a/jz_hydra_submitit_launcher/searchpath_config.py b/hydra_plugins/jz_hydra_submitit_launcher/searchpath_config.py similarity index 88% rename from jz_hydra_submitit_launcher/searchpath_config.py rename to hydra_plugins/jz_hydra_submitit_launcher/searchpath_config.py index 740568e..664654e 100644 --- a/jz_hydra_submitit_launcher/searchpath_config.py +++ b/hydra_plugins/jz_hydra_submitit_launcher/searchpath_config.py @@ -12,5 +12,5 @@ def manipulate_search_path(self, search_path: ConfigSearchPath) -> None: # Remember to verify the config is packaged properly (build sdist and look inside, # and verify MANIFEST.in is correct). search_path.append( - provider="jz-hydra-submitit-launcher", path="pkg://jz_hydra_submitit_launcher" + provider="jz-hydra-submitit-launcher", path="pkg://hydra_plugins.jz_hydra_submitit_launcher" ) \ No newline at end of file diff --git a/setup.py b/setup.py index d0e779d..87edf5b 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ with open('requirements.txt') as open_file: install_requires = open_file.read() -import jz_hydra_submitit_launcher +from hydra_plugins import jz_hydra_submitit_launcher setuptools.setup( name="jz-hydra-submitit-launcher", @@ -31,5 +31,5 @@ python_requires='>=3.6', include_package_data=True, keywords=['hydra', 'submitit', 'jean-zay'], - scripts=['jz_hydra_submitit_launcher/bin/hydra-submitit-launch'], + scripts=['hydra_plugins/jz_hydra_submitit_launcher/bin/hydra-submitit-launch'], )