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

Build failure: python311Packages.wandb #349691

Closed
jackmac92 opened this issue Oct 19, 2024 · 4 comments · Fixed by #350098
Closed

Build failure: python311Packages.wandb #349691

jackmac92 opened this issue Oct 19, 2024 · 4 comments · Fixed by #350098
Labels

Comments

@jackmac92
Copy link

Describe the bug

Aider chat breaks home-manager build on ubuntu, seems to be since 1a7ad9e

aider-chat is only present on nixpkgs-unstable, so maybe just a deal with it. but want it to work so thought I'd report

@jackmac92 jackmac92 added the 0.kind: bug Something is broken label Oct 19, 2024
@ghpzin
Copy link
Contributor

ghpzin commented Oct 19, 2024

Please use Build failure template while creating issues of this kind in the future.
And ping listed package maintainers there, otherwise chances of them noticing this issue are very low.


Build on Hydra:
https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.aider-chat.x86_64-linux
https://hydra.nixos.org/build/275627126

Fails on building its' dependency - python311Packages.wandb:
https://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.python311Packages.wandb.x86_64-linux
https://hydra.nixos.org/build/275637406

Listed maintainer for python311Packages.wandb:
@samuela

Error log:

  File "/nix/store/570k2mvf9qs83v5v7x02j9i66xcwhq27-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/apis/__init__.py", line 43, in <module>
    from .internal import Api as InternalApi  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/570k2mvf9qs83v5v7x02j9i66xcwhq27-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/apis/internal.py", line 3, in <module>
    from wandb.sdk.internal.internal_api import Api as InternalApi
  File "/nix/store/570k2mvf9qs83v5v7x02j9i66xcwhq27-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/internal/internal_api.py", line 48, in <module>
    from ..lib import retry
  File "/nix/store/570k2mvf9qs83v5v7x02j9i66xcwhq27-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/lib/retry.py", line 17, in <module>
    from .mailbox import ContextCancelledError
  File "/nix/store/570k2mvf9qs83v5v7x02j9i66xcwhq27-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/lib/mailbox.py", line 102, in <module>
    class _MailboxSlot:
  File "/nix/store/570k2mvf9qs83v5v7x02j9i66xcwhq27-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/lib/mailbox.py", line 103, in _MailboxSlot
    _result: Optional[pb.Result]
                      ^^^^^^^^^
AttributeError: module 'wandb.proto.wandb_internal_pb2' has no attribute 'Result'

Based on error message and looking at upstream issues/PRs:
wandb/wandb#7979
it is probably using incompatible protobuf version (thought version in nixpkgs does not include that upstream PR that would message it more explicitly).
Looking at 0.16.0 that is in nixpkgs:
https://github.com/wandb/wandb/blob/c6b7a82a152e8efee84cb7f0887532c482ccd6c1/pyproject.toml#L24
it does not seem to support python311Packages.protobuf5 which became default in #338885

@dotlambda dotlambda changed the title aider-chat broken on nixpkgs-unstable Build failure: python311Packages.wandb Oct 20, 2024
@dotlambda dotlambda added 6.topic: python 0.kind: build failure A package fails to build and removed 0.kind: bug Something is broken labels Oct 20, 2024
@samuela
Copy link
Member

samuela commented Oct 20, 2024

what's the relationship between aider-chat and wandb exactly?

@ghpzin
Copy link
Contributor

ghpzin commented Oct 20, 2024

Seems like wandb is one of its dependencies, just not direct.

nix why-depends /nix/store/2n2psa3qx3shxxfsm5jjf4vqm97v7xlc-aider-chat-0.59.0.drv /nix/store/xx
g3z59j59asswpr12zlf3mq1qh91r6i-python3.11-wandb-0.16.0.drv

/nix/store/2n2psa3qx3shxxfsm5jjf4vqm97v7xlc-aider-chat-0.59.0.drv
└───/nix/store/5xgkbcjfq1aqn08m9z5zmkrd5b58p0pw-python3.11-llama-index-core-0.11.16.drv
    └───/nix/store/3g70cj2nsj7l09qg61bjkhmhayj16gga-python3.11-spacy-3.8.2.drv
        └───/nix/store/1m7ffm984n5d42k37cp8ym2y7gjwlz99-python3.11-spacy-loggers-1.0.5.drv
            └───/nix/store/xxg3z59j59asswpr12zlf3mq1qh91r6i-python3.11-wandb-0.16.0.drv

@dotlambda
Copy link
Member

what's the relationship between aider-chat and wandb exactly?

python311Packages.wandb fails to build with

Check whether the following modules can be imported: wandb
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 1, in <lambda>
  File "/nix/store/0bygl9k94j0xkxq7cmxnpqdqf8va5k7j-python3-3.11.10/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/__init__.py", line 27, in <module>
    from wandb import sdk as wandb_sdk
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/__init__.py", line 4, in <module>
    from .artifacts.artifact import Artifact  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/artifacts/artifact.py", line 36, in <module>
    from wandb.apis.normalize import normalize_exceptions
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/apis/__init__.py", line 43, in <module>
    from .internal import Api as InternalApi  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/apis/internal.py", line 3, in <module>
    from wandb.sdk.internal.internal_api import Api as InternalApi
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/internal/internal_api.py", line 48, in <module>
    from ..lib import retry
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/lib/retry.py", line 17, in <module>
    from .mailbox import ContextCancelledError
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/lib/mailbox.py", line 102, in <module>
    class _MailboxSlot:
  File "/nix/store/g5s7lmgs4dznnmqzycs3gs0b5szfpxsn-python3.11-wandb-0.16.0/lib/python3.11/site-packages/wandb/sdk/lib/mailbox.py", line 103, in _MailboxSlot
    _result: Optional[pb.Result]
                      ^^^^^^^^^
AttributeError: module 'wandb.proto.wandb_internal_pb2' has no attribute 'Result'

That in turn causes aider-chat to fail down the line.

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

Successfully merging a pull request may close this issue.

4 participants