Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inference_demo.py issue, detailed install instructions of tested platform? #1

Open
erwincoumans opened this issue Dec 21, 2017 · 4 comments

Comments

@erwincoumans
Copy link

erwincoumans commented Dec 21, 2017

I'm getting errors after installing it, see below. Can you describe on what platform you develop and test lcp-physics, which versions of all relevant packages (Linux distro, mac, windows etc), python3 version (anaconda?) etc.

demo.py seems to work (but sim runs pretty slow), but python inference_demo.py gives an error:

erwincoumans-macbookpro2:demos erwincoumans$ python inference_demo.py 
  10 / 11  30.0Traceback (most recent call last):
  File "inference_demo.py", line 248, in <module>
    inference_demo(screen)
  File "inference_demo.py", line 49, in inference_demo
    grad = c.mass.grad.data
AttributeError: 'NoneType' object has no attribute 'data'


(python and pip are an alias to python3 and pip3)

conda install pytorch torchvision -c pytorch
pip install pygame
python setup.py develop
cd demos
python demo.py

erwincoumans-macbookpro2:demos erwincoumans$ python inference_demo.py 
  10 / 11  30.0Traceback (most recent call last):
  File "inference_demo.py", line 248, in <module>
    inference_demo(screen)
  File "inference_demo.py", line 49, in inference_demo
    grad = c.mass.grad.data
AttributeError: 'NoneType' object has no attribute 'data'

image

image

@erwincoumans erwincoumans reopened this Dec 21, 2017
@erwincoumans erwincoumans changed the title Detailed install instructions of tested platform (linux/mac/windows), python3 version (anaconda?, 3.5, 3.6?), pytorch version inference_demo.py issue, detailed install instructions of tested platform (linux/mac/windows), python3 version (anaconda?, 3.5, 3.6?), pytorch version Dec 21, 2017
@erwincoumans erwincoumans changed the title inference_demo.py issue, detailed install instructions of tested platform (linux/mac/windows), python3 version (anaconda?, 3.5, 3.6?), pytorch version inference_demo.py issue, detailed install instructions of tested platform? Dec 21, 2017
@filipeabperes
Copy link
Member

I had introduced a small bug on the inference script, should be fixed right now. (Currently testing here.)

@filipeabperes
Copy link
Member

Regarding demo running slowly, for simple examples like that, most of that is simply because the pygame display is not really optimized, if you run with no display (python demo.py -nd or setting screen=None in the run_world code) it should run much faster than real time. On top of that, especially for more complex examples, the solver is still running on dense matrices, so we're currently working on speeding that up taking advantage of the sparsity in the formulation.

@erwincoumans
Copy link
Author

Thanks for the quick reply, performance makes sense now. After updating, the error is as follows:

[torch.DoubleTensor of size 1]

Traceback (most recent call last):
  File "inference_demo.py", line 247, in <module>
    inference_demo(screen)
  File "inference_demo.py", line 71, in inference_demo
    rec = Recorder(DT, screen)
  File "/Users/erwincoumans/dev/lcp-physics/lcp_physics/physics/utils.py", line 58, in __init__
    os.mkdir(path)
FileNotFoundError: [Errno 2] No such file or directory: 'videos/frames'

@filipeabperes
Copy link
Member

Fixed. Strange that it passed the tests, I'll check on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants