-
Notifications
You must be signed in to change notification settings - Fork 7
Add clarifai model init CLI command #611
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
Conversation
Co-authored-by: zeiler <2138258+zeiler@users.noreply.github.com>
Co-authored-by: srikanthbachala20 <170492893+srikanthbachala20@users.noreply.github.com>
… add accelerator requests, remove unsupported checkpoint types Co-authored-by: zeiler <2138258+zeiler@users.noreply.github.com>
There was a problem hiding this 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 PR introduces the CLI command "init" to quickly scaffold new model projects with the proper directory structure and template files.
- Added model scaffolding templates for default, MCP, and OpenAI model types.
- Extended the CLI to generate model.py, requirements.txt, and config.yaml files based on user input.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
clarifai/cli/model_templates.py | Added templates for default, MCP, and OpenAI model types. |
clarifai/cli/model.py | Introduced the "init" CLI command to scaffold model projects. |
Lint the code as per |
Co-authored-by: srikanthbachala20 <170492893+srikanthbachala20@users.noreply.github.com>
Linted the code according to the |
Minimum allowed line rate is |
The requested changes were resolved but still this is obstructing PR merge
This PR implements the
clarifai model init
CLI command to help users quickly scaffold new model projects with the proper directory structure and template files.Features
The new command creates the following structure in the specified directory:
Usage
Model Type Support
ModelClass
for general-purpose modelsMCPModelClass
with FastMCP server template including tools, resources, and promptsOpenAIModelClass
for OpenAI-compatible API wrappersTemplate Features
# TODO: please fill in
comments for easy discovery withgrep
requirements.txt
automatically includes the current clarifai SDK version (11.4.7)config.yaml
is pre-configured with the appropriatemodel_type_id
User Guidance
After initialization, users get clear next steps:
This significantly reduces the friction for users to get started with custom Clarifai models by providing proper scaffolding and guidance.
Fixes #610.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.