clarifai 11.7.0__py3-none-any.whl → 11.7.2__py3-none-any.whl

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/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "11.7.0"
1
+ __version__ = "11.7.2"
@@ -739,7 +739,7 @@ class ModelBuilder:
739
739
  logger.info(f"Setup: Validating requirements.txt file at {path} using uv pip compile")
740
740
  # Don't log the output of the comment unless it errors.
741
741
  result = subprocess.run(
742
- f"uv pip compile {path} --universal --python {python_version} --no-header --no-emit-index-url",
742
+ f"uv pip compile {path} --universal --python {python_version} --no-header --no-emit-index-url --no-cache-dir",
743
743
  shell=True,
744
744
  text=True,
745
745
  capture_output=True,
@@ -133,10 +133,12 @@ class OpenAIModelClass(ModelClass):
133
133
  request_data['top_p'] = float(request_data['top_p'])
134
134
  # Note(zeiler): temporary fix for our playground sending additional fields.
135
135
  # FIXME: remove this once the playground is updated.
136
- for m in request_data['messages']:
137
- m.pop('id', None)
138
- m.pop('file', None)
139
- m.pop('panelId', None)
136
+ # Shouldn't need to do anything with the responses API since playground isn't yet using it.
137
+ if 'messages' in request_data:
138
+ for m in request_data['messages']:
139
+ m.pop('id', None)
140
+ m.pop('file', None)
141
+ m.pop('panelId', None)
140
142
 
141
143
  # Handle the "Currently only named tools are supported." error we see from trt-llm
142
144
  if 'tools' in request_data and request_data['tools'] is None:
@@ -194,6 +196,7 @@ class OpenAIModelClass(ModelClass):
194
196
  # Handle responses endpoint
195
197
  stream_response = self._route_request(endpoint, request_data)
196
198
  for chunk in stream_response:
199
+ self._set_usage(chunk)
197
200
  yield chunk.model_dump_json()
198
201
  else:
199
202
  completion_args = self._create_completion_args(request_data)
@@ -29,7 +29,7 @@ def main():
29
29
  '--pool_size',
30
30
  type=int,
31
31
  default=os.environ.get('CLARIFAI_NUM_THREADS', 32),
32
- help="The number of threads to use for the gRPC server.",
32
+ help="The number of threads to use for the gRPC server. Runner (ie. grpc=False) threads are read from the config file and ModelBuilder defaults.",
33
33
  choices=range(1, 129),
34
34
  ) # pylint: disable=range-builtin-not-iterating
35
35
  parser.add_argument(
@@ -67,13 +67,13 @@ def main():
67
67
  parsed_args = parser.parse_args()
68
68
 
69
69
  serve(
70
- parsed_args.model_path,
71
- parsed_args.port,
72
- parsed_args.pool_size,
73
- parsed_args.max_queue_size,
74
- parsed_args.max_msg_length,
75
- parsed_args.enable_tls,
76
- parsed_args.grpc,
70
+ model_path=parsed_args.model_path,
71
+ port=parsed_args.port,
72
+ pool_size=parsed_args.pool_size,
73
+ max_queue_size=parsed_args.max_queue_size,
74
+ max_msg_length=parsed_args.max_msg_length,
75
+ enable_tls=parsed_args.enable_tls,
76
+ grpc=parsed_args.grpc,
77
77
  )
78
78
 
79
79
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: clarifai
3
- Version: 11.7.0
3
+ Version: 11.7.2
4
4
  Home-page: https://github.com/Clarifai/clarifai-python
5
5
  Author: Clarifai
6
6
  Author-email: support@clarifai.com
@@ -1,4 +1,4 @@
1
- clarifai/__init__.py,sha256=rSjRBQs9AcakQYnfj7YZFHQKbSsnq8BzM_MJeZ3UZ1M,23
1
+ clarifai/__init__.py,sha256=6gn-LTh3dEaW8xtpYwCmhIveFTKvM01jgLce36FaA10,23
2
2
  clarifai/cli.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  clarifai/errors.py,sha256=GXa6D4v_L404J83jnRNFPH7s-1V9lk7w6Ws99f1g-AY,2772
4
4
  clarifai/versions.py,sha256=ecSuEB_nOL2XSoYHDw2n23XUbm_KPOGjudMXmQrGdS8,224
@@ -72,17 +72,17 @@ clarifai/rag/__init__.py,sha256=wu3PzAzo7uqgrEzuaC9lY_3gj1HFiR3GU3elZIKTT5g,40
72
72
  clarifai/rag/rag.py,sha256=EG3GoFrHFCmA70Tz49_0Jo1-3WIaHSgWGHecPeErcdc,14170
73
73
  clarifai/rag/utils.py,sha256=_gVZdABuMnraCKViLruV75x0F3IpgFXN6amYSGE5_xc,4462
74
74
  clarifai/runners/__init__.py,sha256=wXLaSljH7qLeJCrZdKEnlQh2tNqTQAIZKWOu2rZ6wGs,279
75
- clarifai/runners/server.py,sha256=YgF-ZInjQ1DZeZ9UmK77rW35IUIXrJYa3SSm2xoXGtc,6252
75
+ clarifai/runners/server.py,sha256=B8cNLCRVWUtSmPUYTReyi3g8rKh5iDrePhp28CzUyoY,6413
76
76
  clarifai/runners/dockerfile_template/Dockerfile.template,sha256=nEnIMqzhAXDbd0Ht7QQm0U7AVPIHWQD6kYnFZ0TKJUM,2428
77
77
  clarifai/runners/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
78
  clarifai/runners/models/dummy_openai_model.py,sha256=LfAJu173uTEYsN6xpaJ6TyimohyTooX16H6YYk9qVLs,8636
79
79
  clarifai/runners/models/mcp_class.py,sha256=RdKn7rW4vYol0VRDZiLTSMfkqjLhO1ijXAQ0Rq0Jfnw,6647
80
- clarifai/runners/models/model_builder.py,sha256=N7CyOt-jP5FGJGNvarHtlmEd_O6kNXEyaRJVmSdH3MU,70929
80
+ clarifai/runners/models/model_builder.py,sha256=nAu2H2I8PQiGeFGULwWKhlBX19QYI6sOmjwD3TrjxB0,70943
81
81
  clarifai/runners/models/model_class.py,sha256=Ndh437BNMkpFBo6B108GuKL8sGYaGnSplZ6FxOgd_v8,20010
82
82
  clarifai/runners/models/model_run_locally.py,sha256=6-6WjEKc0ba3gAv4wOLdMs2XOzS3b-2bZHJS0wdVqJY,20088
83
83
  clarifai/runners/models/model_runner.py,sha256=RxhYawEX6vJKTZZ_AmcHwo2ONwT7V7e3W-vXuunY7eI,11874
84
84
  clarifai/runners/models/model_servicer.py,sha256=415RqiXCPH-1WgFHrtZMDH1nb8gaQDpVlrQ_tvtbjOg,4523
85
- clarifai/runners/models/openai_class.py,sha256=KWKZKNcsGDYX6Ro2Y0kK7xcMi4YDziKRZHr_3v_g7ns,8694
85
+ clarifai/runners/models/openai_class.py,sha256=v3R1CoUIeS9dh9jhGH7G7Jih9DLXkHvieQLjMtC4Gas,8892
86
86
  clarifai/runners/models/visual_classifier_class.py,sha256=1ZoLfCT2crrgRbejjTMAIwpTRgQMiH9N9yflOVpFxSg,2721
87
87
  clarifai/runners/models/visual_detector_class.py,sha256=ky4oFAkGCKPpGPdgaOso-n6D3HcmnbKee_8hBsNiV8U,2883
88
88
  clarifai/runners/pipeline_steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -120,9 +120,9 @@ clarifai/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
120
120
  clarifai/workflows/export.py,sha256=HvUYG9N_-UZoRR0-_tdGbZ950_AeBqawSppgUxQebR0,1913
121
121
  clarifai/workflows/utils.py,sha256=ESL3INcouNcLKCh-nMpfXX-YbtCzX7tz7hT57_RGQ3M,2079
122
122
  clarifai/workflows/validate.py,sha256=UhmukyHkfxiMFrPPeBdUTiCOHQT5-shqivlBYEyKTlU,2931
123
- clarifai-11.7.0.dist-info/licenses/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
124
- clarifai-11.7.0.dist-info/METADATA,sha256=AUq4ocwllb6s3rBIAqLHoIzJiYxzIYx1UnXQ7MB4ihg,23161
125
- clarifai-11.7.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
126
- clarifai-11.7.0.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
127
- clarifai-11.7.0.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
128
- clarifai-11.7.0.dist-info/RECORD,,
123
+ clarifai-11.7.2.dist-info/licenses/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
124
+ clarifai-11.7.2.dist-info/METADATA,sha256=-lB70fchjL4QxbV6k4CHm4rVpyqwkFaP6YAmBPzFByI,23161
125
+ clarifai-11.7.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
126
+ clarifai-11.7.2.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
127
+ clarifai-11.7.2.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
128
+ clarifai-11.7.2.dist-info/RECORD,,