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

python311Packages.gradio-client: 0.14.0 -> 0.16.1, python311Packages.gradio: 4.27.0 -> 4.29.0 #310295

Merged
merged 3 commits into from
May 11, 2024

Conversation

GaetanLepage
Copy link
Contributor

@GaetanLepage GaetanLepage commented May 9, 2024

Description of changes

gradio-client is currently broken on master.
Note: this patch is not working yet.

fixes #310761

Changelogs:

cc @pbsds @drupol

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@GaetanLepage GaetanLepage changed the title gradio-client: 0.14.0 -> 0.16.1 python311Packages.gradio-client: 0.14.0 -> 0.16.1, python311Packages.gradio: 4.27.0 -> 4.29.0 May 9, 2024
@ofborg ofborg bot requested a review from pbsds May 9, 2024 09:46
@drupol
Copy link
Contributor

drupol commented May 9, 2024

@GaetanLepage Is it ready to be merged? I see this is broken on some archs, can we fix this?

@GaetanLepage
Copy link
Contributor Author

@GaetanLepage Is it ready to be merged? I see this is broken on some archs, can we fix this?

No it's still broken. I have to go through the logs.

@drupol
Copy link
Contributor

drupol commented May 9, 2024

OK I'll wait then, I need this in #305586

@pbsds
Copy link
Member

pbsds commented May 9, 2024

Neat! I have nearly the same diff sitting in a local branch which fixes gradio on py311, but py312 is broken due to two issues in diffusers. The following diff fixes the first issue, but diffusers still fail to build due to test failures. Upstream communicates that the tests should be temporarily disabled now, but i've yet to go hunt down the commits to cherrypick.

diff --git a/pkgs/development/python-modules/diffusers/default.nix b/pkgs/development/python-modules/diffusers/default.nix
index 39464efe47fd..8b555462c21b 100644
--- a/pkgs/development/python-modules/diffusers/default.nix
+++ b/pkgs/development/python-modules/diffusers/default.nix
@@ -2,6 +2,7 @@
 , stdenv
 , buildPythonPackage
 , fetchFromGitHub
+, fetchpatch
 , pythonOlder
 , writeText
 , setuptools
@@ -51,6 +52,20 @@ buildPythonPackage rec {
     hash = "sha256-aRnbU3jN40xaCsoMFyRt1XB+hyIYMJP2b/T1yZho90c=";
   };
 
+  patches = [
+    # fix python3.12 build
+    (fetchpatch { # https://github.com/huggingface/diffusers/pull/7455
+      name = "001-remove-distutils.patch";
+      url = "https://github.com/huggingface/diffusers/compare/363699044e365ef977a7646b500402fa585e1b6b...3c67864c5acb30413911730b1ed4a9ad47c0a15c.patch";
+      hash = "sha256-Qyvyp1GyTVXN+A+lA1r2hf887ubTtaUknbKd4r46NZQ=";
+    })
+    (fetchpatch { # https://github.com/huggingface/diffusers/pull/7461
+      name = "002-fix-removed-distutils.patch";
+      url = "https://github.com/huggingface/diffusers/commit/efbbbc38e436a1abb1df41a6eccfd6f9f0333f97.patch";
+      hash = "sha256-scdtpX1RYFFEDHcaMb+gDZSsPafkvnIO/wQlpzrQhLA=";
+    })
+  ];
+
   nativeBuildInputs = [
     setuptools
     wheel

@GaetanLepage
Copy link
Contributor Author

Result of nixpkgs-review pr 310295 run on x86_64-linux 1

6 packages failed to build:
  • python312Packages.gradio
  • python312Packages.gradio-client
  • python312Packages.gradio-client.dist
  • python312Packages.gradio-pdf
  • python312Packages.gradio-pdf.dist
  • python312Packages.gradio.dist
6 packages built:
  • python311Packages.gradio
  • python311Packages.gradio-client
  • python311Packages.gradio-client.dist
  • python311Packages.gradio-pdf
  • python311Packages.gradio-pdf.dist
  • python311Packages.gradio.dist

@GaetanLepage
Copy link
Contributor Author

Result of nixpkgs-review pr 310295 run on aarch64-linux 1

12 packages built:
  • python311Packages.gradio
  • python311Packages.gradio-client
  • python311Packages.gradio-client.dist
  • python311Packages.gradio-pdf
  • python311Packages.gradio-pdf.dist
  • python311Packages.gradio.dist
  • python312Packages.gradio
  • python312Packages.gradio-client
  • python312Packages.gradio-client.dist
  • python312Packages.gradio-pdf
  • python312Packages.gradio-pdf.dist
  • python312Packages.gradio.dist

@GaetanLepage
Copy link
Contributor Author

Result of nixpkgs-review pr 310295 run on aarch64-darwin 1

12 packages failed to build:
  • python311Packages.gradio
  • python311Packages.gradio-client
  • python311Packages.gradio-client.dist
  • python311Packages.gradio-pdf
  • python311Packages.gradio-pdf.dist
  • python311Packages.gradio.dist
  • python312Packages.gradio
  • python312Packages.gradio-client
  • python312Packages.gradio-client.dist
  • python312Packages.gradio-pdf
  • python312Packages.gradio-pdf.dist
  • python312Packages.gradio.dist

@ofborg ofborg bot requested a review from natsukium May 10, 2024 13:26
@GaetanLepage
Copy link
Contributor Author

Result of nixpkgs-review pr 310295 run on x86_64-darwin 1

12 packages failed to build:
  • python311Packages.gradio
  • python311Packages.gradio-client
  • python311Packages.gradio-client.dist
  • python311Packages.gradio-pdf
  • python311Packages.gradio-pdf.dist
  • python311Packages.gradio.dist
  • python312Packages.gradio
  • python312Packages.gradio-client
  • python312Packages.gradio-client.dist
  • python312Packages.gradio-pdf
  • python312Packages.gradio-pdf.dist
  • python312Packages.gradio.dist

@pbsds
Copy link
Member

pbsds commented May 11, 2024

the diffusers commit is bogging down ofborg with timeouts. It's not complete anyway, so lets pop it off and merge the bumps

@GaetanLepage
Copy link
Contributor Author

Thanks for your patch @pbsds.
Unfortunately, some tests still fail:

=========================== short test summary info ============================
FAILED tests/models/autoencoders/test_models_vae.py::AutoncoderKLTemporalDecoderFastTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/transformers/test_models_prior.py::PriorTransformerTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/autoencoders/test_models_vae.py::AsymmetricAutoencoderKLTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/unets/test_models_unet_1d.py::UNet1DModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/autoencoders/test_models_vae.py::AutoencoderKLTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/autoencoders/test_models_vq.py::VQModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/autoencoders/test_models_vae.py::ConsistencyDecoderVAETests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/unets/test_models_unet_1d.py::UNetRLModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/unets/test_models_unet_2d.py::UNetLDMModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/autoencoders/test_models_vae.py::AutoencoderTinyTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/unets/test_models_unet_2d.py::NCSNppModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/unets/test_models_unet_2d.py::Unet2DModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/unets/test_models_unet_2d_condition.py::UNet2DConditionModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/unets/test_models_unet_spatiotemporal.py::UNetSpatioTemporalConditionModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call l>
FAILED tests/models/unets/test_models_unet_motion.py::UNetMotionModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
FAILED tests/models/unets/test_models_unet_3d_condition.py::UNet3DConditionModelTests::test_from_save_pretrained_dynamo - AssertionError: Traceback (most recent call last):
= 16 failed, 1825 passed, 1249 skipped, 1673 xfailed, 1917 warnings in 5137.49s (1:25:37) =

@GaetanLepage
Copy link
Contributor Author

Basically, it boils down to: RuntimeError: Dynamo is not supported on Python 3.12+.
Should we just disable those tests conditionally on 3.12 ?

@pbsds
Copy link
Member

pbsds commented May 11, 2024

They fail in diffusers right? The fix is in a commit i've yet to hunt down. The problem lies in pytorch according to the diffusers maintainers.

@GaetanLepage
Copy link
Contributor Author

They fail in diffusers right? The fix is in a commit i've yet to hunt down. The problem lies in pytorch according to the diffusers maintainers.

I skipped the dymano test on python 3.12.
It should now build fine. I am running nixpkgs-review.

@GaetanLepage
Copy link
Contributor Author

Result of nixpkgs-review pr 310295 run on aarch64-linux 1

16 packages built:
  • python311Packages.diffusers
  • python311Packages.diffusers.dist
  • python311Packages.gradio
  • python311Packages.gradio-client
  • python311Packages.gradio-client.dist
  • python311Packages.gradio-pdf
  • python311Packages.gradio-pdf.dist
  • python311Packages.gradio.dist
  • python312Packages.diffusers
  • python312Packages.diffusers.dist
  • python312Packages.gradio
  • python312Packages.gradio-client
  • python312Packages.gradio-client.dist
  • python312Packages.gradio-pdf
  • python312Packages.gradio-pdf.dist
  • python312Packages.gradio.dist

@GaetanLepage
Copy link
Contributor Author

Result of nixpkgs-review pr 310295 run on aarch64-darwin 1

10 packages failed to build:
  • python311Packages.diffusers
  • python311Packages.diffusers.dist
  • python311Packages.gradio
  • python311Packages.gradio-client
  • python311Packages.gradio-client.dist
  • python311Packages.gradio-pdf
  • python311Packages.gradio-pdf.dist
  • python311Packages.gradio.dist
  • python312Packages.gradio
  • python312Packages.gradio.dist
6 packages built:
  • python312Packages.diffusers
  • python312Packages.diffusers.dist
  • python312Packages.gradio-client
  • python312Packages.gradio-client.dist
  • python312Packages.gradio-pdf
  • python312Packages.gradio-pdf.dist

@drupol drupol merged commit acbbc1c into NixOS:master May 11, 2024
17 of 19 checks passed
@GaetanLepage GaetanLepage deleted the gradio-client branch May 11, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build failure: Gradio / Gradio Client
3 participants