Skip to content

Commit

Permalink
Calling when registering a script config
Browse files Browse the repository at this point in the history
  • Loading branch information
JackUrb committed Aug 26, 2021
1 parent b0afc82 commit 8ed4485
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mephisto/operations/hydra_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def initialize_named_configs():


def register_script_config(name: str, module: Any):
check_for_hydra_compat()
config.store(name=name, node=module)


Expand All @@ -69,6 +70,8 @@ def check_for_hydra_compat():
import os

callsite = inspect.stack(0)[-1].filename
for entry in inspect.stack(0):
print(entry.filename)
call_dir = os.path.dirname(os.path.join(".", callsite))
if "hydra_configs" not in os.listdir(call_dir):
logger.warning(
Expand All @@ -81,6 +84,3 @@ def check_for_hydra_compat():
"remediation details."
"\u001b[0m"
)


check_for_hydra_compat()

0 comments on commit 8ed4485

Please sign in to comment.