-
Notifications
You must be signed in to change notification settings - Fork 451
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
Tags auto generation #6718
Tags auto generation #6718
Conversation
src/tribler-core/tribler_core/components/tag/rules/tag_rules.py
Outdated
Show resolved
Hide resolved
adee0c3
to
ba45b9d
Compare
e26b28e
to
a88db81
Compare
a802e7f
to
0a9212c
Compare
src/tribler-core/tribler_core/components/tag/rules/tag_rules_processor.py
Outdated
Show resolved
Hide resolved
src/tribler-core/tribler_core/components/tag/rules/tag_rules_processor.py
Outdated
Show resolved
Hide resolved
src/tribler-core/tribler_core/components/metadata_store/db/store.py
Outdated
Show resolved
Hide resolved
src/tribler-core/tribler_core/components/tag/rules/tag_rules_processor.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, great work 👍 . I left a few minor comments and some concerns regarding the tag processor.
src/tribler-core/tribler_core/components/metadata_store/db/store.py
Outdated
Show resolved
Hide resolved
src/tribler-core/tribler_core/components/tag/rules/tag_rules_processor.py
Show resolved
Hide resolved
src/tribler-core/tribler_core/components/tag/rules/tag_rules_processor.py
Outdated
Show resolved
Hide resolved
src/tribler-core/tribler_core/components/tag/rules/tag_rules_processor.py
Outdated
Show resolved
Hide resolved
src/tribler-core/tribler_core/components/tag/rules/tag_rules_processor.py
Outdated
Show resolved
Hide resolved
Could this error be related to this PR (Windows tests)?
|
I guess it could, but I'm not sure. |
0b3b4e1
to
48753d6
Compare
48753d6
to
15a545d
Compare
a70e233
to
0a5ea31
Compare
src/tribler-core/tribler_core/components/metadata_store/restapi/metadata_endpoint_base.py
Outdated
Show resolved
Hide resolved
0a5ea31
to
599caa6
Compare
Kudos, SonarCloud Quality Gate passed! |
🤔 maybe wait with merging until the PR pipeline can complete? |
retest this please |
3 similar comments
retest this please |
retest this please |
retest this please |
This PR is a part of #6214 and it introduces automatic tags extraction from torrent titles.
The following rules have been added:
title [tag1, tag2, tag3]
title (tag1, tag2, tag3)
title.tag
The tags could be extracted for all new torrents and they could be extracted for existing torrents in the background.
The extraction procedure for all new tags is pretty straightforward, they are just processed at the moment when they adding to MDS.
The background extraction procedure is a bit more complicated. This extraction makes by processing a batch of items. Every 10 seconds a batch of 1000 items has been processed. In the case tag rules processor rich the upper bound of DB, it starts from the beginning, but with increased interval (20 seconds) and increased batch size (2000 items).
Why 1000 items and 10 seconds? It is not too heavy for CPU and with these values, 360k items will be processed within the hour.
To distinguish processed items, the
tag_version
column has been added toTorrentMetadata
:Therefore it could be used in the future when we will process multiple incoming rules (we should just increase this value by 1 for each new rule set).