Skip to content
Snippets Groups Projects
Commit b21ac274 authored by Philip ABBET's avatar Philip ABBET
Browse files

[scripts.predict] Fix call to 'load_from_checkpoint()'

Since lightning 2.1.0, the error "The classmethod `Pasa.load_from_checkpoint`
cannot be called on an instance." was returned when this method was called,
making the tests fail.
parent 695e7029
No related branches found
No related tags found
1 merge request!6Making use of LightningDataModule and simplification of data loading
Pipeline #82026 failed
......@@ -134,7 +134,7 @@ def predict(
datamodule.setup(stage="predict")
logger.info(f"Loading checkpoint from `{weight}`...")
model = model.load_from_checkpoint(weight, strict=False)
model = type(model).load_from_checkpoint(weight, strict=False)
predictions = run(model, datamodule, DeviceManager(device))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment