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

🐛 Fixed bug in pipeline config with mentions and entities #26

Merged
merged 1 commit into from
Oct 28, 2022

Conversation

marmg
Copy link
Collaborator

@marmg marmg commented Oct 28, 2022

Status Type ⚠️ Core Change Issue
Ready Bug Yes Link

Problem

What problem are you trying to solve?

When using both mentions and entities in PipelineConfig, if they have the same first and last element the hash will be the same, thus the mentions will be overridden with the entities.

Solution

How did you solve the problem?

In PipelineConfig, now the hashing is done by taking 10 random items from the list of entities/mentions, or all of them if there are less than 10.

Other changes (e.g. bug fixes, small refactors)

Added conversion to Entity when a list of strings is passed.

Closes #25

Signed-off-by: Marcos Martinez <Marcos.Martinez.Galindo@ibm.com>
@codecov
Copy link

codecov bot commented Oct 28, 2022

Codecov Report

Base: 91.69% // Head: 91.72% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (7e1c47e) compared to base (ee170c6).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   91.69%   91.72%   +0.02%     
==========================================
  Files          53       53              
  Lines        2024     2030       +6     
==========================================
+ Hits         1856     1862       +6     
  Misses        168      168              
Impacted Files Coverage Δ
zshot/pipeline_config.py 100.00% <100.00%> (ø)
zshot/zshot.py 95.87% <100.00%> (+0.17%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marmg marmg merged commit 79c1d29 into main Oct 28, 2022
@marmg marmg deleted the fix/pipeline-config-hashing branch October 28, 2022 18:10
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.

[Bug] Mentions are override with Entities when both have first and last item in common
1 participant