princeton-vl / infinigen

Infinite Photorealistic Worlds using Procedural Generation
https://infinigen.org
BSD 3-Clause "New" or "Revised" License
5.14k stars 430 forks source link

Update to bpy 4.1.0 and Python 3.11, packaging for installation to pypi is working (WIP) #252

Open lalalune opened 2 weeks ago

lalalune commented 2 weeks ago

This PR does the following:

Note: Some of the tests have been corrected and are passing, but some are not. Working on it :)

I've deployed to PyPI here: https://pypi.org/project/rr-infinigen/ (temporary until there is an infinigen package)

There may be some other issues, I didn't get too deep into the docs, but happy to take feedback and make this work for others.

araistrick commented 2 weeks ago

Thanks for the contribution! Ive been really wanting to set up pypi publishing and havent had the time/expertise to do it, so im very excited for this PR. Docker actually working would be huge too. We are on a tight deadline this week so I will be active to test & merge this next week, or in 2 weeks, after CVPR.

Updating to bpy==4.1.0 will almost certainly break some assets / geonodes as typically the names of various things change. Updating to bpy==3.6 was pretty arduous so hopefully this one is less painful.

This PR will only publish the INFINIGEN_MINIMAL_INSTALL=True version I presume, without terrain or opengl. At some point id love to include all of these, but packaging GPU code is quite hard afaik.

So, the main remaining tasks are as follows, but no obligation to do these

lalalune commented 2 weeks ago

I'll take a crack at making sure everything works tonight. I will try to figure out how to run tests :)

We're working on a distributed rendering package: https://github.com/raccoonresearch/distributaur

So yeah, we'll be imminently testing if we ran run hundreds of instances simultaneously and see if there are any bugs.

araistrick commented 2 weeks ago

To run the tests you can just pip install .[dev]; pytest tests/.

I also recommend doing pip install pytest-xdist so you can do pytest tests/ -n 10, which runs the cases in parallel on 10 threads. Although, this requires added a sorted(list(..)) to the @pytest.mark.parameterize calls in tests/ to ensure the testcases are received in the same order on the different threads, which I havent done on the public repo yet.

lalalune commented 2 weeks ago

Thanks for the tips.

You are right. Some things in geometry nodes have changed a lot. However, seems resolvable, I resolved a few of the issues already. Will take a crack at getting this all going and updated.

fire commented 1 week ago

Can you turn on the cicd or is it load bearing?

lalalune commented 1 week ago

https://github.com/princeton-vl/infinigen/actions/runs/9445067691/job/26083380072

araistrick commented 6 days ago

Hi folks, would you be willing to PR just the docker/manifest/other fixes without the blender 4.1.0 update for now? Im going to try set up pypi packaging for infinigen v1.4.1 onwards. I would love to use all your changes via an isolated PR, and I think bpy==4.1 should come slightly later on.

fire commented 5 days ago

How can I help? I'm new to this code base.

fire commented 5 days ago

Hi folks, would you be willing to PR just the docker/manifest/other fixes without the blender 4.1.0 update for now? Im going to try set up pypi packaging for infinigen v1.4.1 onwards. I would love to use all your changes via an isolated PR, and I think bpy==4.1 should come slightly later on.

Hello. I am having difficulty isolating Blender.

9.104 INFO: pip is looking at multiple versions of infinigen to determine which version is compatible with other requirements. This could take a while.
9.105 ERROR: Ignored the following versions that require a different python version: 2.82.1 Requires-Python >=3.7, <3.8
9.105 ERROR: Could not find a version that satisfies the requirement bpy==3.6.0 (from infinigen) (from versions: none)
9.105 ERROR: No matching distribution found for bpy==3.6.0