Skip to content

Commit

Permalink
feat: rename load_pretrained_model to from_pretrained_model (#957)
Browse files Browse the repository at this point in the history
### Summary of Changes

Rename methods to create NNs from pretrained models to
`from_pretrained_model` to fit the pattern of other static factory
methods.
  • Loading branch information
lars-reimann authored Nov 26, 2024
1 parent f5d6324 commit 5b32acc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/safeds/ml/nn/_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(
self._total_number_of_epochs_done = 0

@staticmethod
def load_pretrained_model(huggingface_repo: str) -> NeuralNetworkRegressor: # pragma: no cover
def from_pretrained_model(huggingface_repo: str) -> NeuralNetworkRegressor: # pragma: no cover
"""
Load a pretrained model from a [Huggingface repository](https://huggingface.co/models/).
Expand Down Expand Up @@ -703,7 +703,7 @@ def __init__(
self._total_number_of_epochs_done = 0

@staticmethod
def load_pretrained_model(huggingface_repo: str) -> NeuralNetworkClassifier: # pragma: no cover
def from_pretrained_model(huggingface_repo: str) -> NeuralNetworkClassifier: # pragma: no cover
"""
Load a pretrained model from a [Huggingface repository](https://huggingface.co/models/).
Expand Down

0 comments on commit 5b32acc

Please sign in to comment.