Comments (10)
Some update:
I've found the root: you cannot visualize a batch of the agents.
And even with one agent I had shape: (1, 299). After fix it works.
But you definitely need to support multiple objects or at least show error.
from brax.
Thanks for this feedback! Agreed, we should at least give a more informative error if batched trajectories are sent to the visualizer. We'll fix that and resolve this issue when it's posted.
Supporting visualizing batches of agents ( such as https://spectrum.ieee.org/image/MzMwNDQ2Ng.jpeg ) would be great too, but we would have to verify three.js can handle large scenes.
from brax.
Thanks, btw great job! I was able to integrate it to the pytorch and achieved pretty great training performance on 3090 :) more than 0.5m training steps per second and 14k scores with humanoid.
from brax.
Very cool! Using pytorch, does each step have to copy back to CPU? Can pytorch access jax datastructures?
from brax.
`
def jax_to_torch(tensor):
from jax._src.dlpack import (to_dlpack,)
tensor = to_dlpack(tensor)
tensor = tpack.from_dlpack(tensor)
return tensor
def torch_to_jax(tensor):
from jax._src.dlpack import (from_dlpack,)
tensor = tpack.to_dlpack(tensor)
tensor = from_dlpack(tensor)
return tensor
`
I found a way. If use this code it works at least 10% faster compared to the CPU version via numpy.
from brax.
Cool trick! If your project has a url, feel free to share it. We may eventually have a "Projects using Brax" section in the README.
Thanks for sharing!
from brax.
sounds good.
I just added it to my project: https://github.com/Denys88/rl_games/ but didn't update readme yet, will do it this evening.
Here is env link https://github.com/Denys88/rl_games/blob/master/rl_games/envs/brax.py
Actually I implemented training fully on GPU, only read vlaues to report it to the tensorfow.
from brax.
OK, this is addressed in 170405e - thanks Denys.
from brax.
This bug still is present. Rendering doesn't work with batched environments, even when it's a single env batch.
from brax.
Thanks @ViktorM for pointing it out! We still don't support rendering batches, but the RuntimeError on invalid shapes was accidentally removed. Added it back
from brax.
Related Issues (20)
- softbody simulation HOT 1
- Ant (positional) initialization often inevitably leads to unhealthy state / early termination with a few timesteps HOT 1
- Load v1 configs in v2 for spring/positional backends HOT 1
- XlaRuntimeError when create barkour_v0_joystick env HOT 1
- Training Quadruped needs to be more stable HOT 1
- Apply external force to the agent HOT 2
- Discrepancy in Observation Dimension for Humanoid Environment HOT 2
- How do I load a pre-trained model? HOT 1
- Inconsistency in solved return for Humanoid environment HOT 1
- Manually Set Initial Pose of Agent in the Reset Function HOT 1
- Mesh-Mesh Collision Problems HOT 1
- gradient on trajectory vs sum of gradients on 1 step transitions. HOT 1
- Reacher Task and AutoResetWrapper HOT 1
- Programatic Action Specifications HOT 1
- Subsume part of System inside State; EDIT: Or add Options to reset HOT 11
- MjxEnv no where to be found HOT 2
- Broken links on Github's brax's main page HOT 2
- [MJX] Model loading errors in `brax.io`, for features supported by MJX HOT 1
- Rendering an image with brax.io.image HOT 6
- Dump to json fails if mj model contains no meshes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brax.