clarifai 11.1.7rc8__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.7rc8"
1
+ __version__ = "11.1.7rc9"
@@ -236,11 +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
239
  for sig_i, sig in enumerate(signatures):
245
240
  if sig.name not in kwargs:
246
241
  if sig.required:
@@ -248,18 +243,10 @@ def serialize(kwargs, signatures, proto=None, is_output=False):
248
243
  continue # skip missing fields, they can be set to default on the server
249
244
  data = kwargs[sig.name]
250
245
  serializer = serializer_from_signature(sig)
251
- # TODO determine if any (esp the first) var can go in the proto without parts
252
- # and whether to put this in the signature or dynamically determine it
253
- if inline_first_value and sig_i == 0 and id(data) not in _ZERO_VALUE_IDS:
254
- # inlined first value; note data must not be empty or 0 to inline, since that
255
- # will correspond to the missing value case (which uses function defaults).
256
- # empty values are put explicitly in parts.
257
- serializer.serialize(proto, data)
258
- else:
259
- # add the part to the proto
260
- part = proto.parts.add()
261
- part.id = sig.name
262
- 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)
263
250
  return proto
264
251
 
265
252
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: clarifai
3
- Version: 11.1.7rc8
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=tsU1PY4E7mPt4Z8EHX6HlRe-WWtcBm3GcjNb5kXOPw8,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
@@ -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=cOZJWkRdk7TT95awAnfoeEMht-St93afwySPzjsWuyA,17383
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.7rc8.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
233
- clarifai-11.1.7rc8.dist-info/METADATA,sha256=nSzMUBCNPBX8kpiwx-W8v_wcpNX7qm-iv9EQyeQlqaU,22453
234
- clarifai-11.1.7rc8.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
235
- clarifai-11.1.7rc8.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
236
- clarifai-11.1.7rc8.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
237
- clarifai-11.1.7rc8.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,,