clarifai 11.0.7rc1__py3-none-any.whl → 11.1.0__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.
Files changed (109) hide show
  1. clarifai/__init__.py +1 -1
  2. clarifai/cli/model.py +15 -42
  3. clarifai/client/input.py +21 -3
  4. clarifai/runners/__init__.py +2 -2
  5. clarifai/runners/dockerfile_template/Dockerfile.template +3 -6
  6. clarifai/runners/models/base_typed_model.py +2 -2
  7. clarifai/runners/models/{model_upload.py → model_builder.py} +98 -12
  8. clarifai/runners/models/model_run_locally.py +23 -60
  9. clarifai/runners/models/model_runner.py +6 -8
  10. clarifai/runners/models/model_servicer.py +6 -6
  11. clarifai/runners/server.py +9 -45
  12. clarifai/runners/utils/loader.py +39 -3
  13. clarifai/utils/misc.py +11 -0
  14. {clarifai-11.0.7rc1.dist-info → clarifai-11.1.0.dist-info}/METADATA +26 -14
  15. clarifai-11.1.0.dist-info/RECORD +101 -0
  16. {clarifai-11.0.7rc1.dist-info → clarifai-11.1.0.dist-info}/WHEEL +1 -1
  17. clarifai/__pycache__/__init__.cpython-310.pyc +0 -0
  18. clarifai/__pycache__/errors.cpython-310.pyc +0 -0
  19. clarifai/__pycache__/versions.cpython-310.pyc +0 -0
  20. clarifai/cli/__main__.py~ +0 -4
  21. clarifai/cli/__pycache__/__init__.cpython-310.pyc +0 -0
  22. clarifai/cli/__pycache__/__main__.cpython-310.pyc +0 -0
  23. clarifai/cli/__pycache__/base.cpython-310.pyc +0 -0
  24. clarifai/cli/__pycache__/compute_cluster.cpython-310.pyc +0 -0
  25. clarifai/cli/__pycache__/deployment.cpython-310.pyc +0 -0
  26. clarifai/cli/__pycache__/model.cpython-310.pyc +0 -0
  27. clarifai/cli/__pycache__/nodepool.cpython-310.pyc +0 -0
  28. clarifai/client/__pycache__/__init__.cpython-310.pyc +0 -0
  29. clarifai/client/__pycache__/app.cpython-310.pyc +0 -0
  30. clarifai/client/__pycache__/base.cpython-310.pyc +0 -0
  31. clarifai/client/__pycache__/dataset.cpython-310.pyc +0 -0
  32. clarifai/client/__pycache__/input.cpython-310.pyc +0 -0
  33. clarifai/client/__pycache__/lister.cpython-310.pyc +0 -0
  34. clarifai/client/__pycache__/model.cpython-310.pyc +0 -0
  35. clarifai/client/__pycache__/module.cpython-310.pyc +0 -0
  36. clarifai/client/__pycache__/runner.cpython-310.pyc +0 -0
  37. clarifai/client/__pycache__/search.cpython-310.pyc +0 -0
  38. clarifai/client/__pycache__/user.cpython-310.pyc +0 -0
  39. clarifai/client/__pycache__/workflow.cpython-310.pyc +0 -0
  40. clarifai/client/auth/__pycache__/__init__.cpython-310.pyc +0 -0
  41. clarifai/client/auth/__pycache__/helper.cpython-310.pyc +0 -0
  42. clarifai/client/auth/__pycache__/register.cpython-310.pyc +0 -0
  43. clarifai/client/auth/__pycache__/stub.cpython-310.pyc +0 -0
  44. clarifai/constants/__pycache__/dataset.cpython-310.pyc +0 -0
  45. clarifai/constants/__pycache__/model.cpython-310.pyc +0 -0
  46. clarifai/constants/__pycache__/search.cpython-310.pyc +0 -0
  47. clarifai/datasets/__pycache__/__init__.cpython-310.pyc +0 -0
  48. clarifai/datasets/export/__pycache__/__init__.cpython-310.pyc +0 -0
  49. clarifai/datasets/export/__pycache__/inputs_annotations.cpython-310.pyc +0 -0
  50. clarifai/datasets/upload/__pycache__/__init__.cpython-310.pyc +0 -0
  51. clarifai/datasets/upload/__pycache__/base.cpython-310.pyc +0 -0
  52. clarifai/datasets/upload/__pycache__/features.cpython-310.pyc +0 -0
  53. clarifai/datasets/upload/__pycache__/image.cpython-310.pyc +0 -0
  54. clarifai/datasets/upload/__pycache__/text.cpython-310.pyc +0 -0
  55. clarifai/datasets/upload/__pycache__/utils.cpython-310.pyc +0 -0
  56. clarifai/models/__pycache__/__init__.cpython-310.pyc +0 -0
  57. clarifai/models/model_serving/__pycache__/__init__.cpython-310.pyc +0 -0
  58. clarifai/models/model_serving/__pycache__/constants.cpython-310.pyc +0 -0
  59. clarifai/models/model_serving/cli/__pycache__/__init__.cpython-310.pyc +0 -0
  60. clarifai/models/model_serving/cli/__pycache__/_utils.cpython-310.pyc +0 -0
  61. clarifai/models/model_serving/cli/__pycache__/base.cpython-310.pyc +0 -0
  62. clarifai/models/model_serving/cli/__pycache__/build.cpython-310.pyc +0 -0
  63. clarifai/models/model_serving/cli/__pycache__/create.cpython-310.pyc +0 -0
  64. clarifai/models/model_serving/model_config/__pycache__/__init__.cpython-310.pyc +0 -0
  65. clarifai/models/model_serving/model_config/__pycache__/base.cpython-310.pyc +0 -0
  66. clarifai/models/model_serving/model_config/__pycache__/config.cpython-310.pyc +0 -0
  67. clarifai/models/model_serving/model_config/__pycache__/inference_parameter.cpython-310.pyc +0 -0
  68. clarifai/models/model_serving/model_config/__pycache__/output.cpython-310.pyc +0 -0
  69. clarifai/models/model_serving/model_config/triton/__pycache__/__init__.cpython-310.pyc +0 -0
  70. clarifai/models/model_serving/model_config/triton/__pycache__/serializer.cpython-310.pyc +0 -0
  71. clarifai/models/model_serving/model_config/triton/__pycache__/triton_config.cpython-310.pyc +0 -0
  72. clarifai/models/model_serving/model_config/triton/__pycache__/wrappers.cpython-310.pyc +0 -0
  73. clarifai/models/model_serving/repo_build/__pycache__/__init__.cpython-310.pyc +0 -0
  74. clarifai/models/model_serving/repo_build/__pycache__/build.cpython-310.pyc +0 -0
  75. clarifai/models/model_serving/repo_build/static_files/__pycache__/base_test.cpython-310-pytest-7.2.0.pyc +0 -0
  76. clarifai/rag/__pycache__/__init__.cpython-310.pyc +0 -0
  77. clarifai/rag/__pycache__/rag.cpython-310.pyc +0 -0
  78. clarifai/rag/__pycache__/utils.cpython-310.pyc +0 -0
  79. clarifai/runners/__pycache__/__init__.cpython-310.pyc +0 -0
  80. clarifai/runners/__pycache__/server.cpython-310.pyc +0 -0
  81. clarifai/runners/dockerfile_template/Dockerfile.debug +0 -9
  82. clarifai/runners/models/__pycache__/__init__.cpython-310.pyc +0 -0
  83. clarifai/runners/models/__pycache__/base_typed_model.cpython-310.pyc +0 -0
  84. clarifai/runners/models/__pycache__/model_class.cpython-310.pyc +0 -0
  85. clarifai/runners/models/__pycache__/model_run_locally.cpython-310.pyc +0 -0
  86. clarifai/runners/models/__pycache__/model_runner.cpython-310.pyc +0 -0
  87. clarifai/runners/models/__pycache__/model_servicer.cpython-310.pyc +0 -0
  88. clarifai/runners/models/__pycache__/model_upload.cpython-310.pyc +0 -0
  89. clarifai/runners/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  90. clarifai/runners/utils/__pycache__/const.cpython-310.pyc +0 -0
  91. clarifai/runners/utils/__pycache__/data_handler.cpython-310.pyc +0 -0
  92. clarifai/runners/utils/__pycache__/data_utils.cpython-310.pyc +0 -0
  93. clarifai/runners/utils/__pycache__/loader.cpython-310.pyc +0 -0
  94. clarifai/runners/utils/__pycache__/logging.cpython-310.pyc +0 -0
  95. clarifai/runners/utils/__pycache__/url_fetcher.cpython-310.pyc +0 -0
  96. clarifai/schema/__pycache__/search.cpython-310.pyc +0 -0
  97. clarifai/urls/__pycache__/helper.cpython-310.pyc +0 -0
  98. clarifai/utils/__pycache__/__init__.cpython-310.pyc +0 -0
  99. clarifai/utils/__pycache__/logging.cpython-310.pyc +0 -0
  100. clarifai/utils/__pycache__/misc.cpython-310.pyc +0 -0
  101. clarifai/utils/__pycache__/model_train.cpython-310.pyc +0 -0
  102. clarifai/workflows/__pycache__/__init__.cpython-310.pyc +0 -0
  103. clarifai/workflows/__pycache__/export.cpython-310.pyc +0 -0
  104. clarifai/workflows/__pycache__/utils.cpython-310.pyc +0 -0
  105. clarifai/workflows/__pycache__/validate.cpython-310.pyc +0 -0
  106. clarifai-11.0.7rc1.dist-info/RECORD +0 -190
  107. {clarifai-11.0.7rc1.dist-info → clarifai-11.1.0.dist-info}/LICENSE +0 -0
  108. {clarifai-11.0.7rc1.dist-info → clarifai-11.1.0.dist-info}/entry_points.txt +0 -0
  109. {clarifai-11.0.7rc1.dist-info → clarifai-11.1.0.dist-info}/top_level.txt +0 -0
@@ -12,13 +12,13 @@ class ModelServicer(service_pb2_grpc.V2Servicer):
12
12
  This is the servicer that will handle the gRPC requests from either the dev server or runner loop.
13
13
  """
14
14
 
15
- def __init__(self, model_class):
15
+ def __init__(self, model):
16
16
  """
17
17
  Args:
18
- model_class: The class that will handle the model logic. Must implement predict(),
18
+ model: The class that will handle the model logic. Must implement predict(),
19
19
  generate(), stream().
20
20
  """
21
- self.model_class = model_class
21
+ self.model = model
22
22
 
23
23
  def PostModelOutputs(self, request: service_pb2.PostModelOutputsRequest,
24
24
  context=None) -> service_pb2.MultiOutputResponse:
@@ -31,7 +31,7 @@ class ModelServicer(service_pb2_grpc.V2Servicer):
31
31
  ensure_urls_downloaded(request)
32
32
 
33
33
  try:
34
- return self.model_class.predict(request)
34
+ return self.model.predict_wrapper(request)
35
35
  except Exception as e:
36
36
  return service_pb2.MultiOutputResponse(status=status_pb2.Status(
37
37
  code=status_code_pb2.MODEL_PREDICTION_FAILED,
@@ -50,7 +50,7 @@ class ModelServicer(service_pb2_grpc.V2Servicer):
50
50
  ensure_urls_downloaded(request)
51
51
 
52
52
  try:
53
- return self.model_class.generate(request)
53
+ return self.model.generate_wrapper(request)
54
54
  except Exception as e:
55
55
  yield service_pb2.MultiOutputResponse(status=status_pb2.Status(
56
56
  code=status_code_pb2.MODEL_PREDICTION_FAILED,
@@ -74,7 +74,7 @@ class ModelServicer(service_pb2_grpc.V2Servicer):
74
74
  ensure_urls_downloaded(req)
75
75
 
76
76
  try:
77
- return self.model_class.stream(request_copy)
77
+ return self.model.stream_wrapper(request_copy)
78
78
  except Exception as e:
79
79
  yield service_pb2.MultiOutputResponse(status=status_pb2.Status(
80
80
  code=status_code_pb2.MODEL_PREDICTION_FAILED,
@@ -4,18 +4,15 @@ and starts the server.
4
4
  """
5
5
 
6
6
  import argparse
7
- import importlib.util
8
- import inspect
9
7
  import os
10
- import sys
11
8
  from concurrent import futures
12
9
 
13
10
  from clarifai_grpc.grpc.api import service_pb2_grpc
14
- from clarifai_protocol import BaseRunner
15
11
  from clarifai_protocol.utils.grpc_server import GRPCServer
16
12
 
13
+ from clarifai.runners.models.model_builder import ModelBuilder
14
+ from clarifai.runners.models.model_runner import ModelRunner
17
15
  from clarifai.runners.models.model_servicer import ModelServicer
18
- from clarifai.runners.models.model_upload import ModelUploader
19
16
  from clarifai.utils.logging import logger
20
17
 
21
18
 
@@ -56,7 +53,7 @@ def main():
56
53
  'Set to true to enable TLS (default: False) since this server is meant for local development only.',
57
54
  )
58
55
  parser.add_argument(
59
- '--start_dev_server',
56
+ '--grpc',
60
57
  action='store_true',
61
58
  default=False,
62
59
  help=
@@ -71,49 +68,15 @@ def main():
71
68
 
72
69
  parsed_args = parser.parse_args()
73
70
 
74
- # import the runner class that to be implement by the user
75
- runner_path = os.path.join(parsed_args.model_path, "1", "model.py")
71
+ builder = ModelBuilder(parsed_args.model_path)
76
72
 
77
- # arbitrary name given to the module to be imported
78
- module = "runner_module"
79
-
80
- spec = importlib.util.spec_from_file_location(module, runner_path)
81
- runner_module = importlib.util.module_from_spec(spec)
82
- sys.modules[module] = runner_module
83
- spec.loader.exec_module(runner_module)
84
-
85
- # Find all classes in the model.py file that are subclasses of BaseRunner
86
- classes = [
87
- cls for _, cls in inspect.getmembers(runner_module, inspect.isclass)
88
- if issubclass(cls, BaseRunner) and cls.__module__ == runner_module.__name__
89
- ]
90
-
91
- # Ensure there is exactly one subclass of BaseRunner in the model.py file
92
- if len(classes) != 1:
93
- raise Exception("Expected exactly one subclass of BaseRunner, found: {}".format(len(classes)))
94
-
95
- MyRunner = classes[0]
73
+ model = builder.create_model_instance()
96
74
 
97
75
  # Setup the grpc server for local development.
98
- if parsed_args.start_dev_server:
99
-
100
- # We validate that we have checkpoints downloaded before constructing MyRunner which
101
- # will call load_model()
102
- uploader = ModelUploader(parsed_args.model_path)
103
- uploader.download_checkpoints()
104
-
105
- # initialize the Runner class. This is what the user implements.
106
- # we aren't going to call runner.start() to engage with the API so IDs are not necessary.
107
- runner = MyRunner(
108
- runner_id="n/a",
109
- nodepool_id="n/a",
110
- compute_cluster_id="n/a",
111
- user_id="n/a",
112
- health_check_port=None, # not needed when running local server
113
- )
76
+ if parsed_args.grpc:
114
77
 
115
78
  # initialize the servicer with the runner so that it gets the predict(), generate(), stream() classes.
116
- servicer = ModelServicer(runner)
79
+ servicer = ModelServicer(model)
117
80
 
118
81
  server = GRPCServer(
119
82
  futures.ThreadPoolExecutor(
@@ -133,7 +96,8 @@ def main():
133
96
  else: # start the runner with the proper env variables and as a runner protocol.
134
97
 
135
98
  # initialize the Runner class. This is what the user implements.
136
- runner = MyRunner(
99
+ runner = ModelRunner(
100
+ model=model,
137
101
  runner_id=os.environ["CLARIFAI_RUNNER_ID"],
138
102
  nodepool_id=os.environ["CLARIFAI_NODEPOOL_ID"],
139
103
  compute_cluster_id=os.environ["CLARIFAI_COMPUTE_CLUSTER_ID"],
@@ -3,7 +3,8 @@ import importlib.util
3
3
  import json
4
4
  import os
5
5
  import shutil
6
- import subprocess
6
+
7
+ import requests
7
8
 
8
9
  from clarifai.utils.logging import logger
9
10
 
@@ -17,9 +18,14 @@ class HuggingFaceLoader:
17
18
  self.token = token
18
19
  if token:
19
20
  if self.validate_hftoken(token):
20
- subprocess.run(f'huggingface-cli login --token={os.environ["HF_TOKEN"]}', shell=True)
21
+ try:
22
+ from huggingface_hub import login
23
+ except ImportError:
24
+ raise ImportError(self.HF_DOWNLOAD_TEXT)
25
+ login(token=token)
21
26
  logger.info("Hugging Face token validated")
22
27
  else:
28
+ self.token = None
23
29
  logger.info("Continuing without Hugging Face token")
24
30
 
25
31
  @classmethod
@@ -27,7 +33,6 @@ class HuggingFaceLoader:
27
33
  try:
28
34
  if importlib.util.find_spec("huggingface_hub") is None:
29
35
  raise ImportError(cls.HF_DOWNLOAD_TEXT)
30
- os.environ['HF_TOKEN'] = hf_token
31
36
  from huggingface_hub import HfApi
32
37
 
33
38
  api = HfApi()
@@ -166,3 +171,34 @@ class HuggingFaceLoader:
166
171
 
167
172
  labels = config['id2label']
168
173
  return labels
174
+
175
+ @staticmethod
176
+ def get_huggingface_checkpoint_total_size(repo_name):
177
+ """
178
+ Fetches the JSON data for a Hugging Face model using the API with `?blobs=true`.
179
+ Calculates the total size from the JSON output.
180
+
181
+ Args:
182
+ repo_name (str): The name of the model on Hugging Face Hub. e.g. "casperhansen/llama-3-8b-instruct-awq"
183
+
184
+ Returns:
185
+ int: The total size in bytes.
186
+ """
187
+ try:
188
+ url = f"https://huggingface.co/api/models/{repo_name}?blobs=true"
189
+ response = requests.get(url)
190
+ response.raise_for_status() # Raise an exception for bad status codes
191
+ json_data = response.json()
192
+
193
+ if isinstance(json_data, str):
194
+ data = json.loads(json_data)
195
+ else:
196
+ data = json_data
197
+
198
+ total_size = 0
199
+ for file in data['siblings']:
200
+ total_size += file['size']
201
+ return total_size
202
+ except Exception as e:
203
+ logger.error(f"Error fetching checkpoint size from huggingface.co: {e}")
204
+ return 0
clarifai/utils/misc.py CHANGED
@@ -1,4 +1,5 @@
1
1
  import os
2
+ import re
2
3
  import uuid
3
4
  from typing import Any, Dict, List
4
5
 
@@ -75,3 +76,13 @@ def concept_relations_accumulation(relations_dict: Dict[str, Any], subject_conce
75
76
  def get_uuid(val: int) -> str:
76
77
  """Generates a UUID."""
77
78
  return uuid.uuid4().hex[:val]
79
+
80
+
81
+ def clean_input_id(input_id: str) -> str:
82
+ """Clean input_id string into a valid input ID"""
83
+ input_id = re.sub('[., /]+', '_', input_id)
84
+ input_id = re.sub('[_]+', '_', input_id)
85
+ input_id = re.sub('[-]+', '-', input_id)
86
+ input_id = input_id.lower().strip('_-')
87
+ input_id = re.sub('[^a-z0-9-_]+', '', input_id)
88
+ return input_id
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: clarifai
3
- Version: 11.0.7rc1
3
+ Version: 11.1.0
4
4
  Summary: Clarifai Python SDK
5
5
  Home-page: https://github.com/Clarifai/clarifai-python
6
6
  Author: Clarifai
@@ -20,19 +20,31 @@ Classifier: Operating System :: OS Independent
20
20
  Requires-Python: >=3.8
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: clarifai-grpc >=11.0.4
24
- Requires-Dist: clarifai-protocol >=0.0.14
25
- Requires-Dist: numpy >=1.22.0
26
- Requires-Dist: tqdm >=4.65.0
27
- Requires-Dist: rich >=13.4.2
28
- Requires-Dist: PyYAML >=6.0.1
29
- Requires-Dist: schema ==0.7.5
30
- Requires-Dist: Pillow >=9.5.0
31
- Requires-Dist: tabulate >=0.9.0
32
- Requires-Dist: fsspec ==2024.6.1
33
- Requires-Dist: click ==8.1.7
23
+ Requires-Dist: clarifai-grpc>=11.0.7
24
+ Requires-Dist: clarifai-protocol>=0.0.16
25
+ Requires-Dist: numpy>=1.22.0
26
+ Requires-Dist: tqdm>=4.65.0
27
+ Requires-Dist: rich>=13.4.2
28
+ Requires-Dist: PyYAML>=6.0.1
29
+ Requires-Dist: schema==0.7.5
30
+ Requires-Dist: Pillow>=9.5.0
31
+ Requires-Dist: tabulate>=0.9.0
32
+ Requires-Dist: fsspec==2024.6.1
33
+ Requires-Dist: click==8.1.7
34
+ Requires-Dist: requests==2.32.3
34
35
  Provides-Extra: all
35
- Requires-Dist: pycocotools ==2.0.6 ; extra == 'all'
36
+ Requires-Dist: pycocotools==2.0.6; extra == "all"
37
+ Dynamic: author
38
+ Dynamic: author-email
39
+ Dynamic: classifier
40
+ Dynamic: description
41
+ Dynamic: description-content-type
42
+ Dynamic: home-page
43
+ Dynamic: license
44
+ Dynamic: provides-extra
45
+ Dynamic: requires-dist
46
+ Dynamic: requires-python
47
+ Dynamic: summary
36
48
 
37
49
  <h1 align="center">
38
50
  <a href="https://www.clarifai.com/"><img alt="Clarifai" title="Clarifai" src="https://github.com/user-attachments/assets/623b883b-7fe5-4b95-bbfa-8691f5779af4"></a>
@@ -0,0 +1,101 @@
1
+ clarifai/__init__.py,sha256=5eqXAZgVViX8GN8WbhGikfWiIAnt-0S57_GDXj5j6uI,23
2
+ clarifai/cli.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ clarifai/errors.py,sha256=RwzTajwds51wLD0MVlMC5kcpBnzRpreDLlazPSBZxrg,2605
4
+ clarifai/versions.py,sha256=jctnczzfGk_S3EnVqb2FjRKfSREkNmvNEwAAa_VoKiQ,222
5
+ clarifai/cli/README.md,sha256=YGApHfeUyu5P0Pdth-mqQCQftWHDxz6bugDlvDXDhOE,1942
6
+ clarifai/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ clarifai/cli/__main__.py,sha256=utJ2F40cl0jPHcYdTlGZRqpPfZ0CtVYB-8Ft0b2fWD4,72
8
+ clarifai/cli/base.py,sha256=eaUsp7S1e2dslC437Hjk7gUBQsng13ID3N3lkYotB2U,3403
9
+ clarifai/cli/compute_cluster.py,sha256=N2dNQNJEPg9nxsb8x2igEzYuGRzjn7l4kNttjFIxmhI,1827
10
+ clarifai/cli/deployment.py,sha256=sUEuz5-rtozMx8deVcJXLi6lHsP2jc8x3y2MpUAVfqY,2506
11
+ clarifai/cli/model.py,sha256=DPSufiOXQAi6DVn6lNUwZV3-hvOLgfJWJuzc6xQsgLQ,10020
12
+ clarifai/cli/nodepool.py,sha256=yihxS_rIFoBBKzRlqBX8Ab42iPpBMJrJFsk8saph6ms,3049
13
+ clarifai/client/__init__.py,sha256=xI1U0l5AZdRThvQAXCLsd9axxyFzXXJ22m8LHqVjQRU,662
14
+ clarifai/client/app.py,sha256=6pckYme1urV2YJjLIYfeZ-vH0Z5YSQa51jzIMcEfwug,38342
15
+ clarifai/client/base.py,sha256=hSHOqkXbSKyaRDeylMMnkhUHCAHhEqno4KI0CXGziBA,7536
16
+ clarifai/client/compute_cluster.py,sha256=EvW9TJjPvInUlggfg1A98sxoWH8_PY5rCVXZhsj6ac0,8705
17
+ clarifai/client/dataset.py,sha256=y3zKT_VhP1gyN3OO-b3cPeW21ZXyKbQ7ZJkEG06bsTU,32096
18
+ clarifai/client/deployment.py,sha256=w7Y6pA1rYG4KRK1SwusRZc2sQRXlG8wezuVdzSWpCo0,2586
19
+ clarifai/client/input.py,sha256=obMAHMDU1OwfXZ8KraOnGFlWzlW-3F7Ob_2lcOQMlhY,46339
20
+ clarifai/client/lister.py,sha256=03KGMvs5RVyYqxLsSrWhNc34I8kiF1Ph0NeyEwu7nMU,2082
21
+ clarifai/client/model.py,sha256=0HC22i8RCjkC2lwRKnokMR6eaSt9_XXbi1Oim4sZVk4,88620
22
+ clarifai/client/module.py,sha256=FTkm8s9m-EaTKN7g9MnLhGJ9eETUfKG7aWZ3o1RshYs,4204
23
+ clarifai/client/nodepool.py,sha256=la3vTFrO4LX8zm2eQ5jqf2L0-kQ63Dano8FibadoZbk,10152
24
+ clarifai/client/search.py,sha256=GaPWN6JmTQGZaCHr6U1yv0zqR6wKFl7i9IVLg2ul1CI,14254
25
+ clarifai/client/user.py,sha256=WOv66ww2wx9isIge3V-xTHCkqC6akl2jEGAxzT_Ugfs,17642
26
+ clarifai/client/workflow.py,sha256=BOmA1ilHxsw-yl_ZE1NOEshzV7owavnXTIG2UOD6PuA,12163
27
+ clarifai/client/auth/__init__.py,sha256=7EwR0NrozkAUwpUnCsqXvE_p0wqx_SelXlSpKShKJK0,136
28
+ clarifai/client/auth/helper.py,sha256=Ngw5IDkOWvnOz5YwViVk55z3mC52MyezLc0G3WxLqok,14643
29
+ clarifai/client/auth/register.py,sha256=2CMdBsoVLoTfjyksE6j7BM2tiEc73WKYvxnwDDgNn1k,536
30
+ clarifai/client/auth/stub.py,sha256=xy4-fV0W8keCgXld4eOVzFQEIKxOktNwtL5bLztReug,4940
31
+ clarifai/constants/base.py,sha256=ogmFSZYoF0YhGjHg5aiOc3MLqPr_poKAls6xaD0_C3U,89
32
+ clarifai/constants/dataset.py,sha256=vjK3IlgXu31HycuvjRSzEQSqhU6xfj5TIgo6IpyUWoc,609
33
+ clarifai/constants/input.py,sha256=WcHwToUVIK9ItAhDefaSohQHCLNeR55PSjZ0BFnoZ3U,28
34
+ clarifai/constants/model.py,sha256=Um1hLfMFlh5R_vtP3Z6P-o6zon-tdbLcKVIl4PucrV4,438
35
+ clarifai/constants/rag.py,sha256=WcHwToUVIK9ItAhDefaSohQHCLNeR55PSjZ0BFnoZ3U,28
36
+ clarifai/constants/search.py,sha256=yYEqTaFg-KdnpJE_Ytp-EPVHIIC395iNtZrpVlLIf4o,101
37
+ clarifai/constants/workflow.py,sha256=cECq1xdvf44MCdtK2AbkiuuwhyL-6OWZdQfYbsLKy_o,33
38
+ clarifai/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
+ clarifai/datasets/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
+ clarifai/datasets/export/inputs_annotations.py,sha256=3AtUBrMIjw8H3ehDsJFYcBFoAZ1QKQo1hXTMsHh8f20,10159
41
+ clarifai/datasets/upload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
+ clarifai/datasets/upload/base.py,sha256=UIc0ufyIBCrb83_sFpv21L8FshsX4nwsLYQkdlJfzD4,2357
43
+ clarifai/datasets/upload/features.py,sha256=GK69WvUYnks5G26Z5L5XSisBIZILLv7lYhS2y8BJCt0,2031
44
+ clarifai/datasets/upload/image.py,sha256=HlCsfEMu_C4GVecGSv52RUJ6laLW8H64Pfj_FQyX6qg,8580
45
+ clarifai/datasets/upload/multimodal.py,sha256=_NpNQak9KMn0NOiOr48MYnXL0GQZ1LXKhwdYF1HhrHs,2377
46
+ clarifai/datasets/upload/text.py,sha256=dpRMNz49EyKau0kwksEaNV6TLBUf5lSr7t5g3pG2byM,2298
47
+ clarifai/datasets/upload/utils.py,sha256=BerWhq40ZUN30z6VImlc93eZtT-1vI18AMgSOuNzJEM,9647
48
+ clarifai/datasets/upload/loaders/README.md,sha256=aNRutSCTzLp2ruIZx74ZkN5AxpzwKOxMa7OzabnKpwg,2980
49
+ clarifai/datasets/upload/loaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
+ clarifai/datasets/upload/loaders/coco_captions.py,sha256=YfuNXplbdoH8N9ph7RyN9MfJTtOcJBG4ie1ow6-mELA,1516
51
+ clarifai/datasets/upload/loaders/coco_detection.py,sha256=_I_yThw435KS9SH7zheBbJDK3zFgjTImBsES__ijjMk,2831
52
+ clarifai/datasets/upload/loaders/imagenet_classification.py,sha256=i7W5F6FTB3LwLmhPgjZHmbCbS3l4LmjsuBFKtjxl1pU,1962
53
+ clarifai/datasets/upload/loaders/xview_detection.py,sha256=hk8cZdYZimm4KOaZvBjYcC6ikURZMn51xmn7pXZT3HE,6052
54
+ clarifai/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ clarifai/models/api.py,sha256=d3FQQlG0mNDLrfEvchqaVcq4Tgb_TqryNnJtwp3c7sE,10961
56
+ clarifai/modules/README.md,sha256=mx8pVx6cPp-pP4LcFPT_nX3ngGmhygVK0WiXeD3cbIo,367
57
+ clarifai/modules/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
+ clarifai/modules/css.py,sha256=kadCEunmyh5h2yf0-4aysE3ZcZ6qaQcxuAgDXS96yF8,2020
59
+ clarifai/modules/pages.py,sha256=iOoM3RNRMgXlV0qBqcdQofxoXo2RuRQh0h9c9BIS0-I,1383
60
+ clarifai/modules/style.css,sha256=j7FNPZVhLPj35vvBksAJ90RuX5sLuqzDR5iM2WIEhiA,6073
61
+ clarifai/rag/__init__.py,sha256=wu3PzAzo7uqgrEzuaC9lY_3gj1HFiR3GU3elZIKTT5g,40
62
+ clarifai/rag/rag.py,sha256=bqUWnfdf91OYMucEK0_rJXDwg0oKjz5c7eda-9CPXu8,12680
63
+ clarifai/rag/utils.py,sha256=yr1jAcbpws4vFGBqlAwPPE7v1DRba48g8gixLFw8OhQ,4070
64
+ clarifai/runners/__init__.py,sha256=FcTqyCvPn9lJFDsi2eGZ-YL8LgPhJmRAS8K5Wobk03s,411
65
+ clarifai/runners/server.py,sha256=LnsJbX39oCX5o2ogCj1GTrRlFYQjMj9oHl57rHnXwjc,3586
66
+ clarifai/runners/dockerfile_template/Dockerfile.template,sha256=EQBSFvC3Cap2du3XbWnn6tfQvIWH-1wTkHN-nO0clBk,3191
67
+ clarifai/runners/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
+ clarifai/runners/models/base_typed_model.py,sha256=0QCWxch8CcyJSKvE1D4PILd2RSnQZHTmx4DXlQQ6dpo,7856
69
+ clarifai/runners/models/model_builder.py,sha256=1IPlUyp_xyMUw8UpVZrL9pUzuC7heeT57w6AKpXeoos,28683
70
+ clarifai/runners/models/model_class.py,sha256=9JSPAr4U4K7xI0kSl-q0mHB06zknm2OR-8XIgBCto94,1611
71
+ clarifai/runners/models/model_run_locally.py,sha256=v-Ak05BK42HUy_cyNrWvd6crOORcOTTOHbzoVjHFtkA,20553
72
+ clarifai/runners/models/model_runner.py,sha256=PyxwK-33hLlhkD07tTXkjWZ_iNlZHl9_8AZ2W7WfExI,6097
73
+ clarifai/runners/models/model_servicer.py,sha256=jtQmtGeQlvQ5ttMvVw7CMnNzq-rLkTaxR2IWF9SnHwk,2808
74
+ clarifai/runners/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
+ clarifai/runners/utils/const.py,sha256=L1yhOHzFHdPRJRhz7QEvu7AR_82C8tfL4UdZRy2DExs,948
76
+ clarifai/runners/utils/data_handler.py,sha256=sxy9zlAgI6ETuxCQhUgEXAn2GCsaW1GxpK6GTaMne0g,6966
77
+ clarifai/runners/utils/data_utils.py,sha256=R1iQ82TuQ9JwxCJk8yEB1Lyb0BYVhVbWJI9YDi1zGOs,318
78
+ clarifai/runners/utils/loader.py,sha256=JUy2nTP2gxhRC5lH77kPCRhoMnchYpVs-Gan2njFVf4,7132
79
+ clarifai/runners/utils/url_fetcher.py,sha256=v_8JOWmkyFAzsBulsieKX7Nfjy1Yg7wGSZeqfEvw2cg,1640
80
+ clarifai/schema/search.py,sha256=JjTi8ammJgZZ2OGl4K6tIA4zEJ1Fr2ASZARXavI1j5c,2448
81
+ clarifai/urls/helper.py,sha256=tjoMGGHuWX68DUB0pk4MEjrmFsClUAQj2jmVEM_Sy78,4751
82
+ clarifai/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
83
+ clarifai/utils/cli.py,sha256=CdcLsF00KdfA-BgMIbO-u88gUF9Ts1n0TDDZS-oImp8,1949
84
+ clarifai/utils/constants.py,sha256=MG_iHnSwNEyUZOpvsrTicNwaT4CIjmlK_Ixk_qqEX8g,142
85
+ clarifai/utils/logging.py,sha256=2I7GWuqPm7JuGGBwME1464-DsQaJhEb0V0-z0P2-1h4,11847
86
+ clarifai/utils/misc.py,sha256=FTmjnjkvytSVb712J2qndVDYD8XUL70LE-G-5PNL3m4,2601
87
+ clarifai/utils/model_train.py,sha256=Mndqy5GNu7kjQHjDyNVyamL0hQFLGSHcWhOuPyOvr1w,8005
88
+ clarifai/utils/evaluation/__init__.py,sha256=PYkurUrXrGevByj7RFb6CoU1iC7fllyQSfnnlo9WnY8,69
89
+ clarifai/utils/evaluation/helpers.py,sha256=aZeHLI7oSmU5YDWQp5GdkYW5qbHx37nV9xwunKTAwWM,18549
90
+ clarifai/utils/evaluation/main.py,sha256=sQAuMk0lPclXCYvy_rS7rYteo2xh9Ju13VNvbyGt_VM,15779
91
+ clarifai/utils/evaluation/testset_annotation_parser.py,sha256=iZfLw6oR1qgJ3MHMbOZXcGBLu7btSDn0VqdiAzpIm4g,5002
92
+ clarifai/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
93
+ clarifai/workflows/export.py,sha256=vICRhIreqDSShxLKjHNM2JwzKsf1B4fdXB0ciMcA70k,1945
94
+ clarifai/workflows/utils.py,sha256=nGeB_yjVgUO9kOeKTg4OBBaBz-AwXI3m-huSVj-9W18,1924
95
+ clarifai/workflows/validate.py,sha256=yJq03MaJqi5AK3alKGJJBR89xmmjAQ31sVufJUiOqY8,2556
96
+ clarifai-11.1.0.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
97
+ clarifai-11.1.0.dist-info/METADATA,sha256=OzwQ_1ZaOZAALFWjLVsd5zPGJe0d1VM_w9dzQeuERtc,22419
98
+ clarifai-11.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
99
+ clarifai-11.1.0.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
100
+ clarifai-11.1.0.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
101
+ clarifai-11.1.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
Binary file
clarifai/cli/__main__.py~ DELETED
@@ -1,4 +0,0 @@
1
- from my_cli_tool.cli import main
2
-
3
- if __name__ == "__main__":
4
- main()
@@ -1,9 +0,0 @@
1
- FROM --platform=$TARGETPLATFORM public.ecr.aws/docker/library/python:3.12-slim-bookworm as pybase
2
-
3
- #############################
4
- # Final runtime image
5
- #############################
6
- FROM --platform=$TARGETPLATFORM ${RUNTIME_IMAGE} as final
7
-
8
- COPY --from=pybase --link=true /usr/bin/ls /usr/bin/cat /usr/bin/which /usr/bin/bash /usr/bin/sort /usr/bin/du /usr/bin/
9
- COPY --from=pybase --link=true /bin/rbash /bin/sh /bin/rm /bin/