Skip to content

Commit

Permalink
Fix ValueError issue when reloading baselines and increase minor vers…
Browse files Browse the repository at this point in the history
…ion number for new release.

PiperOrigin-RevId: 243803145
  • Loading branch information
psc-g committed Apr 16, 2019
1 parent 2ce82ea commit 834c4b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions dopamine/colab/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def load_baselines(base_dir, verbose=False):
else:
single_agent_data = pickle.load(f)
single_agent_data['agent'] = agent
# The dataframe rows are all read as 'objects', which causes a
# ValueError when merging below. We cast the numerics to float64s to
# avoid this.
for field_name in single_agent_data.keys():
try:
single_agent_data[field_name] = (
single_agent_data[field_name].astype(np.float64))
except ValueError:
continue
if game in experimental_data:
experimental_data[game] = experimental_data[game].merge(
single_agent_data, how='outer')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

setup(
name='dopamine_rl',
version='2.0.1',
version='2.0.2',
include_package_data=True,
packages=find_packages(exclude=['docs']), # Required
package_data={'testdata': ['testdata/*.gin']},
Expand Down

0 comments on commit 834c4b8

Please sign in to comment.