Skip to content

Update serialization #10584

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

Merged
merged 2 commits into from
May 14, 2025
Merged

Update serialization #10584

merged 2 commits into from
May 14, 2025

Conversation

ZHUI
Copy link
Collaborator

@ZHUI ZHUI commented May 13, 2025

Before submitting

  • Lint code. If there are lint issues, please format the code first.
# Install and register `pre-commit` in the project folder
pip install pre-commit && pre-commit install

# Process previous code files separately
pre-commit run --file XXXX.py
  • Add test cases into tests folder. If there are codecov issues, please add tests cases first.

PR types

BugFixes

PR changes

Others

Description

___________________________________________________________ ERROR collecting tests/models/test_internvl2.py ___________________________________________________________
ImportError while importing test module '/home/PaddleMIX/tests/models/test_internvl2.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/models/test_internvl2.py:26: in <module>
    from paddlemix.models.internvl2.conversation import get_conv_template
paddlemix/__init__.py:16: in <module>
    from .datasets import *
paddlemix/datasets/__init__.py:19: in <module>
    from .chatml_dataset import *
paddlemix/datasets/chatml_dataset.py:18: in <module>
    from paddlenlp.transformers.tokenizer_utils import ChatTemplateMixin
PaddleNLP/paddlenlp/__init__.py:34: in <module>
    from paddlenlp.utils.log import logger
PaddleNLP/paddlenlp/utils/__init__.py:33: in <module>
    from .serialization import load_torch
PaddleNLP/paddlenlp/utils/serialization.py:28: in <module>
    from paddlenlp.transformers.utils import device_guard
PaddleNLP/paddlenlp/transformers/__init__.py:17: in <module>
    from .model_utils import PretrainedModel, register_base_model
PaddleNLP/paddlenlp/transformers/model_utils.py:77: in <module>
    from ..generation import GenerationConfig, GenerationMixin
PaddleNLP/paddlenlp/generation/__init__.py:33: in <module>
    from .streamers import BaseStreamer, TextIteratorStreamer, TextStreamer
PaddleNLP/paddlenlp/generation/streamers.py:18: in <module>
    from paddlenlp.transformers.tokenizer_utils import PretrainedTokenizer
PaddleNLP/paddlenlp/transformers/tokenizer_utils.py:47: in <module>
    from ..data.vocab import Vocab
PaddleNLP/paddlenlp/data/__init__.py:18: in <module>
    from .data_collator import *
PaddleNLP/paddlenlp/data/data_collator.py:26: in <module>
    from ..transformers import BertTokenizer
E   ImportError: cannot import name 'BertTokenizer' from partially initialized module 'paddlenlp.transformers' (most likely due to a circular import) (/home/PaddleMIX/PaddleNLP/paddlenlp/transformers/__init__.py)

Copy link

paddle-bot bot commented May 13, 2025

Thanks for your contribution!

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link

codecov bot commented May 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.98%. Comparing base (8205e3d) to head (e790b1a).
Report is 6 commits behind head on develop.

Current head e790b1a differs from pull request most recent head 0680c0c

Please upload reports for the commit 0680c0c to get more accurate results.

❌ Your project status has failed because the head coverage (46.98%) is below the target coverage (58.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #10584   +/-   ##
========================================
  Coverage    46.98%   46.98%           
========================================
  Files          799      799           
  Lines       132246   132246           
========================================
+ Hits         62135    62136    +1     
+ Misses       70111    70110    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ZHUI ZHUI merged commit 2b1efb2 into develop May 14, 2025
9 of 12 checks passed
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