Skip to content

Commit

Permalink
Merge pull request zaccharieramzi#1 from Jasha10/use_namespace_package
Browse files Browse the repository at this point in the history
  • Loading branch information
zaccharieramzi authored Jan 20, 2022
2 parents 069a1bd + dd7a1bc commit bf9cc37
Show file tree
Hide file tree
Showing 13 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
global-exclude *.pyc
global-exclude __pycache__
recursive-include jz_hydra_submitit_launcher/* *.yaml
recursive-include hydra_plugins/jz_hydra_submitit_launcher/* *.yaml
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
python $1 -m hydra/launcher=$2 "${@:3}"
3 changes: 3 additions & 0 deletions hydra_plugins/jz_hydra_submitit_launcher/resolvers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from omegaconf import OmegaConf

OmegaConf.register_new_resolver("multiply10", lambda x: x * 10)
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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'],
)

0 comments on commit bf9cc37

Please sign in to comment.