Coder Social home page Coder Social logo

Comments (1)

zy-uu avatar zy-uu commented on July 18, 2024

环境:

Jinja2  - 2.11.3
MarkupSafe - 2.1.5
Werkzeug - 3.0.1

最后报错:

{'loss': 0.0, 'learning_rate': 7.692307692307693e-09, 'epoch': 426.23}
{'train_runtime': 39478.1948, 'train_samples_per_second': 7.903, 'train_steps_per_second': 1.317, 'train_loss': 0.0005290311501030626, 'epoch': 426.23}
Traceback (most recent call last):
  File "finetune.py", line 132, in <module>
    main()
  File "finetune.py", line 128, in main
    model.save_pretrained(training_args.output_dir)
  File "/opt/conda/lib/python3.8/site-packages/peft/peft_model.py", line 210, in save_pretrained
    self.create_or_update_model_card(save_directory)
  File "/opt/conda/lib/python3.8/site-packages/peft/peft_model.py", line 795, in create_or_update_model_card
    card = ModelCard.load(filename) if os.path.exists(filename) else ModelCard.from_template(ModelCardData())
  File "/opt/conda/lib/python3.8/site-packages/huggingface_hub/repocard.py", line 405, in from_template
    return super().from_template(card_data, template_path, **template_kwargs)
  File "/opt/conda/lib/python3.8/site-packages/huggingface_hub/repocard.py", line 314, in from_template
    import jinja2
  File "/opt/conda/lib/python3.8/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/opt/conda/lib/python3.8/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/opt/conda/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/opt/conda/lib/python3.8/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/opt/conda/lib/python3.8/site-packages/markupsafe/__init__.py)

这是包冲突的问题吗

from chatglm-tuning.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.