Skip to content

Commit

Permalink
append PYTHONPATH for not installed modules
Browse files Browse the repository at this point in the history
  • Loading branch information
dcfidalgo committed Nov 14, 2023
1 parent 8ab1746 commit 4e83a88
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/slurm_sweeps/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ def __init__(
os.environ[EXPERIMENT_NAME] = name
os.environ[STORAGE_PATH] = str(self._storage.path)
os.environ[DB_PATH] = str(self._database.path)
# in case we import modules that are not installed
try:
os.environ["PYTHONPATH"] = f"{os.environ['PYTHONPATH']}:{os.getcwd()}"
except KeyError:
os.environ["PYTHONPATH"] = os.getcwd()

@staticmethod
def _create_experiment_dir(
Expand Down

0 comments on commit 4e83a88

Please sign in to comment.