Skip to content
Snippets Groups Projects
Commit 016eabba authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

Changed script generation to take default experiment identifier from file name.

parent b0633610
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ class ExpConfig(ConfigObj):
exp_lib_dir = 'standard_experiments'
env_lib_dir = 'standard_environments'
default_name = 'DEFAULT'
id_name = 'EXP_ID'
# Class constructor
......@@ -96,6 +97,11 @@ class ExpConfig(ConfigObj):
pre_config = ConfigObj(interpolation=False)
config_versions = []
# Get default experiment id from file name
pre_config[ExpConfig.id_name] = os.path.splitext(
os.path.basename(experiment_config_name)
)[0]
# Read Environment
env_dict = dict(os.environ)
......@@ -257,6 +263,6 @@ class ExpConfig(ConfigObj):
config_lines.seek(0)
ConfigObj.__init__(self, config_lines, interpolation=False)
self.experiment_id = self['EXP_ID']
self.experiment_id = self[ExpConfig.id_name]
self.experiment_kind = re.sub(r'-\w+$', '', experiment_type)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment