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
Added support for multiple loggers (tensorboard, wandb, comet_ml, aim, mlflow, clearml, dvclive, csv, json, rich) in edsnlp.train via the logger parameter. Default is [json and rich] for backward compatibility.
Added clickable snippets in the documentation for more registered functions
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 70-73
else:
- for span in candidates:- if span.label_ in span_filter:- yield span
Was already missing at lines 77-79
if span_getter is None:
- yield doc[:], None- return
if callable(span_getter):
Was already missing at lines 80-82
if callable(span_getter):
- yield from span_getter(doc)- return
for key, span_filter in span_getter.items():
Was already missing at line 84
if key == "*":
- candidates = (
(span, group) for group in doc.spans.values() for span in group
Was already missing at lines 93-96
else:
- for span, group in candidates:- if span.label_ in span_filter:- yield span, group
Was already missing at line 100
if callable(span_setter):
- span_setter(doc, matches)
else:
Was already missing at line 142
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 180
elif isinstance(v, str):
- new_value[k] = [v]
elif isinstance(v, list) and all(isinstance(i, str) for i in v):
229
14
0
93.89%
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 160-164
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 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 474-476
version = version or pyproject["project"]["version"]
- except (KeyError, TypeError):- version = "0.1.0"
name = name or pyproject["project"]["name"]
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
tensorboard
,wandb
,comet_ml
,aim
,mlflow
,clearml
,dvclive
,csv
,json
,rich
) inedsnlp.train
via thelogger
parameter. Default is [json
andrich
] for backward compatibility.Checklist