Skip to content

Commit

Permalink
Type fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Feb 7, 2024
1 parent e6e99cb commit 307d194
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion medcat/config_rel_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Train(MixingConfig, BaseModel):
max_grad_norm: float = 1.0
shuffle_data: bool = True
"""Used only during training, if set the dataset will be shuffled before train/test split"""
class_weights: float = None
class_weights: Optional[Any] = None
score_average: str = "weighted"
"""What to use for averaging F1/P/R across labels"""
auto_save_model: bool = True
Expand Down
2 changes: 1 addition & 1 deletion medcat/rel_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def load(cls, load_path: str = "./") -> "RelCAT":
config = cast(ConfigRelCAT, ConfigRelCAT.load(os.path.join(load_path, "config.json")))

tokenizer = None
tokenizer_path = os.path.join([load_path, config.general.tokenizer_name])
tokenizer_path = os.path.join(load_path, config.general.tokenizer_name)

if os.path.exists(tokenizer_path):
tokenizer = TokenizerWrapperBERT.load(tokenizer_path)
Expand Down

0 comments on commit 307d194

Please sign in to comment.