clarifai 9.6.2__tar.gz → 9.6.3__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.
Files changed (193) hide show
  1. {clarifai-9.6.2/clarifai.egg-info → clarifai-9.6.3}/PKG-INFO +1 -1
  2. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/modules/style.css +7 -0
  3. clarifai-9.6.2/clarifai_utils/runners/api.py → clarifai-9.6.3/clarifai/runners/base.py +52 -7
  4. clarifai-9.6.3/clarifai/runners/example.py +36 -0
  5. {clarifai-9.6.2 → clarifai-9.6.3/clarifai.egg-info}/PKG-INFO +1 -1
  6. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai.egg-info/SOURCES.txt +4 -2
  7. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/modules/style.css +7 -0
  8. clarifai-9.6.2/clarifai/runners/api.py → clarifai-9.6.3/clarifai_utils/runners/base.py +52 -7
  9. clarifai-9.6.3/clarifai_utils/runners/example.py +36 -0
  10. {clarifai-9.6.2 → clarifai-9.6.3}/setup.py +1 -1
  11. {clarifai-9.6.2 → clarifai-9.6.3}/LICENSE +0 -0
  12. {clarifai-9.6.2 → clarifai-9.6.3}/MANIFEST.in +0 -0
  13. {clarifai-9.6.2 → clarifai-9.6.3}/README.md +0 -0
  14. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/__init__.py +0 -0
  15. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/auth/__init__.py +0 -0
  16. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/auth/helper.py +0 -0
  17. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/client/__init__.py +0 -0
  18. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/client/abc.py +0 -0
  19. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/client/stub.py +0 -0
  20. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/__init__.py +0 -0
  21. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/convert_csv.py +0 -0
  22. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/__init__.py +0 -0
  23. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/base.py +0 -0
  24. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/features.py +0 -0
  25. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/image.py +0 -0
  26. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/text.py +0 -0
  27. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/zoo/__init__.py +0 -0
  28. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/zoo/coco_captions.py +0 -0
  29. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/zoo/coco_detection.py +0 -0
  30. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/zoo/coco_segmentation.py +0 -0
  31. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/zoo/imagenet_classification.py +0 -0
  32. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/datasets/zoo/xview_detection.py +0 -0
  33. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_classification/__init__.py +0 -0
  34. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_classification/cifar10/__init__.py +0 -0
  35. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_classification/cifar10/dataset.py +0 -0
  36. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_classification/food-101/__init__.py +0 -0
  37. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_classification/food-101/dataset.py +0 -0
  38. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_detection/__init__.py +0 -0
  39. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_detection/voc/__init__.py +0 -0
  40. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_detection/voc/dataset.py +0 -0
  41. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_segmentation/__init__.py +0 -0
  42. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_segmentation/coco/__init__.py +0 -0
  43. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/image_segmentation/coco/dataset.py +0 -0
  44. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/text_classification/__init__.py +0 -0
  45. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/text_classification/imdb_dataset/__init__.py +0 -0
  46. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples/text_classification/imdb_dataset/dataset.py +0 -0
  47. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/examples.py +0 -0
  48. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/data_upload/upload.py +0 -0
  49. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/dataset_export/dataset_export_inputs.py +0 -0
  50. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/__init__.py +0 -0
  51. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/concepts.py +0 -0
  52. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/datasets.py +0 -0
  53. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/inputs.py +0 -0
  54. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/installed_module_versions.py +0 -0
  55. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/lister.py +0 -0
  56. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/models.py +0 -0
  57. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/module_versions.py +0 -0
  58. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/listing/modules.py +0 -0
  59. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/__init__.py +0 -0
  60. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/api.py +0 -0
  61. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/__init__.py +0 -0
  62. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/cli/__init__.py +0 -0
  63. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/cli/deploy_cli.py +0 -0
  64. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/cli/model_zip.py +0 -0
  65. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/cli/repository.py +0 -0
  66. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/constants.py +0 -0
  67. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/image_classification/age_vit/1/__init__.py +0 -0
  68. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/image_classification/age_vit/1/inference.py +0 -0
  69. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/image_classification/age_vit/1/model.py +0 -0
  70. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/text_classification/xlm-roberta/1/__init__.py +0 -0
  71. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/text_classification/xlm-roberta/1/inference.py +0 -0
  72. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/text_classification/xlm-roberta/1/model.py +0 -0
  73. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/text_to_text/bart-summarize/1/__init__.py +0 -0
  74. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/text_to_text/bart-summarize/1/inference.py +0 -0
  75. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/text_to_text/bart-summarize/1/model.py +0 -0
  76. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/visual_detection/yolov5x/1/inference.py +0 -0
  77. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/visual_detection/yolov5x/1/model.py +0 -0
  78. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/visual_embedding/vit-base/1/__init__.py +0 -0
  79. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/visual_embedding/vit-base/1/inference.py +0 -0
  80. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/visual_embedding/vit-base/1/model.py +0 -0
  81. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/visual_segmentation/segformer-b2/1/__init__.py +0 -0
  82. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/visual_segmentation/segformer-b2/1/inference.py +0 -0
  83. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/examples/visual_segmentation/segformer-b2/1/model.py +0 -0
  84. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/model_config/__init__.py +0 -0
  85. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/model_config/deploy.py +0 -0
  86. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/model_config/serializer.py +0 -0
  87. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/model_config/triton_config.py +0 -0
  88. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/models/__init__.py +0 -0
  89. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/models/inference.py +0 -0
  90. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/models/model_types.py +0 -0
  91. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/models/output.py +0 -0
  92. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/models/pb_model.py +0 -0
  93. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/models/model_serving/pb_model_repository.py +0 -0
  94. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/modules/__init__.py +0 -0
  95. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/modules/css.py +0 -0
  96. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/modules/pages.py +0 -0
  97. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/runners/__init__.py +0 -0
  98. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/urls/__init__.py +0 -0
  99. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai/urls/helper.py +0 -0
  100. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai.egg-info/dependency_links.txt +0 -0
  101. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai.egg-info/entry_points.txt +0 -0
  102. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai.egg-info/requires.txt +0 -0
  103. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai.egg-info/top_level.txt +0 -0
  104. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/__init__.py +0 -0
  105. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/auth/__init__.py +0 -0
  106. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/auth/helper.py +0 -0
  107. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/client/__init__.py +0 -0
  108. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/client/abc.py +0 -0
  109. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/client/stub.py +0 -0
  110. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/__init__.py +0 -0
  111. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/convert_csv.py +0 -0
  112. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/__init__.py +0 -0
  113. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/base.py +0 -0
  114. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/features.py +0 -0
  115. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/image.py +0 -0
  116. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/text.py +0 -0
  117. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/zoo/__init__.py +0 -0
  118. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/zoo/coco_captions.py +0 -0
  119. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/zoo/coco_detection.py +0 -0
  120. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/zoo/coco_segmentation.py +0 -0
  121. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/zoo/imagenet_classification.py +0 -0
  122. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/datasets/zoo/xview_detection.py +0 -0
  123. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_classification/__init__.py +0 -0
  124. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_classification/cifar10/__init__.py +0 -0
  125. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_classification/cifar10/dataset.py +0 -0
  126. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_classification/food-101/__init__.py +0 -0
  127. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_classification/food-101/dataset.py +0 -0
  128. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_detection/__init__.py +0 -0
  129. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_detection/voc/__init__.py +0 -0
  130. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_detection/voc/dataset.py +0 -0
  131. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_segmentation/__init__.py +0 -0
  132. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_segmentation/coco/__init__.py +0 -0
  133. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/image_segmentation/coco/dataset.py +0 -0
  134. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/text_classification/__init__.py +0 -0
  135. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/text_classification/imdb_dataset/__init__.py +0 -0
  136. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples/text_classification/imdb_dataset/dataset.py +0 -0
  137. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/examples.py +0 -0
  138. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/data_upload/upload.py +0 -0
  139. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/dataset_export/dataset_export_inputs.py +0 -0
  140. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/__init__.py +0 -0
  141. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/concepts.py +0 -0
  142. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/datasets.py +0 -0
  143. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/inputs.py +0 -0
  144. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/installed_module_versions.py +0 -0
  145. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/lister.py +0 -0
  146. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/models.py +0 -0
  147. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/module_versions.py +0 -0
  148. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/listing/modules.py +0 -0
  149. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/__init__.py +0 -0
  150. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/api.py +0 -0
  151. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/__init__.py +0 -0
  152. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/cli/__init__.py +0 -0
  153. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/cli/deploy_cli.py +0 -0
  154. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/cli/model_zip.py +0 -0
  155. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/cli/repository.py +0 -0
  156. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/constants.py +0 -0
  157. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/__init__.py +0 -0
  158. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/inference.py +0 -0
  159. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/model.py +0 -0
  160. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/__init__.py +0 -0
  161. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/inference.py +0 -0
  162. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/model.py +0 -0
  163. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/text_to_text/bart-summarize/1/__init__.py +0 -0
  164. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/text_to_text/bart-summarize/1/inference.py +0 -0
  165. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/text_to_text/bart-summarize/1/model.py +0 -0
  166. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/visual_detection/yolov5x/1/inference.py +0 -0
  167. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/visual_detection/yolov5x/1/model.py +0 -0
  168. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/visual_embedding/vit-base/1/__init__.py +0 -0
  169. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/visual_embedding/vit-base/1/inference.py +0 -0
  170. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/visual_embedding/vit-base/1/model.py +0 -0
  171. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/1/__init__.py +0 -0
  172. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/1/inference.py +0 -0
  173. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/1/model.py +0 -0
  174. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/model_config/__init__.py +0 -0
  175. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/model_config/deploy.py +0 -0
  176. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/model_config/serializer.py +0 -0
  177. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/model_config/triton_config.py +0 -0
  178. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/models/__init__.py +0 -0
  179. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/models/inference.py +0 -0
  180. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/models/model_types.py +0 -0
  181. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/models/output.py +0 -0
  182. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/models/pb_model.py +0 -0
  183. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/models/model_serving/pb_model_repository.py +0 -0
  184. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/modules/__init__.py +0 -0
  185. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/modules/css.py +0 -0
  186. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/modules/pages.py +0 -0
  187. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/runners/__init__.py +0 -0
  188. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/urls/__init__.py +0 -0
  189. {clarifai-9.6.2 → clarifai-9.6.3}/clarifai_utils/urls/helper.py +0 -0
  190. {clarifai-9.6.2 → clarifai-9.6.3}/setup.cfg +0 -0
  191. {clarifai-9.6.2 → clarifai-9.6.3}/tests/test_auth.py +0 -0
  192. {clarifai-9.6.2 → clarifai-9.6.3}/tests/test_modules.py +0 -0
  193. {clarifai-9.6.2 → clarifai-9.6.3}/tests/test_stub.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: clarifai
3
- Version: 9.6.2
3
+ Version: 9.6.3
4
4
  Summary: Clarifai Python Utilities
5
5
  Home-page: https://github.com/Clarifai/clarifai-python-utils
6
6
  Author: Clarifai
@@ -203,6 +203,13 @@ code
203
203
  border-color: #d0d5dd;
204
204
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
205
205
  }
206
+
207
+ .stTextInput > div > div > input {
208
+ background-color: white;
209
+ }
210
+
211
+
212
+
206
213
  div[data-testid="stFileUploader"]>section {
207
214
  border: 1px dashed #d0d5dd;
208
215
  border-radius: 8px;
@@ -10,7 +10,7 @@
10
10
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  # See the License for the specific language governing permissions and
12
12
  # limitations under the License.
13
- """Interface to Clarifai Models API."""
13
+ """Interface to Clarifai Runners API."""
14
14
 
15
15
  from typing import Type
16
16
 
@@ -24,23 +24,55 @@ from clarifai.client import create_stub
24
24
 
25
25
  class BaseRunner:
26
26
  """
27
- Interface to Clarifai models api
27
+ Base class for remote inference runners. This should be subclassed with the run_input method
28
+ implemented to process each input in the request.
29
+
30
+ Then on the subclass call start() to start the run loop.
28
31
  """
29
32
 
30
33
  def __init__(self, auth: Type[ClarifaiAuthHelper], runner_id: str) -> None:
34
+ """
35
+ Args:
36
+ auth: ClarifaiAuthHelper - the auth object to use
37
+ runner_id: str - the id of the runner to use. Create the runner in the Clarifai API first
38
+
39
+ """
31
40
  self.auth = auth
32
41
  self.stub = create_stub(self.auth)
33
42
  self.runner_id = runner_id
34
43
 
44
+ # Check that the runner exists.
45
+ response = self.stub.GetRunner(
46
+ service_pb2.GetRunnerRequest(
47
+ user_app_id=self.auth.get_user_app_id_proto(), runner_id=self.runner_id))
48
+ if work_response.status.code != status_code_pb2.SUCCESS:
49
+ raise Exception(
50
+ f"Error getting runner, are you use this is a valid runner id {runner_id} at the user_id/app_id {self.auth.get_user_app_id_proto().user_id}/{self.auth.get_user_app_id_proto().app_id}. Error: {response.status.description}"
51
+ )
52
+
35
53
  def start(self):
54
+ """
55
+ Start the run loop. This will ask the Clarifai API for work, and when it gets work, it will run
56
+ the model on the inputs and post the results back to the Clarifai API. It will then ask for more
57
+ work again.
58
+ """
36
59
  self._long_poll_loop()
37
60
 
38
- def run(self, item: service_pb2.PostModelOutputsRequest) -> service_pb2.MultiOutputResponse:
61
+ def _run(self, request: service_pb2.PostModelOutputsRequest) -> service_pb2.MultiOutputResponse:
39
62
  """
40
- Run the model on the given item.
63
+ Run the model on the given request. You shouldn't need to override this method, see run_input
64
+ for the implementation to process each input in the request.
65
+
66
+ Args:
67
+ request: service_pb2.PostModelOutputsRequest - the request to run the model on
68
+
69
+ Returns:
70
+ service_pb2.MultiOutputResponse - the response from the model's run_input implementation.
41
71
  """
42
72
  outputs = []
43
- for inp in item.inputs:
73
+ # TODO: parallelize this
74
+ for inp in request.inputs:
75
+ # TODO: handle errors
44
76
  outputs.append(self.run_input(inp))
45
77
 
46
78
  return service_pb2.MultiOutputResponse(
@@ -53,12 +85,25 @@ class BaseRunner:
53
85
 
54
86
  def run_input(self, input: resources_pb2.Input) -> resources_pb2.Output:
55
87
  """
56
- Run the model on the given input.
88
+ Run the model on the given input in the request. This is the method you should override to
89
+ process each input in the request.
90
+
91
+ Args:
92
+ input: resources_pb2.Input - the input to run the model on
93
+
94
+ Returns:
95
+ resources_pb2.Output - the response from the model's run_input implementation.
57
96
  """
58
97
  raise NotImplementedError("run_input() not implemented")
59
98
 
60
99
  def _long_poll_loop(self):
100
+ """
101
+ This method will long poll for work, and when it gets work, it will run the model on the inputs
102
+ and post the results back to the Clarifai API. It will then long poll again for more work.
103
+ """
61
104
  c = 0
105
+ # TODO: handle more errors within this loop so it never stops.
106
+ # TODO: perhaps have multiple processes running this loop to handle more work.
62
107
  while True:
63
108
  # Long poll waiting for work.
64
109
  print("Loop iteration: {}".format(c))
@@ -81,7 +126,7 @@ class BaseRunner:
81
126
  print(
82
127
  f"Working on item: {item.id} with inputs {len(item.post_model_outputs_request.inputs)}"
83
128
  )
84
- result = self.run(item.post_model_outputs_request)
129
+ result = self._run(item.post_model_outputs_request)
85
130
 
86
131
  result_response = self.stub.PostRunnerItemOutputs(
87
132
  service_pb2.PostRunnerItemOutputsRequest(
@@ -0,0 +1,36 @@
1
+ from clarifai_grpc.grpc.api import resources_pb2
2
+
3
+ from clarifai.auth.helper import ClarifaiAuthHelper
4
+ from clarifai.runners.base import BaseRunner
5
+
6
+
7
+ class MyRunner(BaseRunner):
8
+ """ A custom runner that adds "Hello World" to the end of the text and replaces the domain of the
9
+ image URL as an example.
10
+ """
11
+
12
+ def run_input(self, input: resources_pb2.Input) -> resources_pb2.Output:
13
+ """ This is the method that will be called when the runner is run. It takes in an input and
14
+ returns an output.
15
+ """
16
+
17
+ output = resources_pb2.Output()
18
+
19
+ data = input.data
20
+
21
+ if data.text.raw != "":
22
+ output.data.text.raw = data.text.raw + "Hello World"
23
+ if data.image.url != "":
24
+ output.data.text.raw = data.image.url.replace("samples.clarifai.com", "newdomain.com")
25
+ return output
26
+
27
+
28
+ if __name__ == '__main__':
29
+ # Make sure you set these env vars before running the example.
30
+ # CLARIFAI_PAT
31
+ # CLARIFAI_USER_ID
32
+ # CLARIFAI_APP_ID
33
+ auth = ClarifaiAuthHelper.from_env()
34
+
35
+ # You need to first create a runner in the Clarifai API and then use the ID here.
36
+ MyRunner(auth, runner_id="laptop_runner").start()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: clarifai
3
- Version: 9.6.2
3
+ Version: 9.6.3
4
4
  Summary: Clarifai Python Utilities
5
5
  Home-page: https://github.com/Clarifai/clarifai-python-utils
6
6
  Author: Clarifai
@@ -93,7 +93,8 @@ clarifai/modules/css.py
93
93
  clarifai/modules/pages.py
94
94
  clarifai/modules/style.css
95
95
  clarifai/runners/__init__.py
96
- clarifai/runners/api.py
96
+ clarifai/runners/base.py
97
+ clarifai/runners/example.py
97
98
  clarifai/urls/__init__.py
98
99
  clarifai/urls/helper.py
99
100
  clarifai_utils/__init__.py
@@ -181,7 +182,8 @@ clarifai_utils/modules/css.py
181
182
  clarifai_utils/modules/pages.py
182
183
  clarifai_utils/modules/style.css
183
184
  clarifai_utils/runners/__init__.py
184
- clarifai_utils/runners/api.py
185
+ clarifai_utils/runners/base.py
186
+ clarifai_utils/runners/example.py
185
187
  clarifai_utils/urls/__init__.py
186
188
  clarifai_utils/urls/helper.py
187
189
  tests/test_auth.py
@@ -203,6 +203,13 @@ code
203
203
  border-color: #d0d5dd;
204
204
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
205
205
  }
206
+
207
+ .stTextInput > div > div > input {
208
+ background-color: white;
209
+ }
210
+
211
+
212
+
206
213
  div[data-testid="stFileUploader"]>section {
207
214
  border: 1px dashed #d0d5dd;
208
215
  border-radius: 8px;
@@ -10,7 +10,7 @@
10
10
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  # See the License for the specific language governing permissions and
12
12
  # limitations under the License.
13
- """Interface to Clarifai Models API."""
13
+ """Interface to Clarifai Runners API."""
14
14
 
15
15
  from typing import Type
16
16
 
@@ -24,23 +24,55 @@ from clarifai.client import create_stub
24
24
 
25
25
  class BaseRunner:
26
26
  """
27
- Interface to Clarifai models api
27
+ Base class for remote inference runners. This should be subclassed with the run_input method
28
+ implemented to process each input in the request.
29
+
30
+ Then on the subclass call start() to start the run loop.
28
31
  """
29
32
 
30
33
  def __init__(self, auth: Type[ClarifaiAuthHelper], runner_id: str) -> None:
34
+ """
35
+ Args:
36
+ auth: ClarifaiAuthHelper - the auth object to use
37
+ runner_id: str - the id of the runner to use. Create the runner in the Clarifai API first
38
+
39
+ """
31
40
  self.auth = auth
32
41
  self.stub = create_stub(self.auth)
33
42
  self.runner_id = runner_id
34
43
 
44
+ # Check that the runner exists.
45
+ response = self.stub.GetRunner(
46
+ service_pb2.GetRunnerRequest(
47
+ user_app_id=self.auth.get_user_app_id_proto(), runner_id=self.runner_id))
48
+ if work_response.status.code != status_code_pb2.SUCCESS:
49
+ raise Exception(
50
+ f"Error getting runner, are you use this is a valid runner id {runner_id} at the user_id/app_id {self.auth.get_user_app_id_proto().user_id}/{self.auth.get_user_app_id_proto().app_id}. Error: {response.status.description}"
51
+ )
52
+
35
53
  def start(self):
54
+ """
55
+ Start the run loop. This will ask the Clarifai API for work, and when it gets work, it will run
56
+ the model on the inputs and post the results back to the Clarifai API. It will then ask for more
57
+ work again.
58
+ """
36
59
  self._long_poll_loop()
37
60
 
38
- def run(self, item: service_pb2.PostModelOutputsRequest) -> service_pb2.MultiOutputResponse:
61
+ def _run(self, request: service_pb2.PostModelOutputsRequest) -> service_pb2.MultiOutputResponse:
39
62
  """
40
- Run the model on the given item.
63
+ Run the model on the given request. You shouldn't need to override this method, see run_input
64
+ for the implementation to process each input in the request.
65
+
66
+ Args:
67
+ request: service_pb2.PostModelOutputsRequest - the request to run the model on
68
+
69
+ Returns:
70
+ service_pb2.MultiOutputResponse - the response from the model's run_input implementation.
41
71
  """
42
72
  outputs = []
43
- for inp in item.inputs:
73
+ # TODO: parallelize this
74
+ for inp in request.inputs:
75
+ # TODO: handle errors
44
76
  outputs.append(self.run_input(inp))
45
77
 
46
78
  return service_pb2.MultiOutputResponse(
@@ -53,12 +85,25 @@ class BaseRunner:
53
85
 
54
86
  def run_input(self, input: resources_pb2.Input) -> resources_pb2.Output:
55
87
  """
56
- Run the model on the given input.
88
+ Run the model on the given input in the request. This is the method you should override to
89
+ process each input in the request.
90
+
91
+ Args:
92
+ input: resources_pb2.Input - the input to run the model on
93
+
94
+ Returns:
95
+ resources_pb2.Output - the response from the model's run_input implementation.
57
96
  """
58
97
  raise NotImplementedError("run_input() not implemented")
59
98
 
60
99
  def _long_poll_loop(self):
100
+ """
101
+ This method will long poll for work, and when it gets work, it will run the model on the inputs
102
+ and post the results back to the Clarifai API. It will then long poll again for more work.
103
+ """
61
104
  c = 0
105
+ # TODO: handle more errors within this loop so it never stops.
106
+ # TODO: perhaps have multiple processes running this loop to handle more work.
62
107
  while True:
63
108
  # Long poll waiting for work.
64
109
  print("Loop iteration: {}".format(c))
@@ -81,7 +126,7 @@ class BaseRunner:
81
126
  print(
82
127
  f"Working on item: {item.id} with inputs {len(item.post_model_outputs_request.inputs)}"
83
128
  )
84
- result = self.run(item.post_model_outputs_request)
129
+ result = self._run(item.post_model_outputs_request)
85
130
 
86
131
  result_response = self.stub.PostRunnerItemOutputs(
87
132
  service_pb2.PostRunnerItemOutputsRequest(
@@ -0,0 +1,36 @@
1
+ from clarifai_grpc.grpc.api import resources_pb2
2
+
3
+ from clarifai.auth.helper import ClarifaiAuthHelper
4
+ from clarifai.runners.base import BaseRunner
5
+
6
+
7
+ class MyRunner(BaseRunner):
8
+ """ A custom runner that adds "Hello World" to the end of the text and replaces the domain of the
9
+ image URL as an example.
10
+ """
11
+
12
+ def run_input(self, input: resources_pb2.Input) -> resources_pb2.Output:
13
+ """ This is the method that will be called when the runner is run. It takes in an input and
14
+ returns an output.
15
+ """
16
+
17
+ output = resources_pb2.Output()
18
+
19
+ data = input.data
20
+
21
+ if data.text.raw != "":
22
+ output.data.text.raw = data.text.raw + "Hello World"
23
+ if data.image.url != "":
24
+ output.data.text.raw = data.image.url.replace("samples.clarifai.com", "newdomain.com")
25
+ return output
26
+
27
+
28
+ if __name__ == '__main__':
29
+ # Make sure you set these env vars before running the example.
30
+ # CLARIFAI_PAT
31
+ # CLARIFAI_USER_ID
32
+ # CLARIFAI_APP_ID
33
+ auth = ClarifaiAuthHelper.from_env()
34
+
35
+ # You need to first create a runner in the Clarifai API and then use the ID here.
36
+ MyRunner(auth, runner_id="laptop_runner").start()
@@ -7,7 +7,7 @@ packages = setuptools.find_namespace_packages(include=["clarifai*"])
7
7
 
8
8
  setuptools.setup(
9
9
  name="clarifai",
10
- version="9.6.2",
10
+ version="9.6.3",
11
11
  author="Clarifai",
12
12
  author_email="support@clarifai.com",
13
13
  description="Clarifai Python Utilities",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes