-
Notifications
You must be signed in to change notification settings - Fork 7
Update clarifai model predict CLI with SDK new changes for pythonic models #654
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
base: master
Are you sure you want to change the base?
Conversation
…dation Co-authored-by: srikanthbachala20 <170492893+srikanthbachala20@users.noreply.github.com>
…ict support Co-authored-by: srikanthbachala20 <170492893+srikanthbachala20@users.noreply.github.com>
|
Co-authored-by: srikanthbachala20 <170492893+srikanthbachala20@users.noreply.github.com>
All requested changes have been implemented in commit 67330e9:
The CLI now supports a simplified pythonic model prediction using only the |
Use the predict method instead of traditional method for pythonic models |
Co-authored-by: srikanthbachala20 <170492893+srikanthbachala20@users.noreply.github.com>
Updated the implementation to use the predict method directly for pythonic models instead of fallback to traditional methods. The |
Try optimizing the |
Co-authored-by: srikanthbachala20 <170492893+srikanthbachala20@users.noreply.github.com>
Optimized the predict command code and updated its docstring with comprehensive improvements: Code Structure:
Documentation:
Technical Improvements:
Commit 8257f93. |
This PR updates the
clarifai model predict
CLI command to support the new pythonic models with method signatures, while maintaining full backward compatibility with traditional models.🚀 Key Features Added
1. Method Selection for Pythonic Models
--method
option to specify which method to call (predict, generate, stream, etc.)2. Input Validation Against Model Signatures
--model_path
option for local model signature validation3. JSON Input Parameters
--inputs
option for structured JSON input parameters📝 Usage Examples
Traditional models (unchanged)
Pythonic models (new)
🔍 Validation Features
The CLI now validates inputs against model signatures when
--model_path
is provided:🧪 Testing
tests/cli/test_model_predict.py
🔄 Backward Compatibility
--file_path
,--url
,--bytes
)Fixes #653.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.