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

Upgrade seqio to upstream to workaround the MaxText dependency issue for inference #1225

Merged
merged 6 commits into from
Jan 5, 2025

Conversation

gpupuck
Copy link
Contributor

@gpupuck gpupuck commented Jan 3, 2025

Default version built with MaxText image is seqio==0.0.16 which introduces error

0: Traceback (most recent call last):
0:   File "/opt/maxtext/MaxText/inference_microbenchmark.py", line 26, in <module>
0:     from jetstream.engine import token_utils
0:   File "/opt/jetstream/jetstream/engine/token_utils.py", line 24, in <module>
0:     from seqio.vocabularies import SentencePieceVocabulary
0:   File "/usr/local/lib/python3.12/dist-packages/seqio/__init__.py", line 18, in <module>
0:     from seqio.dataset_providers import *
0:   File "/usr/local/lib/python3.12/dist-packages/seqio/dataset_providers.py", line 60, in <module>
0:     @dataclasses.dataclass(frozen=True)
0:      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0:   File "/usr/lib/python3.12/dataclasses.py", line 1258, in wrap
0:     return _process_class(cls, init, repr, eq, order, unsafe_hash,
0:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0:   File "/usr/lib/python3.12/dataclasses.py", line 994, in _process_class
0:     cls_fields.append(_get_field(cls, name, type, kw_only))
0:                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0:   File "/usr/lib/python3.12/dataclasses.py", line 852, in _get_field
0:     raise ValueError(f'mutable default {type(f.default)} for field '
0: ValueError: mutable default <class 'seqio.vocabularies.PassThroughVocabulary'> for field vocabulary is not allowed: use default_factory

Upgrade seqio to directly use upstream repo to workaround the issue. (This is not the perfect but workable solution)

@gpupuck gpupuck requested a review from DwarKapex January 3, 2025 21:55
@DwarKapex DwarKapex merged commit 4f388bd into 25.01-devel Jan 5, 2025
158 of 181 checks passed
@DwarKapex DwarKapex deleted the by/upgrade-seqio branch January 5, 2025 03:49
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.

2 participants