Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit bec80eb

Browse files
committed
RelCAT: flake8 fixes.
1 parent d58227b commit bec80eb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

medcat/utils/relation_extraction/ml_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def split_list_train_test_by_class(data: List, sample_limit: int = -1, test_size
2323
Args:
2424
data (List): "output_relations": relation_instances, <-- see create_base_relations_from_doc/csv
2525
for data columns
26-
sample_limit (int, optional): limit the number of samples per class, useful for dataset balancing . Defaults to -1.
26+
sample_limit (int): limit the number of samples per class, useful for dataset balancing . Defaults to -1.
2727
test_size (float): Defaults to 0.2.
2828
shuffle (bool): shuffle data randomly. Defaults to True.
2929

medcat/utils/relation_extraction/rel_dataset.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ def _create_relation_validation(self,
194194
ent2_end_char_pos (int): ent2 end char pos
195195
ent1_token_start_pos (int): ent1_token_start_pos. Defaults to -1.
196196
ent2_token_start_pos (int): ent2_token_start_pos. Defaults to -1.
197-
ent1_token_end_pos (int, optional): ent1_token_end_pos. Defaults to -1.
198-
ent2_token_end_pos (int, optional): ent2_token_end_pos. Defaults to -1.
199-
is_spacy_doc (bool, optional): checks if doc is spacy docs. Defaults to False.
200-
is_mct_export (bool, optional): chekcs if doc is a mct export. Defaults to False.
197+
ent1_token_end_pos (int): ent1_token_end_pos. Defaults to -1.
198+
ent2_token_end_pos (int): ent2_token_end_pos. Defaults to -1.
199+
is_spacy_doc (bool): checks if doc is spacy docs. Defaults to False.
200+
is_mct_export (bool): chekcs if doc is a mct export. Defaults to False.
201201
202202
Returns:
203203
List: row containing rel data ["relation_token_span_ids", "ent1_ent2_start", "ent1", "ent2", "label",

0 commit comments

Comments
 (0)