Skip to content

Commit d19cbe3

Browse files
committed
Merge branch 'mixin/pt-init' of https://github.com/Lightning-AI/models into mixin/pt-init
2 parents bc44b4d + fb0d126 commit d19cbe3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/litmodels/integrations/mixins.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def push_to_registry(
148148
except Exception as e:
149149
raise RuntimeError(
150150
f"Failed to save model arguments: {e}."
151-
" Ensure the models arguments are JSON serializable or user `PickleRegistryMixin`."
151+
" Ensure the model's arguments are JSON serializable or use `PickleRegistryMixin`."
152152
) from e
153153
elif not hasattr(self, "__init_kwargs"):
154154
rank_zero_warn(
@@ -160,7 +160,7 @@ def push_to_registry(
160160
torch_state_dict_path = Path(temp_folder) / f"{model_name}.pth"
161161
torch.save(self.state_dict(), torch_state_dict_path)
162162
model_registry = f"{name}:{version}" if version else name
163-
# todo: consider created another temp folder and copy there these two files
163+
# todo: consider creating another temp folder and copying these two files
164164
upload_model_files(name=model_registry, path=temp_folder)
165165

166166
@classmethod

tests/integrations/test_cloud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def test_pickle_mixin_push_and_pull():
244244

245245
# This is a dummy model for PyTorch that uses the PyTorchRegistryMixin.
246246
# This mixin has to be first in the inheritance order.
247-
# Otherwise, `PyTorchRegistryMixin.__init__` nee to be called explicitly.
247+
# Otherwise, `PyTorchRegistryMixin.__init__` need to be called explicitly.
248248
class DummyTorchModel(PyTorchRegistryMixin, torch.nn.Module):
249249
def __init__(self, input_size: int, output_size: int = 10):
250250
# PyTorchRegistryMixin.__init__ will capture these arguments

0 commit comments

Comments
 (0)