tico 0.1.0.dev250729__py3-none-any.whl → 0.1.0.dev250730__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.
tico/__init__.py CHANGED
@@ -29,7 +29,7 @@ __all__ = [
29
29
  ]
30
30
 
31
31
  # THIS LINE IS AUTOMATICALLY GENERATED BY setup.py
32
- __version__ = "0.1.0.dev250729"
32
+ __version__ = "0.1.0.dev250730"
33
33
 
34
34
  MINIMUM_SUPPORTED_VERSION = "2.5.0"
35
35
  SECURE_TORCH_VERSION = "2.6.0"
@@ -59,10 +59,21 @@ class RecordingInput:
59
59
  self.condition = condition
60
60
  self.input_to_remove = input_to_remove
61
61
  self.sig = inspect.signature(self.forward_org)
62
+
63
+ for param in self.sig.parameters.values():
64
+ if param.kind == inspect.Parameter.KEYWORD_ONLY:
65
+ raise ValueError(f"Keyword-only parameter not supported: {param.name}")
66
+ if param.kind == inspect.Parameter.VAR_POSITIONAL:
67
+ raise ValueError(
68
+ f"Var positional parameter not supported: {param.name}"
69
+ )
70
+
71
+ # NOTE: the name `kwargs` is removed since `kwargs` is a dict, not arg itself.
72
+ # args in kwargs are kept via sig.bind(*args, **kwargs) in capture_and_forward.
62
73
  self.args_names = [
63
74
  name
64
- for name in self.sig.parameters.keys()
65
- if name not in ("self", "kwargs")
75
+ for name, param in self.sig.parameters.items()
76
+ if param.kind != inspect.Parameter.VAR_KEYWORD and name != "self"
66
77
  ]
67
78
  self.captured_input = None
68
79
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tico
3
- Version: 0.1.0.dev250729
3
+ Version: 0.1.0.dev250730
4
4
  Summary: Convert exported Torch module to circle
5
5
  Home-page: UNKNOWN
6
6
  License: UNKNOWN
@@ -1,4 +1,4 @@
1
- tico/__init__.py,sha256=quSJ4KKyh76eIG3MrN15qViNKdudexAIk-h6x_L-hRc,1883
1
+ tico/__init__.py,sha256=azezzGizSQu7vHuaNsna2JC-5HPI5SV5QI_q-6STx14,1883
2
2
  tico/pt2_to_circle.py,sha256=gu3MD4Iqc0zMZcCZ2IT8oGbyj21CTSbT3Rgd9s2B_9A,2767
3
3
  tico/config/__init__.py,sha256=xZzCXjZ84qE-CsBi-dfaL05bqpQ3stKKfTXhnrJRyVs,142
4
4
  tico/config/base.py,sha256=q5xMqGxTUZs4mFqt5c7i_y9U00fYgdMGl9nUqIVMlCo,1248
@@ -195,7 +195,7 @@ tico/utils/model.py,sha256=pPOIjD0qjQirLibiRxxfjOR6efimOcDAd9R-74eus-k,1282
195
195
  tico/utils/padding.py,sha256=qKke-dJeeLHiRaePjDS66txrGyiYuipLVQeqLYad8uk,3349
196
196
  tico/utils/passes.py,sha256=kGmDe__5cPaO6i5EDAoXSVe6yXEoX9hAny4ROb3ZEmQ,2409
197
197
  tico/utils/pytree_utils.py,sha256=jrk3N6X6LiUnBCX_gM1K9nywbVAJBVnszlTAgeIeDUc,5219
198
- tico/utils/record_input.py,sha256=FBtV00WWcXMXmg-Ujgvci9HjOmRJC1cVzx_WRNIF4MI,3324
198
+ tico/utils/record_input.py,sha256=AHDDxuAjFP2Jgl9CsmQuwjivr-lAZxek1rO18CjK6IY,3932
199
199
  tico/utils/register_custom_op.py,sha256=3-Yl6iYmx1qQA2igNHt4hYhQhQMkdPb7gF50LIY8yvc,27350
200
200
  tico/utils/serialize.py,sha256=mEuusEzi82WFsz3AkowgWwxSLeo50JDxyOj6yYDQhEI,1914
201
201
  tico/utils/torch_compat.py,sha256=oc6PztVsXdHcQ3iaVR90wLLxrGaj6zFHWZ8K9rRS6q8,1795
@@ -206,9 +206,9 @@ tico/utils/mx/__init__.py,sha256=IO6FP_xYbGy0dW0HL26GXD3ouxARaxCK7bz9dn4blPQ,26
206
206
  tico/utils/mx/elemwise_ops.py,sha256=V6glyAHsVR1joqpsgnNytatCD_ew92xNWZ19UFDoMTA,10281
207
207
  tico/utils/mx/formats.py,sha256=uzNWyu-1onUlwQfX5cZ6fZSUfHMRqorper7_T1k3jfk,3404
208
208
  tico/utils/mx/mx_ops.py,sha256=RcfUTYVi-wilGB2sC35OeARdwDqnixv7dG5iyZ-fQT8,8555
209
- tico-0.1.0.dev250729.dist-info/LICENSE,sha256=kp4JLII7bzRhPb0CPD5XTDZMh22BQ7h3k3B7t8TiSbw,12644
210
- tico-0.1.0.dev250729.dist-info/METADATA,sha256=ZcnGD8K56o04Pt172XYRpuh-DHPoFWDhUhEpaCsy23k,8430
211
- tico-0.1.0.dev250729.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
212
- tico-0.1.0.dev250729.dist-info/entry_points.txt,sha256=kBKYSS_IYrSXmUYevmmepqIVPScq5vF8ulQRu3I_Zf0,59
213
- tico-0.1.0.dev250729.dist-info/top_level.txt,sha256=oqs7UPoNSKZEwqsX8B-KAWdQwfAa7i60pbxW_Jk7P3w,5
214
- tico-0.1.0.dev250729.dist-info/RECORD,,
209
+ tico-0.1.0.dev250730.dist-info/LICENSE,sha256=kp4JLII7bzRhPb0CPD5XTDZMh22BQ7h3k3B7t8TiSbw,12644
210
+ tico-0.1.0.dev250730.dist-info/METADATA,sha256=2bGJV9nHJLnjsv3q2PB6pLR-uNgYal0dvsGpuaIwS9Y,8430
211
+ tico-0.1.0.dev250730.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
212
+ tico-0.1.0.dev250730.dist-info/entry_points.txt,sha256=kBKYSS_IYrSXmUYevmmepqIVPScq5vF8ulQRu3I_Zf0,59
213
+ tico-0.1.0.dev250730.dist-info/top_level.txt,sha256=oqs7UPoNSKZEwqsX8B-KAWdQwfAa7i60pbxW_Jk7P3w,5
214
+ tico-0.1.0.dev250730.dist-info/RECORD,,