clarifai 11.1.7rc7__py3-none-any.whl → 11.1.7rc9__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.1.7rc7"
1
+ __version__ = "11.1.7rc9"
@@ -203,8 +203,6 @@ class ModelClient:
203
203
  proto = resources_pb2.Input()
204
204
 
205
205
  serialize(input, input_signature, proto.data)
206
- print("input:", input)
207
- print("proto.data:", proto.data)
208
206
  proto_inputs.append(proto)
209
207
 
210
208
  response = self._predict_by_proto(proto_inputs, method_name)
@@ -236,13 +236,6 @@ def serialize(kwargs, signatures, proto=None, is_output=False):
236
236
  raise TypeError('Got a single return value, but expected multiple outputs {%s}' %
237
237
  ', '.join(sig.name for sig in signatures))
238
238
  raise TypeError('Got unexpected key: %s' % ', '.join(unknown))
239
- inline_first_value = False
240
- if (is_output and len(signatures) == 1 and signatures[0].name == 'return' and
241
- len(kwargs) == 1 and 'return' in kwargs):
242
- # if there is only one output, flatten it and return directly
243
- inline_first_value = True
244
- if signatures and signatures[0].type not in _NON_INLINABLE_TYPES:
245
- inline_first_value = False
246
239
  for sig_i, sig in enumerate(signatures):
247
240
  if sig.name not in kwargs:
248
241
  if sig.required:
@@ -250,18 +243,10 @@ def serialize(kwargs, signatures, proto=None, is_output=False):
250
243
  continue # skip missing fields, they can be set to default on the server
251
244
  data = kwargs[sig.name]
252
245
  serializer = serializer_from_signature(sig)
253
- # TODO determine if any (esp the first) var can go in the proto without parts
254
- # and whether to put this in the signature or dynamically determine it
255
- if inline_first_value and sig_i == 0 and id(data) not in _ZERO_VALUE_IDS:
256
- # inlined first value; note data must not be empty or 0 to inline, since that
257
- # will correspond to the missing value case (which uses function defaults).
258
- # empty values are put explicitly in parts.
259
- serializer.serialize(proto, data)
260
- else:
261
- # add the part to the proto
262
- part = proto.parts.add()
263
- part.id = sig.name
264
- serializer.serialize(part.data, data)
246
+ # add the part to the proto
247
+ part = proto.parts.add()
248
+ part.id = sig.name
249
+ serializer.serialize(part.data, data)
265
250
  return proto
266
251
 
267
252
 
@@ -397,10 +382,6 @@ def _is_jsonable(tp):
397
382
  # serializer: serializer for the data type
398
383
  _DataType = namedtuple('_DataType', ('type', 'serializer'))
399
384
 
400
- _NON_INLINABLE_TYPES = {
401
- resources_pb2.ModelTypeField.DataType.NAMED_FIELDS,
402
- resources_pb2.ModelTypeField.DataType.TUPLE, resources_pb2.ModelTypeField.DataType.LIST
403
- }
404
385
  _ZERO_VALUE_IDS = {id(None), id(''), id(b''), id(0), id(0.0), id(False)}
405
386
 
406
387
  # simple, non-container types that correspond directly to a data field
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: clarifai
3
- Version: 11.1.7rc7
3
+ Version: 11.1.7rc9
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=UVb-Qd94W3trcR1tUhxvZWOZsQeO3zRk4WOaKuSTtK0,26
1
+ clarifai/__init__.py,sha256=vHan9DfG6k6V0uLMDFeb8JNoNhcBoe8-lJsDeZ9PjpU,26
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
@@ -31,7 +31,7 @@ clarifai/client/deployment.py,sha256=w7Y6pA1rYG4KRK1SwusRZc2sQRXlG8wezuVdzSWpCo0
31
31
  clarifai/client/input.py,sha256=obMAHMDU1OwfXZ8KraOnGFlWzlW-3F7Ob_2lcOQMlhY,46339
32
32
  clarifai/client/lister.py,sha256=03KGMvs5RVyYqxLsSrWhNc34I8kiF1Ph0NeyEwu7nMU,2082
33
33
  clarifai/client/model.py,sha256=HLTzCoGhZ5Ifm5x5nSFa4YULnLLlBpZF-29nfOcwFuY,76995
34
- clarifai/client/model_client.py,sha256=B2M_yr-iuhgT1bJTontfN_KrJyfDRKfNW5ALM0Cufkc,17864
34
+ clarifai/client/model_client.py,sha256=nKEMH0Rkb1cSVpuIwmMI4Kqf1zAXT6eEPaDoAunHEb4,17796
35
35
  clarifai/client/module.py,sha256=FTkm8s9m-EaTKN7g9MnLhGJ9eETUfKG7aWZ3o1RshYs,4204
36
36
  clarifai/client/nodepool.py,sha256=la3vTFrO4LX8zm2eQ5jqf2L0-kQ63Dano8FibadoZbk,10152
37
37
  clarifai/client/search.py,sha256=GaPWN6JmTQGZaCHr6U1yv0zqR6wKFl7i9IVLg2ul1CI,14254
@@ -163,7 +163,7 @@ clarifai/runners/utils/data_types.py,sha256=xW3DrBP0uyyyAw_K7xuLhEfBDhTbGu2u1L-m
163
163
  clarifai/runners/utils/data_utils.py,sha256=j_W_O57ciGbp2JDVLlau-V-DDrF6gsN6cjtLaL51AvA,5512
164
164
  clarifai/runners/utils/loader.py,sha256=SgNHMwRmCCymFQm8aDp73NmIUHhM-N60CBlTKbPzmVc,7470
165
165
  clarifai/runners/utils/logger.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
166
- clarifai/runners/utils/method_signatures.py,sha256=ZFqcPsjp9Fbih2u-xTLN3utZkHeOhBxtaiHMEzJKcCw,17657
166
+ clarifai/runners/utils/method_signatures.py,sha256=T5HE92jHZP-4GTGy38QH_gx8HFJbgOAFlxkvaXZLVvg,16621
167
167
  clarifai/runners/utils/serializers.py,sha256=S4sRsOVvH191vAGTRTAAdwLlQwlK4T5QVRDGPptg9nQ,7191
168
168
  clarifai/runners/utils/url_fetcher.py,sha256=v_8JOWmkyFAzsBulsieKX7Nfjy1Yg7wGSZeqfEvw2cg,1640
169
169
  clarifai/runners/utils/__pycache__/__init__.cpython-310.pyc,sha256=0GGbXIecXlOZmQKMCkSRhEBY_a1zvoimv-mHG4pJuNA,167
@@ -229,9 +229,9 @@ clarifai/workflows/__pycache__/__init__.cpython-39.pyc,sha256=9nA--jULSW7OFrYOcs
229
229
  clarifai/workflows/__pycache__/export.cpython-310.pyc,sha256=phEGwi2gAojCUhRTqjZVeTDn7Gk6LCVBeSTjAj4m9iY,2418
230
230
  clarifai/workflows/__pycache__/utils.cpython-310.pyc,sha256=M9_KTM7GOOS5SPrWwAzqHDqyGvgKi3xuSGvyw6MNf-I,1925
231
231
  clarifai/workflows/__pycache__/validate.cpython-310.pyc,sha256=c18Jgp_-CAm8RD_tmUpDCPoqZeexaoWELG0yBzb9rjw,2149
232
- clarifai-11.1.7rc7.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
233
- clarifai-11.1.7rc7.dist-info/METADATA,sha256=5YXRRR7I8rkzcai9pN5auQTaxd0M-X0jUKNaVk-qNmo,22453
234
- clarifai-11.1.7rc7.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
235
- clarifai-11.1.7rc7.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
236
- clarifai-11.1.7rc7.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
237
- clarifai-11.1.7rc7.dist-info/RECORD,,
232
+ clarifai-11.1.7rc9.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
233
+ clarifai-11.1.7rc9.dist-info/METADATA,sha256=FVkumJO6X3eBNXwQkTMsrWmcBbZxlcBh8Skm7IOUZxU,22453
234
+ clarifai-11.1.7rc9.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
235
+ clarifai-11.1.7rc9.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
236
+ clarifai-11.1.7rc9.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
237
+ clarifai-11.1.7rc9.dist-info/RECORD,,