You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.
Predicting on a Fiftyone dataset is unable to load the data properly. Training, validating and testing works fine. When loading data for prediction, datamodule created from fifty one dataset yields labels which datamodule cannot handle.
To Reproduce
Steps to reproduce the behavior:
Error:
Traceback (most recent call last):
File "/home/miniconda3/envs/astrib/lib/python3.9/code.py", line 90, in runcode
exec(code, self.locals)
File "<input>", line 13, in <module>
File "/home/miniconda3/envs/astrib/lib/python3.9/site-packages/flash/image/classification/data.py", line 304, in from_fiftyone
input_cls(RunningStage.PREDICTING, predict_dataset, transform=predict_transform, **ds_kw),
File "/home/miniconda3/envs/astrib/lib/python3.9/site-packages/flash/core/data/io/input.py", line 140, in wrapper
fn(self, *args, **kwargs)
File "/home/miniconda3/envs/astrib/lib/python3.9/site-packages/flash/core/data/io/input.py", line 200, in __init__
self.data = self._call_load_data(*args, **kwargs)
File "/home/miniconda3/envs/astrib/lib/python3.9/site-packages/flash/core/data/io/input.py", line 222, in _call_load_data
return load_data(*args, **kwargs)
TypeError: predict_load_data() got an unexpected keyword argument 'label_field'
In my opinion the problem is this method @staticmethod @requires("fiftyone") def predict_load_data(data: SampleCollection) -> List[Dict[str, Any]]: return super().load_data(data.values("filepath"))
because it is used for the prediction dataloader and in fact it didn't accept the key label_field
A possible solution could be @requires("fiftyone") def predict_load_data(self, data: SampleCollection, **kwargs) -> List[Dict[str, Any]]: return super().load_data(data.values("filepath"))
in this way is used the method load_data of the class ImageClassificationFilesInput that is able to manage the case in which label_field is None, but maybe exists a different solution
🐛 Bug
Predicting on a Fiftyone dataset is unable to load the data properly. Training, validating and testing works fine. When loading data for prediction, datamodule created from fifty one dataset yields labels which datamodule cannot handle.
To Reproduce
Steps to reproduce the behavior:
Error:
Code sample
Expected behavior
When predicting on Fiftyone dataset that also contains labels, these labels should be ignored.
Environment
Additional context
The text was updated successfully, but these errors were encountered: