Skip to content

Handle missing concepts more gracefully #493

@adelavega

Description

@adelavega

This error happens when a selected_concept is passed to Clarifai which does not get found in the stimuli

  File "/home/zorro/anaconda3/envs/pliers/lib/python3.12/site-packages/pliers/extractors/base.py", line 19, in transform
    result = super().transform(stim, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zorro/anaconda3/envs/pliers/lib/python3.12/site-packages/pliers/transformers/base.py", line 56, in wrapper
    result = transform(self, stim, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zorro/anaconda3/envs/pliers/lib/python3.12/site-packages/pliers/transformers/base.py", line 105, in transform
    iters = self._iterate(stims, validation=validation, *args,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zorro/anaconda3/envs/pliers/lib/python3.12/site-packages/pliers/transformers/base.py", line 259, in _iterate
    result = batch_results[target_inds[key]]
             ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions