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

✨ Update to v3.3.2 #51

Merged
merged 24 commits into from
May 1, 2022
Merged

✨ Update to v3.3.2 #51

merged 24 commits into from
May 1, 2022

Conversation

malakhovks
Copy link
Owner

@malakhovks malakhovks commented May 1, 2022

v3.3.2, 2021-05-01

🔴 Виправлення помилок

ENG🇬🇧

  • виправлено помилку nlp.max_length limit exceeded:
    Text of length 1195652 exceeds maximum of 1000000. The parser and NER models require roughly 1GB of temporary memory per 100,000 characters in the input. This means long texts may cause memory allocation errors. If you're not using the parser or NER, it's probably safe to increase the nlp.max_length limit. The limit is in number of characters, so you can check whether your inputs are too long by checking len(text).
    Встановлено ліміт NLP_EN.max_length = 5000000;

  • виправлено помилку ImportError: cannot import name 'escape' from 'jinja2':
    This happens because Jinja has removed those functions in a recent version — 3.1.0 — released on March 24th, 2022.

    Markup and escape should be imported from MarkupSafe.

    You have two options form here:

    1. either this error comes from one of your dependency.
      The first thing you should consider is to upgrade the said dependence(s). If this is not possible, what you can do, from here is to downgrade your Jinja version to a version that would still include escape, for example, adding it explicitly in your requirements.txt:
    jinja2<3.1.0
    
    1. or, your error is from code you wrote, so you can fix it by importing it from MarkupSafe, as suggested in the Jinja release notes.

    So, you should use

    from markupsafe import escape

    instead of

    from jinja2 import escape

    При використанні Flask==1.1.2 треба зафікмувати наступні залежності: jinja2<3.1.0; itsdangerous==2.0.1, Werkzeug<2.0.0;

  • дрібні виправлення коду.

⚠️ Зауваження

ENG🇬🇧

  • оновлено бібліотеку spaCy до версії 3.0.6;
  • встановлено keepalive_timeout 1050 для nginx;

- update to v3.3.1
update spaCy up to `3.0.6`
* update spaCy up to `3.0.8`;

update spaCy up to `3.0.8`;

* Fix maximum Text of length of nlp

Fix Text of length nlp exceeds maximum of 1000000. Set nlp up to `NLP_EN.max_length = 2000000`
fix `ImportError: cannot import name 'escape' from 'jinja2`:

Jinja is a dependency of Flask and Flask V1.X.X uses the escape module from Jinja, however recently support for the escape module was dropped in newer versions of Jinja.

To fix this issue, simply update to the newer version of Flask V2.X.X in your requirements.txt where Flask no longer uses the escape module from Jinja.

Flask==2.1.2
revert spacy to 3.0.8
update spaCy up to `3.1.6`
Set Flask to 2.0.3
Set Flask==1.1.2
Set jinja2<3.1.0
Set itsdangerous==2.0.1
Cleanup
Set Werkzeug < 2.0.0
Set spacy to 3.0.8
Set spacy to 3.0.6
Set keepalive_timeout   1050
Set NLP_EN.max_length = 5000000
Set keepalive_timeout   1550
add big test file for en
Set keepalive_timeout   1050
Update to v3.3.2
@malakhovks malakhovks merged commit 84270f0 into master May 1, 2022
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.

1 participant