-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #262 from melo-gonzo/experiments-config-refactor
Refactor Experiment Configs
- Loading branch information
Showing
30 changed files
with
172 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +0,0 @@ | ||
import yaml | ||
|
||
from pathlib import Path | ||
|
||
yaml_dir = Path(__file__).parent | ||
|
||
|
||
available_data = { | ||
"generic": { | ||
"experiment": {"batch_size": 32, "num_workers": 16}, | ||
"debug": {"batch_size": 4, "num_workers": 0}, | ||
}, | ||
} | ||
|
||
|
||
for filename in yaml_dir.rglob("*.yaml"): | ||
file_path = yaml_dir.joinpath(filename) | ||
with open(file_path, "r") as file: | ||
content = yaml.safe_load(file) | ||
file_key = file_path.stem | ||
available_data[file_key] = content | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +0,0 @@ | ||
import yaml | ||
|
||
from torch.nn import LayerNorm | ||
|
||
|
||
from pathlib import Path | ||
|
||
yaml_dir = Path(__file__).parent | ||
available_models = { | ||
"generic": { | ||
"output_kwargs": { | ||
"norm": LayerNorm(128), | ||
"hidden_dim": 128, | ||
"activation": "SiLU", | ||
"lazy": False, | ||
"input_dim": 128, | ||
}, | ||
"lr": 0.0001, | ||
}, | ||
} | ||
|
||
for filename in yaml_dir.rglob("*.yaml"): | ||
file_path = yaml_dir.joinpath(filename) | ||
with open(file_path, "r") as file: | ||
content = yaml.safe_load(file) | ||
file_key = file_path.stem | ||
available_models[file_key] = content | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1 @@ | ||
from experiments.trainer_config.trainer_config import setup_trainer # noqa: F401 | ||
|
||
import yaml | ||
from pathlib import Path | ||
|
||
|
||
yaml_dir = Path(__file__).parent | ||
trainer_args = { | ||
"generic": {"min_epochs": 15, "max_epochs": 100}, | ||
} | ||
|
||
for filename in yaml_dir.rglob("*.yaml"): | ||
file_path = yaml_dir.joinpath(filename) | ||
with open(file_path, "r") as file: | ||
content = yaml.safe_load(file) | ||
file_key = file_path.stem | ||
trainer_args.update(content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.