Skip to content

Commit

Permalink
refactor: purge os from init files
Browse files Browse the repository at this point in the history
  • Loading branch information
melo-gonzo committed Jul 15, 2024
1 parent 8e11437 commit cb51078
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions experiments/datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import yaml

from pathlib import Path
Expand All @@ -15,7 +14,7 @@


for filename in yaml_dir.rglob("*.yaml"):
file_path = Path(os.path.join(yaml_dir, filename))
file_path = yaml_dir.joinpath(filename)
with open(file_path, "r") as file:
content = yaml.safe_load(file)
file_key = file_path.stem
Expand Down
3 changes: 1 addition & 2 deletions experiments/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import yaml

from torch.nn import LayerNorm
Expand All @@ -21,7 +20,7 @@
}

for filename in yaml_dir.rglob("*.yaml"):
file_path = Path(os.path.join(yaml_dir, filename))
file_path = yaml_dir.joinpath(filename)
with open(file_path, "r") as file:
content = yaml.safe_load(file)
file_key = file_path.stem
Expand Down
3 changes: 1 addition & 2 deletions experiments/trainer_config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from experiments.trainer_config.trainer_config import setup_trainer # noqa: F401

import os
import yaml
from pathlib import Path

Expand All @@ -11,7 +10,7 @@
}

for filename in yaml_dir.rglob("*.yaml"):
file_path = Path(os.path.join(yaml_dir, filename))
file_path = yaml_dir.joinpath(filename)
with open(file_path, "r") as file:
content = yaml.safe_load(file)
file_key = file_path.stem
Expand Down

0 comments on commit cb51078

Please sign in to comment.