Skip to content

Commit

Permalink
Valid run filenames for Windows (#137)
Browse files Browse the repository at this point in the history
Convert datetime into valid string filename for Windows
  • Loading branch information
tipavlos committed May 6, 2020
1 parent e7d668e commit 8628699
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions all/experiments/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class ExperimentWriter(SummaryWriter, Writer):
tagging the run with a combination of the agent name, the commit hash of the
current git repo of the working directory (if any), and the current time.
Also writes summary statistics into CSV files.
Args:
experiment (all.experiments.Experiment): The Experiment associated with the Writer object.
agent_name (str): The name of the Agent the Experiment is being performed on
Expand All @@ -24,7 +22,7 @@ class ExperimentWriter(SummaryWriter, Writer):
'''
def __init__(self, experiment, agent_name, env_name, loss=True):
self.env_name = env_name
current_time = str(datetime.now())
current_time = datetime.now().strftime('%Y%m%d-%H%M%S')
os.makedirs(
os.path.join(
"runs", ("%s %s %s" % (agent_name, COMMIT_HASH, current_time)), env_name
Expand All @@ -51,7 +49,6 @@ def add_schedule(self, name, value, step="frame"):
def add_scalar(self, name, value, step="frame"):
'''
Log an arbitrary scalar.
Args:
name (str): The tag to associate with the scalar
value (number): The value of the scalar at the current step
Expand Down

0 comments on commit 8628699

Please sign in to comment.