-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.py
More file actions
50 lines (43 loc) · 1.27 KB
/
Copy pathmain.py
File metadata and controls
50 lines (43 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from comet_ml import Experiment
from comet_ml.integration.pytorch import log_model
experiment = Experiment(
api_key="placeholder",
project_name="placeholder",
workspace="placeholder",
disabled=True
)
import os
import shutil
import argparse
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
from utils.config import *
from trainer import *
def main():
arg_parser = argparse.ArgumentParser(description="")
arg_parser.add_argument(
'--config',
metavar='config_json_file',
default='None',
help='The Configuration file in json format')
arg_parser.add_argument(
'--CUR_DIR',
metavar='CUR_DIR location',
default="None",
help='Value CURRENT DIRECTORY OF CODE USE PWD')
arg_parser.add_argument(
'--SEED',
metavar='SEED of experiment',
default="None",
help='Value of SEED of experiment')
args = arg_parser.parse_args()
print(args)
config = process_config(args)
experiment.log_parameters(config)
experiment.set_name(str(config.exp_name))
trainer_class = globals()[config.agent]
trainer = trainer_class(config=config,comet_ml=experiment)
trainer.run(config=config)
trainer.finalize()
if __name__ == '__main__':
main()