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

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

Closed
wants to merge 7 commits into from

Conversation

lalalune
Copy link

@lalalune lalalune commented Jun 10, 2024

This PR does the following:

  • python3.10 -> python3.11
  • bpy 4.0.0 -> bpy 4.1.0 (fixes Mac OSX install issue)
  • fix some pyproject issues so twine builds
  • python3.11 -m build && twine upload dist/* builds and deploys to pypi
  • Dockerfile updated to support 3.11

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.

@lalalune lalalune force-pushed the main branch 2 times, most recently from db47010 to deef3c6 Compare June 10, 2024 08:27
Update to 3.11

upgrade requirements

change setup.py

try handle

fix typo

docker builds on linux at least

fix issues for publishing to pypi

add requirements

restore setup.py
@araistrick
Copy link
Contributor

araistrick commented Jun 11, 2024

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

  • test all assets run without crashing (IE, pass all pytest unit tests)
  • visually check all assets look correct via generate_individual_assets.py
  • run 100 full nature scenes to check for crashes
  • (in a future PR) revamp the terrain/opengl (separate issues for each) build system so we can compile & include it in the pypi build, potentially using add cmake build system currently test on windows platfrom #125

@lalalune
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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.

@lalalune lalalune changed the title Update to bpy 4.1.0 and Python 3.11, packaging for installation to pypi is working Update to bpy 4.1.0 and Python 3.11, packaging for installation to pypi is working (WIP) Jun 12, 2024
@lalalune lalalune marked this pull request as draft June 13, 2024 20:24
@fire
Copy link

fire commented Jun 13, 2024

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

@lalalune
Copy link
Author

@araistrick
Copy link
Contributor

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
Copy link

fire commented Jun 20, 2024

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

@fire
Copy link

fire commented Jun 21, 2024

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

@DeepAI-Research DeepAI-Research closed this by deleting the head repository Jun 26, 2024
@fire
Copy link

fire commented Jun 27, 2024

For reference.
252.patch.txt

@fire
Copy link

fire commented Jun 30, 2024

The project was moved here https://github.com/DeepAI-Research/Simverse. I will try to restore the pr.

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

Successfully merging this pull request may close these issues.

None yet

4 participants