Git Product home page Git Product logo

Comments (4)

MischaPanch avatar MischaPanch commented on August 17, 2024

I would suggest using an environment wrapper for that. At the moment tianshou is primarily an algorithm library, not focused on wrappers. In fact, you could just use the wrapper from SB3 together with tianshou.

Let me know if this answers your question

from tianshou.

Xiong5Heng avatar Xiong5Heng commented on August 17, 2024

Hi,
Thanks for your reply, and I will try your solution.
But, if I do not use the wrapper from SB3, are there any other ways to record the rewards from all vector environments?

from tianshou.

MischaPanch avatar MischaPanch commented on August 17, 2024

The best way would be to use an env wrapper. Note that in all examples you can create your own env factory with your own wrapper. I'll try to add a tutorial on how to do that soon.

Apart from that, you can probably use a custom logger. You can also access the buffer directly during training through the trainer, all rewards are saved there.

In very near future we will add support for callbacks during training, which then would provide the simplest way for saving custom data (see #977 #895)

from tianshou.

Xiong5Heng avatar Xiong5Heng commented on August 17, 2024

The best way would be to use an env wrapper. Note that in all examples you can create your own env factory with your own wrapper. I'll try to add a tutorial on how to do that soon.

Apart from that, you can probably use a custom logger. You can also access the buffer directly during training through the trainer, all rewards are saved there.

In very near future we will add support for callbacks during training, which then would provide the simplest way for saving custom data (see #977 #895)

Thanks for your brilliant work!

from tianshou.

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.