Code Monkey home page Code Monkey logo

Comments (9)

yangliu2 avatar yangliu2 commented on May 18, 2024 3

I just installed python2.7 and run this. It still have the same problem. Do you have any thoughts?

from dopamine.

Jarvis-K avatar Jarvis-K commented on May 18, 2024 1

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

from dopamine.

yangliu2 avatar yangliu2 commented on May 18, 2024

Thanks. When will Google switch to python3? The core developer is going to retire it.

from dopamine.

Jarvis-K avatar Jarvis-K commented on May 18, 2024

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.

from dopamine.

psc-g avatar psc-g commented on May 18, 2024

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.

from dopamine.

KaixiangLin avatar KaixiangLin commented on May 18, 2024

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.

from dopamine.

xavigonzalvo avatar xavigonzalvo commented on May 18, 2024

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

from dopamine.

psc-g avatar psc-g commented on May 18, 2024

thanks for pointing this out. i've reproduced this error on my end and have a fix that will go out soon.

from dopamine.

psc-g avatar psc-g commented on May 18, 2024

this was fixed here

from dopamine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.