Closed darrenjkt closed 1 month ago
@darrenjkt apologies for the delay 😅
The solution here is to use:
view = dataset.exists("condition").match(F("condition").contains("rain"))
Unfortunately contains()
does not gracefully handle missing/None-valued fields, so we add exists()
first to filter out these samples.
Describe the problem
I have a sample field, "condition", which is a list that contains strings such as "rain", "sunny" etc. When I try to filter samples by this sample field, I get an error when viewing the dataset
Code to reproduce issue
The following also throws the exact same error:
System information
python --version
): Python 3.8.10fiftyone --version
): 0.24.1Other info/logs
Error log:
Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?