clarifai 11.0.2__py3-none-any.whl → 11.0.3__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.0.2"
1
+ __version__ = "11.0.3"
@@ -29,10 +29,16 @@ def _clear_line(n: int = 1) -> None:
29
29
 
30
30
  class ModelUploader:
31
31
 
32
- def __init__(self, folder: str):
32
+ def __init__(self, folder: str, validate_api_ids: bool = True):
33
+ """
34
+ :param folder: The folder containing the model.py, config.yaml, requirements.txt and
35
+ checkpoints.
36
+ :param validate_api_ids: Whether to validate the user_id and app_id in the config file.
37
+ """
33
38
  self._client = None
34
39
  self.folder = self._validate_folder(folder)
35
40
  self.config = self._load_config(os.path.join(self.folder, 'config.yaml'))
41
+ self.validate_api_ids = validate_api_ids
36
42
  self._validate_config()
37
43
  self.model_proto = self._get_model_proto()
38
44
  self.model_id = self.model_proto.id
@@ -76,6 +82,8 @@ class ModelUploader:
76
82
  return repo_id, hf_token
77
83
 
78
84
  def _check_app_exists(self):
85
+ if not self.validate_api_ids:
86
+ return True
79
87
  resp = self.client.STUB.GetApp(service_pb2.GetAppRequest(user_app_id=self.client.user_app_id))
80
88
  if resp.status.code == status_code_pb2.SUCCESS:
81
89
  return True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: clarifai
3
- Version: 11.0.2
3
+ Version: 11.0.3
4
4
  Summary: Clarifai Python SDK
5
5
  Home-page: https://github.com/Clarifai/clarifai-python
6
6
  Author: Clarifai
@@ -1,4 +1,4 @@
1
- clarifai/__init__.py,sha256=RDbyFSHLm1s06WmNHjem0y67LhbGXNidjKUmieqBJ5c,23
1
+ clarifai/__init__.py,sha256=K00CpIHLj46O-cbNnxk2z-jzuaw9bwcK6iDyxoArIZg,23
2
2
  clarifai/cli.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  clarifai/errors.py,sha256=RwzTajwds51wLD0MVlMC5kcpBnzRpreDLlazPSBZxrg,2605
4
4
  clarifai/versions.py,sha256=jctnczzfGk_S3EnVqb2FjRKfSREkNmvNEwAAa_VoKiQ,222
@@ -69,7 +69,7 @@ clarifai/runners/models/model_class.py,sha256=9JSPAr4U4K7xI0kSl-q0mHB06zknm2OR-8
69
69
  clarifai/runners/models/model_run_locally.py,sha256=OhzQbmaV8Wwgs2H0KhdDF6Z7bYSaIh4RRA0QwSiv5vY,20644
70
70
  clarifai/runners/models/model_runner.py,sha256=3vzoastQxkGRDK8T9aojDsLNBb9A3IiKm6YmbFrE9S0,6241
71
71
  clarifai/runners/models/model_servicer.py,sha256=X4715PVA5PBurRTYcwSEudg8fShGV6InAF4mmRlRcHg,2826
72
- clarifai/runners/models/model_upload.py,sha256=ggUa1OwqZg57C-Dagf6U22fSC4SHKZ_mB4xMSynCtPg,22411
72
+ clarifai/runners/models/model_upload.py,sha256=NY1EyCUuG3EDEb1QVqFR8TDD_4Z2HtDSLSYREEfeEPo,22753
73
73
  clarifai/runners/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
74
  clarifai/runners/utils/const.py,sha256=eyBrj5ywuGKPF-IFipm7yjiYyLhnsKhMNZ6xF-OvykQ,1250
75
75
  clarifai/runners/utils/data_handler.py,sha256=sxy9zlAgI6ETuxCQhUgEXAn2GCsaW1GxpK6GTaMne0g,6966
@@ -92,9 +92,9 @@ clarifai/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
92
92
  clarifai/workflows/export.py,sha256=vICRhIreqDSShxLKjHNM2JwzKsf1B4fdXB0ciMcA70k,1945
93
93
  clarifai/workflows/utils.py,sha256=nGeB_yjVgUO9kOeKTg4OBBaBz-AwXI3m-huSVj-9W18,1924
94
94
  clarifai/workflows/validate.py,sha256=yJq03MaJqi5AK3alKGJJBR89xmmjAQ31sVufJUiOqY8,2556
95
- clarifai-11.0.2.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
96
- clarifai-11.0.2.dist-info/METADATA,sha256=UR2QCaE64X7v_Lc3VfVyclCDTp1LUfRTScyTY4wOxrU,22456
97
- clarifai-11.0.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
98
- clarifai-11.0.2.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
99
- clarifai-11.0.2.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
100
- clarifai-11.0.2.dist-info/RECORD,,
95
+ clarifai-11.0.3.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
96
+ clarifai-11.0.3.dist-info/METADATA,sha256=Sx6wc5afmi5brxqHlgkhBTrBvMpUThysnWHi2dbp7Hs,22456
97
+ clarifai-11.0.3.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
98
+ clarifai-11.0.3.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
99
+ clarifai-11.0.3.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
100
+ clarifai-11.0.3.dist-info/RECORD,,