Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to Clarifai-GRPC library #474

Merged
merged 7 commits into from
Sep 21, 2022
Merged

Move to Clarifai-GRPC library #474

merged 7 commits into from
Sep 21, 2022

Conversation

adelavega
Copy link
Member

@adelavega adelavega commented Sep 7, 2022

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:

  • Add ability to filter concepts
  • Update docs (re: authentication)
  • Ingest clarifai responses
  • Check tests

@adelavega
Copy link
Member Author

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

image

@adelavega adelavega changed the title WIP: Move to Clarifai-GRPC library Move to Clarifai-GRPC library Sep 9, 2022
@adelavega
Copy link
Member Author

@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
Copy link
Contributor

emdupre commented Sep 9, 2022

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 :

  • The environmental variable needs to be named CLARIFAI_APP_ID rather than CLARIFAI_APPLICATION_ID
  • The Transformer is still ClarifaiAPIImageExtractor rather than the more generic ClarifaiAPIExtractor that I interpreted from this change.

@adelavega
Copy link
Member Author

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.

docs/installation.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@emdupre emdupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM ! Thank you again for working on this 🙏

@adelavega
Copy link
Member Author

adelavega commented Sep 13, 2022

Awesome thank you!

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

@codecov-commenter
Copy link

Codecov Report

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

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
@@            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 Coverage Δ
pliers/extractors/api/clarifai.py 20.68% <9.09%> (-2.33%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@adelavega adelavega merged commit 0047547 into master Sep 21, 2022
@adelavega adelavega deleted the fix/clarifaiapi branch October 20, 2022 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clarifai deprecation ; clarifai-grpc support ?
3 participants