Skip to content

Conversation

srikanthbachala20
Copy link
Contributor

This pull request adds support for a new "python" toolkit option in the model initialization CLI, allowing users to initialize models using a Python-based template. The implementation includes updating the available toolkit choices, help text, and logic for selecting the correct repository branch for the "python" toolkit.

Toolkit support and CLI enhancements:

  • Added "python" to the list of supported toolkits in the --toolkit CLI option and updated the help text in model() and init() to reflect this new option. [1] [2]
  • Updated the logic in the init() function to select the correct GitHub repository branch (DEFAULT_PYTHON_MODEL_REPO_BRANCH) when the "python" toolkit is chosen.

Repository branch configuration:

  • Introduced the DEFAULT_PYTHON_MODEL_REPO_BRANCH constant in constants.py to specify the branch used for the "python" toolkit.
  • Imported the new constant into model.py for use in the initialization logic.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds support for a new "python" toolkit option to the CLI model initialization command, enabling users to initialize models using a Python-based template. The implementation follows the existing pattern for other toolkit options (ollama, huggingface, lmstudio, vllm) by adding the necessary configuration and logic.

  • Added "python" as a supported toolkit choice in CLI options
  • Updated help text to include the new python toolkit option
  • Added branch configuration logic to select the correct repository branch for python toolkit

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
clarifai/utils/constants.py Added DEFAULT_PYTHON_MODEL_REPO_BRANCH constant to define the branch for python toolkit
clarifai/cli/model.py Updated toolkit choices, help text, and initialization logic to support python toolkit option

Copy link

Code Coverage

Package Line Rate Health
clarifai 43%
clarifai.cli 43%
clarifai.cli.templates 36%
clarifai.client 67%
clarifai.client.auth 67%
clarifai.constants 100%
clarifai.datasets 100%
clarifai.datasets.export 80%
clarifai.datasets.upload 75%
clarifai.datasets.upload.loaders 37%
clarifai.models 100%
clarifai.modules 0%
clarifai.rag 72%
clarifai.runners 53%
clarifai.runners.models 58%
clarifai.runners.pipeline_steps 41%
clarifai.runners.pipelines 70%
clarifai.runners.utils 63%
clarifai.runners.utils.data_types 72%
clarifai.schema 100%
clarifai.urls 60%
clarifai.utils 59%
clarifai.utils.evaluation 67%
clarifai.workflows 95%
Summary 61% (8074 / 13161)

Minimum allowed line rate is 50%

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants