mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-25 17:10:42 +00:00
Convert FOB submodule to regular folder
This commit is contained in:
parent
94f046ad40
commit
94825011a0
74 changed files with 4563 additions and 0 deletions
25
environments/optimizer/FOB/pytorch_fob/run_experiment.py
Normal file
25
environments/optimizer/FOB/pytorch_fob/run_experiment.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
from pathlib import Path
|
||||
import argparse
|
||||
|
||||
from pytorch_fob.engine.engine import Engine
|
||||
from pytorch_fob.engine.utils import set_loglevel
|
||||
|
||||
|
||||
def main(args: argparse.Namespace, extra_args: list[str]):
|
||||
engine = Engine()
|
||||
engine.parse_experiment_from_file(args.experiment_file, extra_args=extra_args)
|
||||
engine.run_experiment()
|
||||
engine.plot()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(
|
||||
description="runs an experiment specified by a file"
|
||||
)
|
||||
parser.add_argument("experiment_file", type=Path,
|
||||
help="The yaml file specifying the experiment.")
|
||||
parser.add_argument("--log_level", type=str, choices=["debug", "info", "warn", "silent"], default="info",
|
||||
help="Set the log level")
|
||||
args, extra_args = parser.parse_known_args()
|
||||
set_loglevel(args.log_level)
|
||||
main(args, extra_args)
|
||||
Loading…
Add table
Add a link
Reference in a new issue