Skip to content

[BUG] Error when using select_fields=True option of load_evaluation_view() #1945

Closed
@brimoor

Description

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")
dataset.clone_sample_field("predictions", "predictions2")

dataset.evaluate_detections("predictions", gt_field="ground_truth", eval_key="eval")
dataset.evaluate_detections("predictions2", gt_field="ground_truth", eval_key="eval2")

view = dataset.load_evaluation_view("eval", select_fields=True)
print(view.first())
File ~/dev/fiftyone/fiftyone/core/collections.py:2266, in SampleCollection.load_evaluation_view(self, eval_key, select_fields)
   2254 def load_evaluation_view(self, eval_key, select_fields=False):
   2255     """Loads the :class:`fiftyone.core.view.DatasetView` on which the
   2256     specified evaluation was performed on this collection.
   2257 
   (...)
   2264         a :class:`fiftyone.core.view.DatasetView`
   2265     """
-> 2266     return foev.EvaluationMethod.load_run_view(
   2267         self, eval_key, select_fields=select_fields
   2268     )

File ~/dev/fiftyone/fiftyone/core/runs.py:548, in Run.load_run_view(cls, samples, key, select_fields)
    545         continue
    547     for field in cls._get_run_fields(samples, _key):
--> 548         if "." in field and field.startswith(root_fields):
    549             _exclude_fields.append(field)
    551 if _exclude_fields:

TypeError: startswith first arg must be str or a tuple of str, not list

Metadata

Assignees

No one assigned

    Labels

    bugBug fixescoreIssues related to Core features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions