You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New edsnlp.external_information_qualifier to qualify spans in a document based on external information and a defined distance to these contextual/external elements as is done in Distant Supervision.
New eds.contextual_qualifier pipeline component to qualify spans based on contextual information.
Add the fixture edsnlp_blank_nlp for the test.
Fixed
Correct the contributing documentation. Delete $ pre-commit run --all-filesrecommendation.
Fix the the Obj Class in the doc template class.html.
Fix the get_pipe_meta function.
Checklist
If this PR is a bug fix, the bug is documented in the test suite.
Changes were documented in the changelog (pending section).
If necessary, changes were made to the documentation (eg new pipeline).
if torch.Tensor in copyreg.dispatch_table:
- old_dispatch[torch.Tensor] = copyreg.dispatch_table[torch.Tensor]
copyreg.pickle(torch.Tensor, reduce_empty)
83
9
0
89.16%
edsnlp/utils/span_getters.py
Was already missing at lines 52-55
else:
- for span in candidates:- if span.label_ in span_filter:- yield span
Was already missing at lines 59-61
if span_getter is None:
- yield doc[:], None- return
if callable(span_getter):
Was already missing at lines 62-64
if callable(span_getter):
- yield from span_getter(doc)- return
for key, span_filter in span_getter.items():
Was already missing at line 66
if key == "*":
- candidates = (
(span, group) for group in doc.spans.values() for span in group
Was already missing at lines 75-78
else:
- for span, group in candidates:- if span.label_ in span_filter:- yield span, group
Was already missing at line 82
if callable(span_setter):
- span_setter(doc, matches)
else:
Was already missing at line 124
elif isinstance(v, str):
- new_value[k] = [v]
elif isinstance(v, list) and all(isinstance(i, str) for i in v):
Was already missing at line 162
elif isinstance(v, str):
- new_value[k] = [v]
elif isinstance(v, list) and all(isinstance(i, str) for i in v):
149
14
0
90.60%
edsnlp/utils/resources.py
Was already missing at line 33
if not verbs:
- return conjugated_verbs
24
1
0
95.83%
edsnlp/utils/numbers.py
Was already missing at line 34
else:
- string = s
string = string.lower().strip()
self.on_stop()
- except BaseException as e:
...
- self.main_control_queue.put(e)
finally:
Was already missing at lines 396-398
pass
- except StopSignal:- pass
for name, queue in self.consumer_queues(stage):
Was already missing at line 536
while schedule[task_idx] is None:
- task_idx = (task_idx + 1) % len(schedule)
Was already missing at lines 600-602
if isinstance(docs, StreamSentinel):
- self.active_batches[stage].append([None, None, None, docs])- continue
batch_id = str(hash(tuple(id(x) for x in docs)))[-8:] + "-" + self.uid
if not consultation_mention:
- consultation_mention = []
elif consultation_mention is True:
48
2
0
95.83%
edsnlp/pipes/core/normalizer/__init__.py
Was already missing at line 7
def excluded_or_space_getter(t):
- return t.is_space or t.tag_ == "EXCLUDED"
5
1
0
80.00%
edsnlp/pipes/core/endlines/endlines.py
Was already missing at lines 156-160
if end_lines_model is None:
- path = build_path(__file__, "base_model.pkl")-- with open(path, "rb") as inp:- self.model = pickle.load(inp)
elif isinstance(end_lines_model, str):
if isinstance(v, list):
- assert (- len(v) == 2- ), "`window` should be a tuple/list of two integer, or a single integer"- v = tuple(v)
if isinstance(v, int):
if assigned is None:
- continue
if replace_entity:
143
2
0
98.60%
edsnlp/patch_spacy.py
Was already missing at lines 67-69
# if module is reloaded.
- existing_func = registry.factories.get(internal_name)- if not util.is_same_func(factory_func, existing_func):
raise ValueError(
31
2
0
93.55%
edsnlp/package.py
Was already missing at lines 478-480
version = version or pyproject["project"]["version"]
- except (KeyError, TypeError):- version = "0.1.0"
name = name or pyproject["project"]["name"]
* fix: resulting tuning config file now preserve comments
* add cfg/ini support, update tutorial and pyproject
* update unit test
* Update unit test to verify comments are preserved correctly
* Update dependencies in tutrial
* feat: add checkpoint management for tuning
* feat: add checkpoint management for tuning
* add checkpoints unit tests
* update tutorial
* add constant for checkpoint name and remove unused line in two phase
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Added
edsnlp.external_information_qualifier
to qualify spans in a document based on external information and a defined distance to these contextual/external elements as is done in Distant Supervision.eds.contextual_qualifier
pipeline component to qualify spans based on contextual information.edsnlp_blank_nlp
for the test.Fixed
$ pre-commit run --all-files
recommendation.Obj Class
in the doc templateclass.html
.get_pipe_meta
function.Checklist