Comments (5)
That for sure should work fine. Reading https://adamj.eu/tech/2018/01/08/pytest-randomly-history/ and similar tests, it seems that people do not like it as you perturb the global state, and so you could influence other tests, but for our specific case it should work fine
So I could start with this approach and then proceed with a more refined solution.
I guess that for some reason on some joint configuration the numeric error induced by how these frameworks make the computation is bigger, but it is just an intuition.
I suspect the same. I did some tests and it seems that setting torch.set_default_dtype(torch.float64)
and config.update("jax_enable_x64", True)
(as in #39) along with np.random.seed(42)
does the job, and tests don't fail.
from adam.
CC @ami-iit/artificial-mechanical-intelligence
from adam.
Thanks @traversaro! :) Agreed!
I'll open a PR for increasing the tolerance, but I'll plan to address this issue in a more structured way.
P.S. I do not really understand why Jax and PyTorch tests are the only ones failing. Is there some strange interaction between these two frameworks and numpy?
P.P.S. Maybe it's a stupid solution. What if I set np.random.seed(0)
? I guess it will always give me the same sequence of random numbers.
from adam.
P.P.S. Maybe it's a stupid solution. What if I set np.random.seed(0)? I guess it will always give me the same sequence of random numbers.
That for sure should work fine. Reading https://adamj.eu/tech/2018/01/08/pytest-randomly-history/ and similar tests, it seems that people do not like it as you perturb the global state and so you could influence other tests, but for our specific case it should work fine (that is what we do in iDynTree, for example: https://github.com/robotology/idyntree/blob/35b0f76a9db3809384e8ebcbdb7cfb11d2cb7a7b/bindings/python/tests/joints.py#L31 and https://github.com/robotology/idyntree/blob/35b0f76a9db3809384e8ebcbdb7cfb11d2cb7a7b/src/estimation/tests/KalmanFilterUnitTest.cpp#L84).
P.S. I do not really understand why Jax and PyTorch tests are the only ones failing. Is there some strange interaction between these two frameworks and numpy?
I guess that for some reason on some joint configuration the numeric error induced by how these frameworks make the computation is bigger, but it is just an intuition.
from adam.
Just for a log, the proposed solution in #42 (comment) is implemented in #39.
from adam.
Related Issues (20)
- Warning when installing the project with pip HOT 1
- Broken Action for ADAM Main HOT 3
- Migrate away from urdf_parser_py? HOT 5
- Required python version HOT 5
- Jax installation for GPU HOT 7
- Fix failing Conda github actions HOT 1
- Rename this repo to adam-robotics? HOT 11
- Question: Differentiability w.r.t what exactly? HOT 2
- Noisy warning when loading icub model
- Black action is failing HOT 1
- Handle the case in which a parametric link is not a box, cylinder or sphere HOT 1
- Wrong return type hint in parametric get_total_mass HOT 3
- Allow getting the default densities in the parametric model HOT 1
- Failed to load stickBot model in the parametric KinDynComputations. HOT 9
- . HOT 2
- Use of the Adam HOT 1
- The dimension of the Mass Matrix and the bias force HOT 27
- NAN value HOT 3
- Test ADAM with conda-forge dependencies failing on macos-latest HOT 6
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 adam.