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

API drift (backward-incompatibility) for "Image" | Colab NB: Quick_Start_on_Clarifai_Image_Predictions.ipynb #13

Open
bohemia420 opened this issue Jan 29, 2024 · 0 comments

Comments

@bohemia420
Copy link

bohemia420 commented Jan 29, 2024

The issue

It looks like that the documentation for NB: Quick_Start_on_Clarifai_Image_Predictions.ipynb is either obsolete, or (which also means the same as former :-) ) that the few API/signatures/supported methods have come up backward incompatible.

For instance, on the following environment configuration,

python version: 3.11.6
env type: virtual environment, created as python -m venv .venv
clarifai packages: clarifai==10.0.1 and clarifai-grpc==10.0.9

the following line/instruction of code:

image = Image.open(os.path.join(skimage.data_dir, filename)).convert("RGB")
inside NB: Quick_Start_on_Clarifai_Image_Predictions.ipynb
... Fails !!

The Impact
Colab NBs repository is a paramout entry-point in terms of learning, experimenting with and imbibing clarifai into one's ML stack- such example NBs serve as the make-or-break for adoption/involvement of the clients and community and must be:
§ always upto date with the latest versions. Notwithstanding, the breaking changes must be mentioned
§ ideally the releases must always be kept backwards-compatible.

Steps to reproduce
§ Install a virtualenv
§ ideally install from source - cloning and running the requirements.txt and setup.py installs of clarifai repository
§ ensure the versions are as mentioned above, albeit this issue may be prevalent in the latest/previous few rollouts of clarifai too, which can be further part of investigation. I.e clarifai==10.0.1 and clarifai-grpc==10.0.9
§ bring a breakpoint at/hit at

image = Image.open(os.path.join(skimage.data_dir, filename)).convert("RGB")

inside NB: Quick_Start_on_Clarifai_Image_Predictions.ipynb

Screenshot 2024-01-30 at 00 21 48

Concept/Thoughts/Proposal to Fix
Either trying to:
§ revert(just the specific "Image" class or "open" method to a plausible previous release that has had this execution forking
§ focus on instantiation of a class "Image" and "open" being an instance method, rather than a static/class method.
§ updating the NB appropriately basis the support for above utility/usecase in current version(s), and mention the breaking changes.

Additional Notes
Dear Clarifai team, I am a seasoned Data, ML and platform engineer, with an enriching 10 years of experience of all-things-backend engineering, at scale, across various industry verticals, and largely championing solutions for ML usecases. I come from a prestigious engineering institute in India, BITS Pilani(Pilani) - only next to the old 7 IITs.
I had chanced upon this awesome tool, and also looked up open requisitions at Clarifai, which bear relevance to my profile and interests.
Whilst it is love to contribute to open source rollouts of Clarifai, and I intend to do few more of contributions, I would be glad to be also considered as a part and parcel of Tech @ Clarifai. I am based out of the UAE, moving shortly to India, reachable on following contact coordinates:

phone(whatsapp messages only) : +91-7899512408
google meet/zoom : [email protected]

Kindly let me know! More power to us all, and best wishes to everyone at Clarifai!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant