Skip to content

Commit

Permalink
fix(config): fix import of __search_package_path__ in hydra/main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Jun 17, 2023
1 parent e766310 commit e07d932
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/hyfi/__global__/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,3 +284,7 @@ def app_version(self):


__global_config__ = HyfiConfig()


def __search_package_path__():
return __global_config__.hyfi_config_path
8 changes: 1 addition & 7 deletions src/hyfi/hydra/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from omegaconf import DictConfig, ListConfig, OmegaConf, SCMode

from hyfi.__global__ import __home_path__, __hyfi_path__
from hyfi.__global__.config import __global_config__
from hyfi.__global__.config import __global_config__, __search_package_path__
from hyfi.cached_path import cached_path
from hyfi.hydra import SpecialKeys, _compose, _select, _to_dict
from hyfi.utils.env import dotenv_values, getcwd
Expand All @@ -26,8 +26,6 @@
DictKeyType = Union[str, int, Enum, float, bool]




_config_ = _compose().copy()


Expand Down Expand Up @@ -306,10 +304,6 @@ def _function(cfg: Any, _name_, return_function=False, **parms):
return None


def __search_package_path__():
return __global_config__.hyfi_config_path


OmegaConf.register_new_resolver("__hyfi_path__", __hyfi_path__)
OmegaConf.register_new_resolver("__search_package_path__", __search_package_path__)
OmegaConf.register_new_resolver("__home_path__", __home_path__)
Expand Down

0 comments on commit e07d932

Please sign in to comment.