clarifai 11.8.3__tar.gz → 11.8.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clarifai-11.8.3/clarifai.egg-info → clarifai-11.8.4}/PKG-INFO +1 -1
 - clarifai-11.8.4/clarifai/__init__.py +1 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/model.py +31 -11
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/templates/model_templates.py +18 -11
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/model.py +29 -8
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/cli.py +31 -7
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/constants.py +1 -0
 - {clarifai-11.8.3 → clarifai-11.8.4/clarifai.egg-info}/PKG-INFO +1 -1
 - clarifai-11.8.3/clarifai/__init__.py +0 -1
 - {clarifai-11.8.3 → clarifai-11.8.4}/LICENSE +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/MANIFEST.in +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/README.md +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/README.md +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/__main__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/base.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/compute_cluster.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/deployment.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/nodepool.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/pipeline.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/pipeline_step.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/templates/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/templates/pipeline_step_templates.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli/templates/pipeline_templates.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/cli.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/app.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/auth/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/auth/helper.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/auth/register.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/auth/stub.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/base.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/compute_cluster.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/dataset.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/deployment.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/input.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/lister.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/model_client.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/module.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/nodepool.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/pipeline.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/pipeline_step.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/runner.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/search.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/user.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/client/workflow.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/constants/base.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/constants/dataset.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/constants/input.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/constants/model.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/constants/rag.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/constants/search.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/constants/workflow.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/export/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/export/inputs_annotations.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/base.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/features.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/image.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/loaders/README.md +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/loaders/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/loaders/coco_captions.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/loaders/coco_detection.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/loaders/imagenet_classification.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/loaders/xview_detection.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/multimodal.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/text.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/utils.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/errors.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/models/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/models/api.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/modules/README.md +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/modules/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/modules/css.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/modules/pages.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/modules/style.css +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/rag/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/rag/rag.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/rag/utils.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/dockerfile_template/Dockerfile.template +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/dummy_openai_model.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/mcp_class.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/model_builder.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/model_class.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/model_run_locally.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/model_runner.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/model_servicer.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/openai_class.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/visual_classifier_class.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/models/visual_detector_class.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/pipeline_steps/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/pipeline_steps/pipeline_step_builder.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/pipelines/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/pipelines/pipeline_builder.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/server.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/code_script.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/const.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/data_types/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/data_types/data_types.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/data_utils.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/loader.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/method_signatures.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/model_utils.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/openai_convertor.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/pipeline_validation.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/serializers.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/utils/url_fetcher.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/schema/search.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/urls/helper.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/config.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/evaluation/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/evaluation/helpers.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/evaluation/main.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/evaluation/testset_annotation_parser.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/hashing.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/logging.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/misc.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/model_train.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/protobuf.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/utils/secrets.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/versions.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/workflows/__init__.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/workflows/export.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/workflows/utils.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/workflows/validate.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai.egg-info/SOURCES.txt +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai.egg-info/dependency_links.txt +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai.egg-info/entry_points.txt +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai.egg-info/requires.txt +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/clarifai.egg-info/top_level.txt +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/pyproject.toml +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/requirements.txt +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/setup.cfg +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/setup.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_app.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_async_stub.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_auth.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_data_upload.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_eval.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_list_models.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_misc.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_model_predict.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_model_train.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_modules.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_pipeline_client.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_rag.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_search.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_secrets.py +0 -0
 - {clarifai-11.8.3 → clarifai-11.8.4}/tests/test_stub.py +0 -0
 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            __version__ = "11.8.4"
         
     | 
| 
         @@ -28,6 +28,7 @@ from clarifai.utils.constants import ( 
     | 
|
| 
       28 
28 
     | 
    
         
             
                DEFAULT_LOCAL_RUNNER_NODEPOOL_CONFIG,
         
     | 
| 
       29 
29 
     | 
    
         
             
                DEFAULT_LOCAL_RUNNER_NODEPOOL_ID,
         
     | 
| 
       30 
30 
     | 
    
         
             
                DEFAULT_OLLAMA_MODEL_REPO_BRANCH,
         
     | 
| 
      
 31 
     | 
    
         
            +
                DEFAULT_PYTHON_MODEL_REPO_BRANCH,
         
     | 
| 
       31 
32 
     | 
    
         
             
                DEFAULT_TOOLKIT_MODEL_REPO,
         
     | 
| 
       32 
33 
     | 
    
         
             
                DEFAULT_VLLM_MODEL_REPO_BRANCH,
         
     | 
| 
       33 
34 
     | 
    
         
             
            )
         
     | 
| 
         @@ -74,9 +75,11 @@ def model(): 
     | 
|
| 
       74 
75 
     | 
    
         
             
            )
         
     | 
| 
       75 
76 
     | 
    
         
             
            @click.option(
         
     | 
| 
       76 
77 
     | 
    
         
             
                '--toolkit',
         
     | 
| 
       77 
     | 
    
         
            -
                type=click.Choice( 
     | 
| 
      
 78 
     | 
    
         
            +
                type=click.Choice(
         
     | 
| 
      
 79 
     | 
    
         
            +
                    ['ollama', 'huggingface', 'lmstudio', 'vllm', 'python'], case_sensitive=False
         
     | 
| 
      
 80 
     | 
    
         
            +
                ),
         
     | 
| 
       78 
81 
     | 
    
         
             
                required=False,
         
     | 
| 
       79 
     | 
    
         
            -
                help='Toolkit to use for model initialization. Currently supports "ollama", "huggingface", "lmstudio" and " 
     | 
| 
      
 82 
     | 
    
         
            +
                help='Toolkit to use for model initialization. Currently supports "ollama", "huggingface", "lmstudio", "vllm" and "python".',
         
     | 
| 
       80 
83 
     | 
    
         
             
            )
         
     | 
| 
       81 
84 
     | 
    
         
             
            @click.option(
         
     | 
| 
       82 
85 
     | 
    
         
             
                '--model-name',
         
     | 
| 
         @@ -95,7 +98,9 @@ def model(): 
     | 
|
| 
       95 
98 
     | 
    
         
             
                help='Context length for the Ollama model. Defaults to 8192.',
         
     | 
| 
       96 
99 
     | 
    
         
             
                required=False,
         
     | 
| 
       97 
100 
     | 
    
         
             
            )
         
     | 
| 
      
 101 
     | 
    
         
            +
            @click.pass_context
         
     | 
| 
       98 
102 
     | 
    
         
             
            def init(
         
     | 
| 
      
 103 
     | 
    
         
            +
                ctx,
         
     | 
| 
       99 
104 
     | 
    
         
             
                model_path,
         
     | 
| 
       100 
105 
     | 
    
         
             
                model_type_id,
         
     | 
| 
       101 
106 
     | 
    
         
             
                github_pat,
         
     | 
| 
         @@ -124,11 +129,13 @@ def init( 
     | 
|
| 
       124 
129 
     | 
    
         
             
                MODEL_TYPE_ID: Type of model to create. If not specified, defaults to "text-to-text" for text models.\n
         
     | 
| 
       125 
130 
     | 
    
         
             
                GITHUB_PAT: GitHub Personal Access Token for authentication when cloning private repositories.\n
         
     | 
| 
       126 
131 
     | 
    
         
             
                GITHUB_URL: GitHub repository URL or "repo" format to clone a repository from. If provided, the entire repository contents will be copied to the target directory instead of using default templates.\n
         
     | 
| 
       127 
     | 
    
         
            -
                TOOLKIT: Toolkit to use for model initialization. Currently supports "ollama", "huggingface", "lmstudio" and " 
     | 
| 
      
 132 
     | 
    
         
            +
                TOOLKIT: Toolkit to use for model initialization. Currently supports "ollama", "huggingface", "lmstudio", "vllm" and "python".\n
         
     | 
| 
       128 
133 
     | 
    
         
             
                MODEL_NAME: Model name to configure when using --toolkit. For ollama toolkit, this sets the Ollama model to use (e.g., "llama3.1", "mistral", etc.). For vllm & huggingface toolkit, this sets the Hugging Face model repo_id (e.g., "Qwen/Qwen3-4B-Instruct-2507"). For lmstudio toolkit, this sets the LM Studio model name (e.g., "qwen/qwen3-4b-thinking-2507").\n
         
     | 
| 
       129 
134 
     | 
    
         
             
                PORT: Port to run the (Ollama/lmstudio) server on. Defaults to 23333.\n
         
     | 
| 
       130 
135 
     | 
    
         
             
                CONTEXT_LENGTH: Context length for the (Ollama/lmstudio) model. Defaults to 8192.\n
         
     | 
| 
       131 
136 
     | 
    
         
             
                """
         
     | 
| 
      
 137 
     | 
    
         
            +
                validate_context(ctx)
         
     | 
| 
      
 138 
     | 
    
         
            +
                user_id = ctx.obj.current.user_id
         
     | 
| 
       132 
139 
     | 
    
         
             
                # Resolve the absolute path
         
     | 
| 
       133 
140 
     | 
    
         
             
                model_path = os.path.abspath(model_path)
         
     | 
| 
       134 
141 
     | 
    
         | 
| 
         @@ -176,6 +183,9 @@ def init( 
     | 
|
| 
       176 
183 
     | 
    
         
             
                elif toolkit == 'vllm':
         
     | 
| 
       177 
184 
     | 
    
         
             
                    github_url = DEFAULT_TOOLKIT_MODEL_REPO
         
     | 
| 
       178 
185 
     | 
    
         
             
                    branch = DEFAULT_VLLM_MODEL_REPO_BRANCH
         
     | 
| 
      
 186 
     | 
    
         
            +
                elif toolkit == 'python':
         
     | 
| 
      
 187 
     | 
    
         
            +
                    github_url = DEFAULT_TOOLKIT_MODEL_REPO
         
     | 
| 
      
 188 
     | 
    
         
            +
                    branch = DEFAULT_PYTHON_MODEL_REPO_BRANCH
         
     | 
| 
       179 
189 
     | 
    
         | 
| 
       180 
190 
     | 
    
         
             
                if github_url:
         
     | 
| 
       181 
191 
     | 
    
         
             
                    downloader = GitHubDownloader(
         
     | 
| 
         @@ -304,15 +314,15 @@ def init( 
     | 
|
| 
       304 
314 
     | 
    
         
             
                        logger.error(f"Failed to clone GitHub repository: {e}")
         
     | 
| 
       305 
315 
     | 
    
         
             
                        github_url = None
         
     | 
| 
       306 
316 
     | 
    
         | 
| 
       307 
     | 
    
         
            -
                if (model_name or port or context_length) and (toolkit == 'ollama'):
         
     | 
| 
       308 
     | 
    
         
            -
                    customize_ollama_model(model_path, model_name, port, context_length)
         
     | 
| 
      
 317 
     | 
    
         
            +
                if (user_id or model_name or port or context_length) and (toolkit == 'ollama'):
         
     | 
| 
      
 318 
     | 
    
         
            +
                    customize_ollama_model(model_path, user_id, model_name, port, context_length)
         
     | 
| 
       309 
319 
     | 
    
         | 
| 
       310 
     | 
    
         
            -
                if (model_name or port or context_length) and (toolkit == 'lmstudio'):
         
     | 
| 
       311 
     | 
    
         
            -
                    customize_lmstudio_model(model_path, model_name, port, context_length)
         
     | 
| 
      
 320 
     | 
    
         
            +
                if (user_id or model_name or port or context_length) and (toolkit == 'lmstudio'):
         
     | 
| 
      
 321 
     | 
    
         
            +
                    customize_lmstudio_model(model_path, user_id, model_name, port, context_length)
         
     | 
| 
       312 
322 
     | 
    
         | 
| 
       313 
     | 
    
         
            -
                if model_name and (toolkit == 'huggingface' or toolkit == 'vllm'):
         
     | 
| 
      
 323 
     | 
    
         
            +
                if (user_id or model_name) and (toolkit == 'huggingface' or toolkit == 'vllm'):
         
     | 
| 
       314 
324 
     | 
    
         
             
                    # Update the config.yaml file with the provided model name
         
     | 
| 
       315 
     | 
    
         
            -
                    customize_huggingface_model(model_path, model_name)
         
     | 
| 
      
 325 
     | 
    
         
            +
                    customize_huggingface_model(model_path, user_id, model_name)
         
     | 
| 
       316 
326 
     | 
    
         | 
| 
       317 
327 
     | 
    
         
             
                if github_url:
         
     | 
| 
       318 
328 
     | 
    
         
             
                    logger.info("Model initialization complete with GitHub repository")
         
     | 
| 
         @@ -326,12 +336,20 @@ def init( 
     | 
|
| 
       326 
336 
     | 
    
         
             
                    logger.info("Initializing model with default templates...")
         
     | 
| 
       327 
337 
     | 
    
         
             
                    input("Press Enter to continue...")
         
     | 
| 
       328 
338 
     | 
    
         | 
| 
      
 339 
     | 
    
         
            +
                    from clarifai.cli.base import input_or_default
         
     | 
| 
       329 
340 
     | 
    
         
             
                    from clarifai.cli.templates.model_templates import (
         
     | 
| 
       330 
341 
     | 
    
         
             
                        get_config_template,
         
     | 
| 
       331 
342 
     | 
    
         
             
                        get_model_template,
         
     | 
| 
       332 
343 
     | 
    
         
             
                        get_requirements_template,
         
     | 
| 
       333 
344 
     | 
    
         
             
                    )
         
     | 
| 
       334 
345 
     | 
    
         | 
| 
      
 346 
     | 
    
         
            +
                    # Collect additional parameters for OpenAI template
         
     | 
| 
      
 347 
     | 
    
         
            +
                    template_kwargs = {}
         
     | 
| 
      
 348 
     | 
    
         
            +
                    if model_type_id == "openai":
         
     | 
| 
      
 349 
     | 
    
         
            +
                        logger.info("Configuring OpenAI local runner...")
         
     | 
| 
      
 350 
     | 
    
         
            +
                        port = input_or_default("Enter port (default: 8000): ", "8000")
         
     | 
| 
      
 351 
     | 
    
         
            +
                        template_kwargs = {"port": port}
         
     | 
| 
      
 352 
     | 
    
         
            +
             
     | 
| 
       335 
353 
     | 
    
         
             
                    # Create the 1/ subdirectory
         
     | 
| 
       336 
354 
     | 
    
         
             
                    model_version_dir = os.path.join(model_path, "1")
         
     | 
| 
       337 
355 
     | 
    
         
             
                    os.makedirs(model_version_dir, exist_ok=True)
         
     | 
| 
         @@ -341,7 +359,7 @@ def init( 
     | 
|
| 
       341 
359 
     | 
    
         
             
                    if os.path.exists(model_py_path):
         
     | 
| 
       342 
360 
     | 
    
         
             
                        logger.warning(f"File {model_py_path} already exists, skipping...")
         
     | 
| 
       343 
361 
     | 
    
         
             
                    else:
         
     | 
| 
       344 
     | 
    
         
            -
                        model_template = get_model_template(model_type_id)
         
     | 
| 
      
 362 
     | 
    
         
            +
                        model_template = get_model_template(model_type_id, **template_kwargs)
         
     | 
| 
       345 
363 
     | 
    
         
             
                        with open(model_py_path, 'w') as f:
         
     | 
| 
       346 
364 
     | 
    
         
             
                            f.write(model_template)
         
     | 
| 
       347 
365 
     | 
    
         
             
                        logger.info(f"Created {model_py_path}")
         
     | 
| 
         @@ -363,7 +381,9 @@ def init( 
     | 
|
| 
       363 
381 
     | 
    
         
             
                    else:
         
     | 
| 
       364 
382 
     | 
    
         
             
                        config_model_type_id = DEFAULT_LOCAL_RUNNER_MODEL_TYPE  # default
         
     | 
| 
       365 
383 
     | 
    
         | 
| 
       366 
     | 
    
         
            -
                        config_template = get_config_template( 
     | 
| 
      
 384 
     | 
    
         
            +
                        config_template = get_config_template(
         
     | 
| 
      
 385 
     | 
    
         
            +
                            user_id=user_id, model_type_id=config_model_type_id
         
     | 
| 
      
 386 
     | 
    
         
            +
                        )
         
     | 
| 
       367 
387 
     | 
    
         
             
                        with open(config_path, 'w') as f:
         
     | 
| 
       368 
388 
     | 
    
         
             
                            f.write(config_template)
         
     | 
| 
       369 
389 
     | 
    
         
             
                        logger.info(f"Created {config_path}")
         
     | 
| 
         @@ -99,9 +99,9 @@ class MyModel(MCPModelClass): 
     | 
|
| 
       99 
99 
     | 
    
         
             
            '''
         
     | 
| 
       100 
100 
     | 
    
         | 
| 
       101 
101 
     | 
    
         | 
| 
       102 
     | 
    
         
            -
            def get_openai_model_class_template() -> str:
         
     | 
| 
      
 102 
     | 
    
         
            +
            def get_openai_model_class_template(port: str = "8000") -> str:
         
     | 
| 
       103 
103 
     | 
    
         
             
                """Return the template for an OpenAIModelClass-based model."""
         
     | 
| 
       104 
     | 
    
         
            -
                return '''from typing import List
         
     | 
| 
      
 104 
     | 
    
         
            +
                return f'''from typing import List, Iterator
         
     | 
| 
       105 
105 
     | 
    
         
             
            from openai import OpenAI
         
     | 
| 
       106 
106 
     | 
    
         
             
            from clarifai.runners.models.openai_class import OpenAIModelClass
         
     | 
| 
       107 
107 
     | 
    
         
             
            from clarifai.runners.utils.data_utils import Param
         
     | 
| 
         @@ -114,12 +114,11 @@ class MyModel(OpenAIModelClass): 
     | 
|
| 
       114 
114 
     | 
    
         
             
                # Configure your OpenAI-compatible client for local model
         
     | 
| 
       115 
115 
     | 
    
         
             
                client = OpenAI(
         
     | 
| 
       116 
116 
     | 
    
         
             
                    api_key="local-key",  # TODO: please fill in - use your local API key
         
     | 
| 
       117 
     | 
    
         
            -
                    base_url="http://localhost: 
     | 
| 
      
 117 
     | 
    
         
            +
                    base_url="http://localhost:{port}/v1",  # TODO: please fill in - your local model server endpoint
         
     | 
| 
       118 
118 
     | 
    
         
             
                )
         
     | 
| 
       119 
119 
     | 
    
         | 
| 
       120 
     | 
    
         
            -
                #  
     | 
| 
       121 
     | 
    
         
            -
                 
     | 
| 
       122 
     | 
    
         
            -
                model = "my-local-model"  # TODO: please fill in - replace with your local model name
         
     | 
| 
      
 120 
     | 
    
         
            +
                # Automatically get the first available model
         
     | 
| 
      
 121 
     | 
    
         
            +
                model = client.models.list().data[0].id
         
     | 
| 
       123 
122 
     | 
    
         | 
| 
       124 
123 
     | 
    
         
             
                def load_model(self):
         
     | 
| 
       125 
124 
     | 
    
         
             
                    """Optional: Add any additional model loading logic here."""
         
     | 
| 
         @@ -157,7 +156,7 @@ class MyModel(OpenAIModelClass): 
     | 
|
| 
       157 
156 
     | 
    
         
             
                    max_tokens: int = Param(default=256, description="The maximum number of tokens to generate. Shorter token lengths will provide faster performance."),
         
     | 
| 
       158 
157 
     | 
    
         
             
                    temperature: float = Param(default=1.0, description="A decimal number that determines the degree of randomness in the response"),
         
     | 
| 
       159 
158 
     | 
    
         
             
                    top_p: float = Param(default=1.0, description="An alternative to sampling with temperature, where the model considers the results of the tokens with top_p probability mass."),
         
     | 
| 
       160 
     | 
    
         
            -
                ):
         
     | 
| 
      
 159 
     | 
    
         
            +
                ) -> Iterator[str]:
         
     | 
| 
       161 
160 
     | 
    
         
             
                    """Stream a completion response using the OpenAI client."""
         
     | 
| 
       162 
161 
     | 
    
         
             
                    # TODO: please fill in
         
     | 
| 
       163 
162 
     | 
    
         
             
                    # Implement your streaming logic here
         
     | 
| 
         @@ -178,13 +177,13 @@ class MyModel(OpenAIModelClass): 
     | 
|
| 
       178 
177 
     | 
    
         
             
            '''
         
     | 
| 
       179 
178 
     | 
    
         | 
| 
       180 
179 
     | 
    
         | 
| 
       181 
     | 
    
         
            -
            def get_config_template(model_type_id: str = "any-to-any") -> str:
         
     | 
| 
      
 180 
     | 
    
         
            +
            def get_config_template(user_id: str = None, model_type_id: str = "any-to-any") -> str:
         
     | 
| 
       182 
181 
     | 
    
         
             
                """Return the template for config.yaml."""
         
     | 
| 
       183 
182 
     | 
    
         
             
                return f'''# Configuration file for your Clarifai model
         
     | 
| 
       184 
183 
     | 
    
         | 
| 
       185 
184 
     | 
    
         
             
            model:
         
     | 
| 
       186 
185 
     | 
    
         
             
              id: "my-model"  # TODO: please fill in - replace with your model ID
         
     | 
| 
       187 
     | 
    
         
            -
              user_id: "user_id"  # TODO: please fill in - replace with your user ID
         
     | 
| 
      
 186 
     | 
    
         
            +
              user_id: "{user_id}"  # TODO: please fill in - replace with your user ID
         
     | 
| 
       188 
187 
     | 
    
         
             
              app_id: "app_id"  # TODO: please fill in - replace with your app ID
         
     | 
| 
       189 
188 
     | 
    
         
             
              model_type_id: "{model_type_id}"  # TODO: please fill in - replace if different model type ID
         
     | 
| 
       190 
189 
     | 
    
         | 
| 
         @@ -237,8 +236,16 @@ MODEL_TYPE_TEMPLATES = { 
     | 
|
| 
       237 
236 
     | 
    
         
             
            }
         
     | 
| 
       238 
237 
     | 
    
         | 
| 
       239 
238 
     | 
    
         | 
| 
       240 
     | 
    
         
            -
            def get_model_template(model_type_id: str = None) -> str:
         
     | 
| 
      
 239 
     | 
    
         
            +
            def get_model_template(model_type_id: str = None, **kwargs) -> str:
         
     | 
| 
       241 
240 
     | 
    
         
             
                """Get the appropriate model template based on model_type_id."""
         
     | 
| 
       242 
241 
     | 
    
         
             
                if model_type_id in MODEL_TYPE_TEMPLATES:
         
     | 
| 
       243 
     | 
    
         
            -
                     
     | 
| 
      
 242 
     | 
    
         
            +
                    template_func = MODEL_TYPE_TEMPLATES[model_type_id]
         
     | 
| 
      
 243 
     | 
    
         
            +
                    # Check if the template function accepts additional parameters
         
     | 
| 
      
 244 
     | 
    
         
            +
                    import inspect
         
     | 
| 
      
 245 
     | 
    
         
            +
             
     | 
| 
      
 246 
     | 
    
         
            +
                    sig = inspect.signature(template_func)
         
     | 
| 
      
 247 
     | 
    
         
            +
                    if len(sig.parameters) > 0:
         
     | 
| 
      
 248 
     | 
    
         
            +
                        return template_func(**kwargs)
         
     | 
| 
      
 249 
     | 
    
         
            +
                    else:
         
     | 
| 
      
 250 
     | 
    
         
            +
                        return template_func()
         
     | 
| 
       244 
251 
     | 
    
         
             
                return get_model_class_template()
         
     | 
| 
         @@ -108,6 +108,7 @@ class Model(Lister, BaseClient): 
     | 
|
| 
       108 
108 
     | 
    
         
             
                    self.training_params = {}
         
     | 
| 
       109 
109 
     | 
    
         
             
                    self.input_types = None
         
     | 
| 
       110 
110 
     | 
    
         
             
                    self._client = None
         
     | 
| 
      
 111 
     | 
    
         
            +
                    self._async_client = None
         
     | 
| 
       111 
112 
     | 
    
         
             
                    self._added_methods = False
         
     | 
| 
       112 
113 
     | 
    
         
             
                    BaseClient.__init__(
         
     | 
| 
       113 
114 
     | 
    
         
             
                        self,
         
     | 
| 
         @@ -528,6 +529,23 @@ class Model(Lister, BaseClient): 
     | 
|
| 
       528 
529 
     | 
    
         
             
                        )
         
     | 
| 
       529 
530 
     | 
    
         
             
                    return self._client
         
     | 
| 
       530 
531 
     | 
    
         | 
| 
      
 532 
     | 
    
         
            +
                @property
         
     | 
| 
      
 533 
     | 
    
         
            +
                def async_client(self):
         
     | 
| 
      
 534 
     | 
    
         
            +
                    """Get the asynchronous client instance (with async stub)."""
         
     | 
| 
      
 535 
     | 
    
         
            +
                    if self._async_client is None:
         
     | 
| 
      
 536 
     | 
    
         
            +
                        request_template = service_pb2.PostModelOutputsRequest(
         
     | 
| 
      
 537 
     | 
    
         
            +
                            user_app_id=self.user_app_id,
         
     | 
| 
      
 538 
     | 
    
         
            +
                            model_id=self.id,
         
     | 
| 
      
 539 
     | 
    
         
            +
                            version_id=self.model_version.id,
         
     | 
| 
      
 540 
     | 
    
         
            +
                            model=self.model_info,
         
     | 
| 
      
 541 
     | 
    
         
            +
                            runner_selector=self._runner_selector,
         
     | 
| 
      
 542 
     | 
    
         
            +
                        )
         
     | 
| 
      
 543 
     | 
    
         
            +
                        # Create async client with async stub
         
     | 
| 
      
 544 
     | 
    
         
            +
                        self._async_client = ModelClient(
         
     | 
| 
      
 545 
     | 
    
         
            +
                            stub=self.STUB, async_stub=self.async_stub, request_template=request_template
         
     | 
| 
      
 546 
     | 
    
         
            +
                        )
         
     | 
| 
      
 547 
     | 
    
         
            +
                    return self._async_client
         
     | 
| 
      
 548 
     | 
    
         
            +
             
     | 
| 
       531 
549 
     | 
    
         
             
                def predict(self, *args, **kwargs):
         
     | 
| 
       532 
550 
     | 
    
         
             
                    """
         
     | 
| 
       533 
551 
     | 
    
         
             
                    Calls the model's predict() method with the given arguments.
         
     | 
| 
         @@ -574,16 +592,16 @@ class Model(Lister, BaseClient): 
     | 
|
| 
       574 
592 
     | 
    
         
             
                        )
         
     | 
| 
       575 
593 
     | 
    
         
             
                        inference_params = kwargs.get('inference_params', {})
         
     | 
| 
       576 
594 
     | 
    
         
             
                        output_config = kwargs.get('output_config', {})
         
     | 
| 
       577 
     | 
    
         
            -
                        return await self. 
     | 
| 
      
 595 
     | 
    
         
            +
                        return await self.async_client._async_predict_by_proto(
         
     | 
| 
       578 
596 
     | 
    
         
             
                            inputs=inputs, inference_params=inference_params, output_config=output_config
         
     | 
| 
       579 
597 
     | 
    
         
             
                        )
         
     | 
| 
       580 
598 
     | 
    
         | 
| 
       581 
599 
     | 
    
         
             
                    # Adding try-except, since the await works differently with jupyter kernels and in regular python scripts.
         
     | 
| 
       582 
600 
     | 
    
         
             
                    try:
         
     | 
| 
       583 
     | 
    
         
            -
                        return await self. 
     | 
| 
      
 601 
     | 
    
         
            +
                        return await self.async_client.predict(*args, **kwargs)
         
     | 
| 
       584 
602 
     | 
    
         
             
                    except TypeError:
         
     | 
| 
       585 
603 
     | 
    
         
             
                        # In jupyter, it returns a str object instead of a co-routine.
         
     | 
| 
       586 
     | 
    
         
            -
                        return self. 
     | 
| 
      
 604 
     | 
    
         
            +
                        return self.async_client.predict(*args, **kwargs)
         
     | 
| 
       587 
605 
     | 
    
         | 
| 
       588 
606 
     | 
    
         
             
                def __getattr__(self, name):
         
     | 
| 
       589 
607 
     | 
    
         
             
                    try:
         
     | 
| 
         @@ -596,7 +614,10 @@ class Model(Lister, BaseClient): 
     | 
|
| 
       596 
614 
     | 
    
         
             
                        self.client.fetch()
         
     | 
| 
       597 
615 
     | 
    
         
             
                        for method_name in self.client._method_signatures.keys():
         
     | 
| 
       598 
616 
     | 
    
         
             
                            if not hasattr(self, method_name):
         
     | 
| 
       599 
     | 
    
         
            -
                                 
     | 
| 
      
 617 
     | 
    
         
            +
                                if method_name.startswith('async_'):
         
     | 
| 
      
 618 
     | 
    
         
            +
                                    setattr(self, method_name, getattr(self.async_client, method_name))
         
     | 
| 
      
 619 
     | 
    
         
            +
                                else:
         
     | 
| 
      
 620 
     | 
    
         
            +
                                    setattr(self, method_name, getattr(self.client, method_name))
         
     | 
| 
       600 
621 
     | 
    
         
             
                    if hasattr(self.client, name):
         
     | 
| 
       601 
622 
     | 
    
         
             
                        return getattr(self.client, name)
         
     | 
| 
       602 
623 
     | 
    
         
             
                    raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
         
     | 
| 
         @@ -839,11 +860,11 @@ class Model(Lister, BaseClient): 
     | 
|
| 
       839 
860 
     | 
    
         
             
                        )
         
     | 
| 
       840 
861 
     | 
    
         
             
                        inference_params = kwargs.get('inference_params', {})
         
     | 
| 
       841 
862 
     | 
    
         
             
                        output_config = kwargs.get('output_config', {})
         
     | 
| 
       842 
     | 
    
         
            -
                        return self. 
     | 
| 
      
 863 
     | 
    
         
            +
                        return self.async_client._async_generate_by_proto(
         
     | 
| 
       843 
864 
     | 
    
         
             
                            inputs=inputs, inference_params=inference_params, output_config=output_config
         
     | 
| 
       844 
865 
     | 
    
         
             
                        )
         
     | 
| 
       845 
866 
     | 
    
         | 
| 
       846 
     | 
    
         
            -
                    return self. 
     | 
| 
      
 867 
     | 
    
         
            +
                    return self.async_client.generate(*args, **kwargs)
         
     | 
| 
       847 
868 
     | 
    
         | 
| 
       848 
869 
     | 
    
         
             
                def generate_by_filepath(
         
     | 
| 
       849 
870 
     | 
    
         
             
                    self,
         
     | 
| 
         @@ -1048,11 +1069,11 @@ class Model(Lister, BaseClient): 
     | 
|
| 
       1048 
1069 
     | 
    
         
             
                            )
         
     | 
| 
       1049 
1070 
     | 
    
         
             
                            inference_params = kwargs.get('inference_params', {})
         
     | 
| 
       1050 
1071 
     | 
    
         
             
                            output_config = kwargs.get('output_config', {})
         
     | 
| 
       1051 
     | 
    
         
            -
                            return self. 
     | 
| 
      
 1072 
     | 
    
         
            +
                            return self.async_client._async_stream_by_proto(
         
     | 
| 
       1052 
1073 
     | 
    
         
             
                                inputs=inputs, inference_params=inference_params, output_config=output_config
         
     | 
| 
       1053 
1074 
     | 
    
         
             
                            )
         
     | 
| 
       1054 
1075 
     | 
    
         | 
| 
       1055 
     | 
    
         
            -
                        return self. 
     | 
| 
      
 1076 
     | 
    
         
            +
                        return self.async_client.async_stream(*args, **kwargs)
         
     | 
| 
       1056 
1077 
     | 
    
         | 
| 
       1057 
1078 
     | 
    
         
             
                def stream_by_filepath(
         
     | 
| 
       1058 
1079 
     | 
    
         
             
                    self,
         
     | 
| 
         @@ -229,7 +229,7 @@ def validate_context_auth(pat: str, user_id: str, api_base: str = None): 
     | 
|
| 
       229 
229 
     | 
    
         | 
| 
       230 
230 
     | 
    
         | 
| 
       231 
231 
     | 
    
         
             
            def customize_ollama_model(
         
     | 
| 
       232 
     | 
    
         
            -
                model_path, model_name=None, port=None, context_length=None, verbose=False
         
     | 
| 
      
 232 
     | 
    
         
            +
                model_path, user_id, model_name=None, port=None, context_length=None, verbose=False
         
     | 
| 
       233 
233 
     | 
    
         
             
            ):
         
     | 
| 
       234 
234 
     | 
    
         
             
                """Customize the Ollama model name in the cloned template files.
         
     | 
| 
       235 
235 
     | 
    
         
             
                Args:
         
     | 
| 
         @@ -240,6 +240,24 @@ def customize_ollama_model( 
     | 
|
| 
       240 
240 
     | 
    
         
             
                 verbose: Whether to enable verbose logging - optional (defaults to False)
         
     | 
| 
       241 
241 
     | 
    
         | 
| 
       242 
242 
     | 
    
         
             
                """
         
     | 
| 
      
 243 
     | 
    
         
            +
                config_path = os.path.join(model_path, 'config.yaml')
         
     | 
| 
      
 244 
     | 
    
         
            +
                if os.path.exists(config_path):
         
     | 
| 
      
 245 
     | 
    
         
            +
                    with open(config_path, 'r') as f:
         
     | 
| 
      
 246 
     | 
    
         
            +
                        config = yaml.safe_load(f)
         
     | 
| 
      
 247 
     | 
    
         
            +
             
     | 
| 
      
 248 
     | 
    
         
            +
                    # Update the user_id in the model section
         
     | 
| 
      
 249 
     | 
    
         
            +
                    config['model']['user_id'] = user_id
         
     | 
| 
      
 250 
     | 
    
         
            +
                    if 'toolkit' not in config or config['toolkit'] is None:
         
     | 
| 
      
 251 
     | 
    
         
            +
                        config['toolkit'] = {}
         
     | 
| 
      
 252 
     | 
    
         
            +
                    if model_name is not None:
         
     | 
| 
      
 253 
     | 
    
         
            +
                        config['toolkit']['model'] = model_name
         
     | 
| 
      
 254 
     | 
    
         
            +
                    if port is not None:
         
     | 
| 
      
 255 
     | 
    
         
            +
                        config['toolkit']['port'] = port
         
     | 
| 
      
 256 
     | 
    
         
            +
                    if context_length is not None:
         
     | 
| 
      
 257 
     | 
    
         
            +
                        config['toolkit']['context_length'] = context_length
         
     | 
| 
      
 258 
     | 
    
         
            +
                    with open(config_path, 'w') as f:
         
     | 
| 
      
 259 
     | 
    
         
            +
                        yaml.dump(config, f, default_flow_style=False, sort_keys=False)
         
     | 
| 
      
 260 
     | 
    
         
            +
             
     | 
| 
       243 
261 
     | 
    
         
             
                model_py_path = os.path.join(model_path, "1", "model.py")
         
     | 
| 
       244 
262 
     | 
    
         | 
| 
       245 
263 
     | 
    
         
             
                if not os.path.exists(model_py_path):
         
     | 
| 
         @@ -405,16 +423,20 @@ def convert_timestamp_to_string(timestamp: Timestamp) -> str: 
     | 
|
| 
       405 
423 
     | 
    
         
             
                return datetime_obj.strftime('%Y-%m-%dT%H:%M:%SZ')
         
     | 
| 
       406 
424 
     | 
    
         | 
| 
       407 
425 
     | 
    
         | 
| 
       408 
     | 
    
         
            -
            def customize_huggingface_model(model_path, model_name):
         
     | 
| 
      
 426 
     | 
    
         
            +
            def customize_huggingface_model(model_path, user_id, model_name):
         
     | 
| 
       409 
427 
     | 
    
         
             
                config_path = os.path.join(model_path, 'config.yaml')
         
     | 
| 
       410 
428 
     | 
    
         
             
                if os.path.exists(config_path):
         
     | 
| 
       411 
429 
     | 
    
         
             
                    with open(config_path, 'r') as f:
         
     | 
| 
       412 
430 
     | 
    
         
             
                        config = yaml.safe_load(f)
         
     | 
| 
       413 
431 
     | 
    
         | 
| 
       414 
     | 
    
         
            -
                    # Update the  
     | 
| 
       415 
     | 
    
         
            -
                     
     | 
| 
       416 
     | 
    
         
            -
             
     | 
| 
       417 
     | 
    
         
            -
                     
     | 
| 
      
 432 
     | 
    
         
            +
                    # Update the user_id in the model section
         
     | 
| 
      
 433 
     | 
    
         
            +
                    config['model']['user_id'] = user_id
         
     | 
| 
      
 434 
     | 
    
         
            +
             
     | 
| 
      
 435 
     | 
    
         
            +
                    if model_name:
         
     | 
| 
      
 436 
     | 
    
         
            +
                        # Update the repo_id in checkpoints section
         
     | 
| 
      
 437 
     | 
    
         
            +
                        if 'checkpoints' not in config:
         
     | 
| 
      
 438 
     | 
    
         
            +
                            config['checkpoints'] = {}
         
     | 
| 
      
 439 
     | 
    
         
            +
                        config['checkpoints']['repo_id'] = model_name
         
     | 
| 
       418 
440 
     | 
    
         | 
| 
       419 
441 
     | 
    
         
             
                    with open(config_path, 'w') as f:
         
     | 
| 
       420 
442 
     | 
    
         
             
                        yaml.dump(config, f, default_flow_style=False, sort_keys=False)
         
     | 
| 
         @@ -424,7 +446,7 @@ def customize_huggingface_model(model_path, model_name): 
     | 
|
| 
       424 
446 
     | 
    
         
             
                    logger.warning(f"config.yaml not found at {config_path}, skipping model configuration")
         
     | 
| 
       425 
447 
     | 
    
         | 
| 
       426 
448 
     | 
    
         | 
| 
       427 
     | 
    
         
            -
            def customize_lmstudio_model(model_path, model_name, port, context_length):
         
     | 
| 
      
 449 
     | 
    
         
            +
            def customize_lmstudio_model(model_path, user_id, model_name, port, context_length):
         
     | 
| 
       428 
450 
     | 
    
         
             
                """Customize the LM Studio model name in the cloned template files.
         
     | 
| 
       429 
451 
     | 
    
         
             
                Args:
         
     | 
| 
       430 
452 
     | 
    
         
             
                 model_path: Path to the cloned model directory
         
     | 
| 
         @@ -438,6 +460,8 @@ def customize_lmstudio_model(model_path, model_name, port, context_length): 
     | 
|
| 
       438 
460 
     | 
    
         
             
                if os.path.exists(config_path):
         
     | 
| 
       439 
461 
     | 
    
         
             
                    with open(config_path, 'r') as f:
         
     | 
| 
       440 
462 
     | 
    
         
             
                        config = yaml.safe_load(f)
         
     | 
| 
      
 463 
     | 
    
         
            +
                    # Update the user_id in the model section
         
     | 
| 
      
 464 
     | 
    
         
            +
                    config['model']['user_id'] = user_id
         
     | 
| 
       441 
465 
     | 
    
         
             
                    if 'toolkit' not in config or config['toolkit'] is None:
         
     | 
| 
       442 
466 
     | 
    
         
             
                        config['toolkit'] = {}
         
     | 
| 
       443 
467 
     | 
    
         
             
                    if model_name is not None:
         
     | 
| 
         @@ -66,6 +66,7 @@ DEFAULT_OLLAMA_MODEL_REPO_BRANCH = "ollama" 
     | 
|
| 
       66 
66 
     | 
    
         
             
            DEFAULT_HF_MODEL_REPO_BRANCH = "huggingface"
         
     | 
| 
       67 
67 
     | 
    
         
             
            DEFAULT_LMSTUDIO_MODEL_REPO_BRANCH = "lmstudio"
         
     | 
| 
       68 
68 
     | 
    
         
             
            DEFAULT_VLLM_MODEL_REPO_BRANCH = "vllm"
         
     | 
| 
      
 69 
     | 
    
         
            +
            DEFAULT_PYTHON_MODEL_REPO_BRANCH = "python"
         
     | 
| 
       69 
70 
     | 
    
         | 
| 
       70 
71 
     | 
    
         
             
            STATUS_OK = "200 OK"
         
     | 
| 
       71 
72 
     | 
    
         
             
            STATUS_MIXED = "207 MIXED"
         
     | 
| 
         @@ -1 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            __version__ = "11.8.3"
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
    
        {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/datasets/upload/loaders/imagenet_classification.py
    RENAMED
    
    | 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
    
        {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/dockerfile_template/Dockerfile.template
    RENAMED
    
    | 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
    
        {clarifai-11.8.3 → clarifai-11.8.4}/clarifai/runners/pipeline_steps/pipeline_step_builder.py
    RENAMED
    
    | 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     | 
| 
         
            File without changes
         
     |