Skip to content

Commit

Permalink
fix: fix plot dataframe loading (#338)
Browse files Browse the repository at this point in the history
This commit fixes a bug which caused the plot dataframe to be loaded
incorrectly when a csv file was saved in the train function.
  • Loading branch information
rickstaa committed Aug 25, 2023
1 parent c6d08ef commit 90e16e9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions stable_learning_control/utils/log_utils/logx.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def __init__(
output_dir (str, optional): A directory for saving results to. If
``None``, defaults to a temp directory of the form
``/tmp/experiments/somerandomnumber``.
output_fname (str, optional): Name for the (tab/comma) separated-value
output_fname (str, optional): Name for the (comma/tab) separated-value
file containing metrics logged throughout a training run. Defaults to
to ``progress.csv``.
to ``progress.csv`` which uses commas as separators.
exp_name (str, optional): Experiment name. If you run multiple training
runs and give them all the same ``exp_name``, the plotter
will know to group them. (Use case: if you run the same
Expand Down
4 changes: 3 additions & 1 deletion stable_learning_control/utils/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def get_datasets(logdir, condition=None):
units[condition1] += 1

try:
exp_data = pd.read_table(osp.join(root, data_file[0]))
exp_data = pd.read_table(
osp.join(root, data_file[0]), sep=None, engine="python"
)
except Exception:
print("Could not read from %s" % osp.join(root, data_file[0]))
continue
Expand Down

0 comments on commit 90e16e9

Please sign in to comment.