PsychoinformaticsLab / pliers

Automated feature extraction in Python
https://pliers.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
296 stars 68 forks source link

Move to Clarifai-GRPC library #474

Closed adelavega closed 2 years ago

adelavega commented 2 years ago

Closes #469

In order to make a call now, you also need to provide a CLARIFAI_USER_ID and CLARIFAI_APPLICATION_ID in addition to your CLARIFAI_ACCESS_TOKEN.

TODO:

adelavega commented 2 years ago

Example of what I'm getting for obama.jpg:

image

adelavega commented 2 years ago

@emdupre Tests are passing with the new library.

As far as the user is concerned, there shouldn't be too many differences except that now you need: A CLARIFAI_USER_ID and CLARIFAI_APPLICATION_ID in addition to your CLARIFAI_ACCESS_TOKEN.

When you sign up for Clarifai, you can get your PAT from your profile, and you create an app which will then generate the other two IDs.

Tests are probably going to fail in CI but they are passing locally, so give it a shot in this PR if you have time.

Otherwise, this is ready to merge. Unless @qmac you want to review real quick.

emdupre commented 2 years ago

Thanks, @adelavega !! I have it annotating some stimuli now, so these changes definitely get things running again ! 🚀

A few small things I was confused by :

adelavega commented 2 years ago

Great!

Thanks for that catch on the environment name.

In the docs when I said "(and subclasses) " I meant to include the ImageExtractor.

Maybe I could put: "e.g. ClarifaiImageExtractor" to clarify.

adelavega commented 2 years ago

Awesome thank you!

I'll merge as soon as I can get tests passing

codecov-commenter commented 2 years ago

Codecov Report

Base: 75.64% // Head: 75.30% // Decreases project coverage by -0.34% :warning:

Coverage data is based on head (a289ad9) compared to base (6e5e23b). Patch coverage: 9.09% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #474 +/- ## ========================================== - Coverage 75.64% 75.30% -0.35% ========================================== Files 65 65 Lines 3876 3895 +19 ========================================== + Hits 2932 2933 +1 - Misses 944 962 +18 ``` | [Impacted Files](https://codecov.io/gh/PsychoinformaticsLab/pliers/pull/474?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PsychoinformaticsLab) | Coverage Δ | | |---|---|---| | [pliers/extractors/api/clarifai.py](https://codecov.io/gh/PsychoinformaticsLab/pliers/pull/474/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PsychoinformaticsLab#diff-cGxpZXJzL2V4dHJhY3RvcnMvYXBpL2NsYXJpZmFpLnB5) | `20.68% <9.09%> (-2.33%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PsychoinformaticsLab). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=PsychoinformaticsLab)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.