Closed yangliu2 closed 5 years ago
maybe u are using python3
run the load_baselines
.
the pickle file is generated by python2,when readed by python3,the dataframe columns type will be object .when merged two dataframe,pandas convert object type to float.this error is due to the second time u try to merge,the float columns cannot merge with object columns.
I just pulled a new request for this problem
Thanks. When will Google switch to python3? The core developer is going to retire it.
I don't know how long the team will merge my pull request.but you can just simply modify like my pull request ,then rebuild it from source use python3 setup.py install
.Then you can load baselines with no errors.
But by the way ,if u build from source ,then try not reference colab code to modify your own codes,cause the dopamine-rl version used in it is lower than the source,it hasn't been modified for now.
I just installed python2.7 and run this. It still have the same problem. Do you have any thoughts?
this is running on your local computer? the colab utilities have really only been tested on colab.research.google.com.
if you provide your setup and command lines used i can try to reproduce.
A quick fix:
add following lines after this line in load_statistics.ipynb: sample_data['run_number'] = 1
sample_data['run_number'] = sample_data['run_number'].astype("float64")
sample_data['iteration'] = sample_data['iteration'].astype("float64")
sample_data['train_episode_returns'] = sample_data['train_episode_returns'].astype(
"float64")
Similarly, add following lines after this line in colab.utils.py
single_agent_data['run_number'] = single_agent_data['run_number'].astype("float64")
single_agent_data['iteration'] = single_agent_data['iteration'].astype("float64")
single_agent_data['train_episode_returns'] = single_agent_data['train_episode_returns'].astype(
"float64")
Then you should be able to re-plot the results.
This problem seems to persist in a colab executed in a python2.7 framework when loading the baseline data:
experimental_data = colab_utils.load_baselines('/content')
Error is:
ValueError: You are trying to merge on float64 and object columns. If you wish to proceed you should use pd.concat
thanks for pointing this out. i've reproduced this error on my end and have a fix that will go out soon.
when loading content using
experimental_data = colab_utils.load_baselines('/content')
I got this errorYou are trying to merge on float64 and object columns. If you wish to proceed you should use pd.concat
. I'm not sure what's wrong. I ran this on my local computer. I have 'c51, dqn, implicit_quantile, quantile, rainbow' in 'content' folder. Is this pandas related problem?