GithubHelp home page GithubHelp logo

Fail to save graphs about slm-lab HOT 5 CLOSED

kengz avatar kengz commented on August 25, 2024
Fail to save graphs

from slm-lab.

Comments (5)

kengz avatar kengz commented on August 25, 2024

seems like the orca server is not started properly. Could you kill the orca processes and try the Orca quickstart command inside the Conda environment.

Run:

conda activate lab
orca graph '{ "data": [{"y": [1,2,1]}] }' -o fig.png

and see if it completes successfully or returns the same error?

from slm-lab.

kengz avatar kengz commented on August 25, 2024

#453 includes a new plotly and orca server that should should this issue; please fetch the repo update and update the conda environment. Closing now for inactivity.

from slm-lab.

ekaradon-Alexander avatar ekaradon-Alexander commented on August 25, 2024

Similar problem in macOS 12.0.1.

Running

python run_lab.py slm_lab/spec/benchmark/sarsa/sarsa_cartpole.json sarsa_epsilon_greedy_cartpole train

(and other training scripts, e.g., REINFORCE) generates a warning message

[2021-12-11 14:33:04,621 PID:22667 WARNING viz.py <lambda>] Failed to generate graph. Run retro-analysis to generate graphs later.
The image request was rejected by the orca conversion utility
with the following error:
   502:

If running on a headless server, prepend your Python command with `xvfb-run -a `, for example `xvfb-run -a python run_lab.py`

The data/***/graph directory is empty.

I have tied the command

orca graph '{ "data": [{"y": [1,2,1]}] }' -o fig.png

It works fine and generates the expected png image file.

I checked that the version of dependences coincides with #453, i.e., plotly==4.5.4. But the issue still exists.

from slm-lab.

kengz avatar kengz commented on August 25, 2024

Seems like Plotly has shifted away from orca for static image generation since version 4.9.0
Could you please try the following command then rerun to see if it resolves your issue? If so I'll commit an update in the plotly dependencies.

conda activate lab
conda remove --force plotly-orca
conda remove --force plotly
conda install plotly=4.9.0
pip install kaleido

from slm-lab.

ekaradon-Alexander avatar ekaradon-Alexander commented on August 25, 2024

This solves my issue. Thanks.

from slm-lab.

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.