leap-model-parser 0.1.123.dev3__py3-none-any.whl → 0.1.124__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.
@@ -1,7 +1,7 @@
1
- from typing import List
2
- from enum import Enum
3
1
  from dataclasses import dataclass
2
+ from typing import List
4
3
  from typing import Union
4
+ from enum import Enum
5
5
 
6
6
 
7
7
  class ActivationsEnum(Enum):
@@ -203,10 +203,8 @@ class NodeType(Enum):
203
203
  SGD = "SGD"
204
204
  OnnxAbs = "OnnxAbs"
205
205
  OnnxErf = "OnnxErf"
206
- OnnxGRU = "OnnxGRU"
207
206
  OnnxHardSigmoid = "OnnxHardSigmoid"
208
207
  OnnxLSTM = "OnnxLSTM"
209
- OnnxRNN = "OnnxRNN"
210
208
  OnnxReduceMean = "OnnxReduceMean"
211
209
  OnnxSqrt = "OnnxSqrt"
212
210
  Dataset = "Dataset"
@@ -1803,15 +1801,6 @@ class OnnxErf:
1803
1801
  type: NodeType
1804
1802
 
1805
1803
 
1806
- @dataclass
1807
- class OnnxGRU:
1808
- units: int
1809
- return_sequences: bool
1810
- return_state: bool
1811
- bidirectional: bool
1812
- type: NodeType
1813
-
1814
-
1815
1804
  @dataclass
1816
1805
  class OnnxHardSigmoid:
1817
1806
  alpha: float
@@ -1827,16 +1816,6 @@ class OnnxLSTM:
1827
1816
  type: NodeType
1828
1817
 
1829
1818
 
1830
- @dataclass
1831
- class OnnxRNN:
1832
- units: int
1833
- return_sequences: bool
1834
- return_state: bool
1835
- bidirectional: bool
1836
- activation: ActivationsEnum
1837
- type: NodeType
1838
-
1839
-
1840
1819
  @dataclass
1841
1820
  class OnnxReduceMean:
1842
1821
  axes: List[int]
@@ -1951,7 +1930,7 @@ class NodeDataTypes:
1951
1930
  ZeroPadding1D, ZeroPadding2D, ZeroPadding3D, BinaryCrossentropy, BinaryFocalCrossentropy,
1952
1931
  CategoricalCrossentropy, CategoricalHinge, CosineSimilarity, Hinge, Huber, KLDivergence, LogCosh,
1953
1932
  MeanAbsoluteError, MeanAbsolutePercentageError, MeanSquaredError, MeanSquaredLogarithmicError, Poisson,
1954
- SquaredHinge, Adadelta, Adagrad, Adam, Adamax, Ftrl, Nadam, RMSprop, SGD, OnnxAbs, OnnxErf, OnnxGRU,
1955
- OnnxHardSigmoid, OnnxLSTM, OnnxRNN, OnnxReduceMean, OnnxSqrt, Dataset, Input, RepresentationBlock,
1956
- GroundTruth, CustomLayer, CustomLoss, Visualizer, Metric, Lambda, TFOpLambda, SlicingOpLambda, Repeat,
1957
- Variable, Gather, FixedDropout]
1933
+ SquaredHinge, Adadelta, Adagrad, Adam, Adamax, Ftrl, Nadam, RMSprop, SGD, OnnxAbs, OnnxErf,
1934
+ OnnxHardSigmoid, OnnxLSTM, OnnxReduceMean, OnnxSqrt, Dataset, Input, RepresentationBlock, GroundTruth,
1935
+ CustomLayer, CustomLoss, Visualizer, Metric, Lambda, TFOpLambda, SlicingOpLambda, Repeat, Variable,
1936
+ Gather, FixedDropout]
@@ -14509,80 +14509,6 @@
14509
14509
  "properties": [],
14510
14510
  "options": null
14511
14511
  },
14512
- {
14513
- "type": "Layer",
14514
- "shape_calc": [
14515
- "IdentityFunc"
14516
- ],
14517
- "receptive_fields_func": "IdentityReceptiveFieldsFunc",
14518
- "menu_sections": [
14519
- "Layer",
14520
- "Onnx"
14521
- ],
14522
- "inputs_data": {
14523
- "add_input_by_drag": false,
14524
- "inputs": [
14525
- {
14526
- "name": "input",
14527
- "approval_connection": [
14528
- "Input",
14529
- "Dataset",
14530
- "Layer",
14531
- "CustomLayer"
14532
- ]
14533
- },
14534
- {
14535
- "name": "initial_h_state",
14536
- "approval_connection": [
14537
- "Input",
14538
- "Dataset",
14539
- "Layer",
14540
- "CustomLayer"
14541
- ]
14542
- }
14543
- ]
14544
- },
14545
- "outputs_data": {
14546
- "outputs": [
14547
- {
14548
- "name": "feature_map"
14549
- }
14550
- ]
14551
- },
14552
- "name": "OnnxGRU",
14553
- "parents": [
14554
- "onnx2kerastl",
14555
- "customonnxlayer",
14556
- "onnxgru"
14557
- ],
14558
- "properties": [
14559
- {
14560
- "name": "units",
14561
- "isdefault": false,
14562
- "default_val": null,
14563
- "type": "int"
14564
- },
14565
- {
14566
- "name": "return_sequences",
14567
- "isdefault": false,
14568
- "default_val": null,
14569
- "type": "bool"
14570
- },
14571
- {
14572
- "name": "return_state",
14573
- "isdefault": false,
14574
- "default_val": null,
14575
- "type": "bool"
14576
- },
14577
- {
14578
- "name": "bidirectional",
14579
- "isdefault": false,
14580
- "default_val": null,
14581
- "type": "bool"
14582
- }
14583
- ],
14584
- "options": null
14585
- },
14586
14512
  {
14587
14513
  "type": "Layer",
14588
14514
  "shape_calc": [
@@ -14713,100 +14639,6 @@
14713
14639
  ],
14714
14640
  "options": null
14715
14641
  },
14716
- {
14717
- "type": "Layer",
14718
- "shape_calc": [
14719
- "IdentityFunc"
14720
- ],
14721
- "receptive_fields_func": "IdentityReceptiveFieldsFunc",
14722
- "menu_sections": [
14723
- "Layer",
14724
- "Onnx"
14725
- ],
14726
- "inputs_data": {
14727
- "add_input_by_drag": false,
14728
- "inputs": [
14729
- {
14730
- "name": "input",
14731
- "approval_connection": [
14732
- "Input",
14733
- "Dataset",
14734
- "Layer",
14735
- "CustomLayer"
14736
- ]
14737
- },
14738
- {
14739
- "name": "initial_h_state",
14740
- "approval_connection": [
14741
- "Input",
14742
- "Dataset",
14743
- "Layer",
14744
- "CustomLayer"
14745
- ]
14746
- }
14747
- ]
14748
- },
14749
- "outputs_data": {
14750
- "outputs": [
14751
- {
14752
- "name": "feature_map"
14753
- }
14754
- ]
14755
- },
14756
- "name": "OnnxRNN",
14757
- "parents": [
14758
- "onnx2kerastl",
14759
- "customonnxlayer",
14760
- "onnxRNN"
14761
- ],
14762
- "properties": [
14763
- {
14764
- "name": "units",
14765
- "isdefault": false,
14766
- "default_val": null,
14767
- "type": "int"
14768
- },
14769
- {
14770
- "name": "return_sequences",
14771
- "isdefault": false,
14772
- "default_val": null,
14773
- "type": "bool"
14774
- },
14775
- {
14776
- "name": "return_state",
14777
- "isdefault": false,
14778
- "default_val": null,
14779
- "type": "bool"
14780
- },
14781
- {
14782
- "name": "bidirectional",
14783
- "isdefault": false,
14784
- "default_val": null,
14785
- "type": "bool"
14786
- },
14787
- {
14788
- "name": "activation",
14789
- "isdefault": false,
14790
- "default_val": null,
14791
- "type": "select",
14792
- "values": [
14793
- "relu",
14794
- "softmax",
14795
- "selu",
14796
- "softplus",
14797
- "softsign",
14798
- "tanh",
14799
- "sigmoid",
14800
- "hard_sigmoid",
14801
- "exponential",
14802
- "linear",
14803
- "elu",
14804
- "swish"
14805
- ]
14806
- }
14807
- ],
14808
- "options": null
14809
- },
14810
14642
  {
14811
14643
  "type": "Layer",
14812
14644
  "shape_calc": [
@@ -191,8 +191,6 @@ class KerasJsonModelImport:
191
191
  return [KerasJsonModelImport._serialize_arg(a) for a in arg]
192
192
  if isinstance(arg, dict):
193
193
  return {k: KerasJsonModelImport._serialize_arg(v) for k, v in arg.items()}
194
- if isinstance(arg, type(Ellipsis)):
195
- return f'{nojsonable_arg_serialization_prefix}{str(arg)}'
196
194
  raise Exception('Unsupported call arg')
197
195
 
198
196
  @staticmethod
@@ -252,9 +250,9 @@ class KerasJsonModelImport:
252
250
  if 'selected' in layer_metadata:
253
251
  layer_config["selected"] = layer_metadata['selected']
254
252
  # TODO: remove this hard coded condition after support
255
- # if layer_config.get('return_state'):
256
- # raise Exception(f"{layer_metadata.get('name')} layer with return_state True is not supported,"
257
- # f" please try to contact Tensorleap support")
253
+ if layer_config.get('return_state'):
254
+ raise Exception(f"{layer_metadata.get('name')} layer with return_state True is not supported,"
255
+ f" please try to contact Tensorleap support")
258
256
 
259
257
  def generate_rp_node(self, layer: Dict[str, Any], layer_metadata: Dict[str, Any], node_key: str) -> None:
260
258
  if layer['name'] not in self.nodes_cache:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: leap-model-parser
3
- Version: 0.1.123.dev3
3
+ Version: 0.1.124
4
4
  Summary:
5
5
  Home-page: https://github.com/tensorleap/leap-model-parser
6
6
  License: MIT
@@ -16,7 +16,7 @@ Requires-Dist: keras-data-format-converter (==0.1.16)
16
16
  Requires-Dist: leap-model-rebuilder (==0.1.5)
17
17
  Requires-Dist: numpy (>=1.22.3,<2.0.0)
18
18
  Requires-Dist: onnx (==1.10.1)
19
- Requires-Dist: onnx2kerastl (==0.0.114.dev2)
19
+ Requires-Dist: onnx2kerastl (==0.0.115)
20
20
  Requires-Dist: tensorflow (==2.11.0) ; platform_machine == "x86_64"
21
21
  Requires-Dist: tensorflow-macos (==2.11.0) ; platform_machine == "arm64"
22
22
  Project-URL: Repository, https://github.com/tensorleap/leap-model-parser
@@ -3,9 +3,9 @@ leap_model_parser/__init__.py,sha256=OAU7rFHAVVWUM-cDtQ4Ohum567KN8M-YTkHZp5KiYbo
3
3
  leap_model_parser/contract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  leap_model_parser/contract/graph.py,sha256=c5rSlJJQ3JzLhyeniglzrP5GH0fp8UZDQKZw1fcrNe8,1132
5
5
  leap_model_parser/contract/importmodelresponse.py,sha256=GlvnKS8xrebU2Sj0dxqtEhAOOo3DlOtT7AMJ2BlzH9E,145
6
- leap_model_parser/contract/nodedata.py,sha256=vY855Gkk9J_W6vgFjQgt1YdqINpEgvbymGDbbJqwdYk,43696
7
- leap_model_parser/contract/ui_components.json,sha256=VOwTd2KZ0RAhHnUnqWxhYmezhjJDJxAHHyQdgKrhZQA,420821
8
- leap_model_parser/keras_json_model_import.py,sha256=INdcTkf5dSHOAaXStcSIIuk8azMwdX1sqzwCJ3pqjRs,16666
6
+ leap_model_parser/contract/nodedata.py,sha256=1_ML0nzp3QUZ0_9mGSLhfO4_hqjYMwi0DWLwymUnWEs,43326
7
+ leap_model_parser/contract/ui_components.json,sha256=lhKWOQjvGCxQakDcNHq7aBmORUf67ZodZcCtJ_TIcsI,416303
8
+ leap_model_parser/keras_json_model_import.py,sha256=f3ISFoiXPgxzIXAxvbiIKyxcvq4Z-Xv8X0O2I9BQA5k,16546
9
9
  leap_model_parser/model_parser.py,sha256=_Zwb9LA0v8EshQJc2IQ0LwXyxonueeMasAMs0zfF4CQ,6738
10
10
  leap_model_parser/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  leap_model_parser/utils/layerpedia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -16,8 +16,8 @@ leap_model_parser/utils/uicomponents/__init__.py,sha256=ShNUN5NLzaxOQ5ByNUUWJG6v
16
16
  leap_model_parser/utils/uicomponents/generatenodedata.py,sha256=LRaPlO5jJ9pUtkvLG9QaGBRnu860wNH_OkBM6UKLGGQ,3035
17
17
  leap_model_parser/utils/uicomponents/tensorflowinscpection.py,sha256=ym613z9iQKPDBpr0RYD35bTABdm1L-Ez86G47BYT7qw,6775
18
18
  leap_model_parser/utils/uicomponents/ui_components_config.yaml,sha256=nzhcSR-00erM-D09CczOmfF4a6w9kZUgDjDksHtLsUo,19604
19
- leap_model_parser-0.1.123.dev3.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
20
- leap_model_parser-0.1.123.dev3.dist-info/METADATA,sha256=8H6PX_he-FwtGGoDAVXe98KG3qoEWlaY42UDcCFuSGg,1020
21
- leap_model_parser-0.1.123.dev3.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
22
- leap_model_parser-0.1.123.dev3.dist-info/entry_points.txt,sha256=ZvV6EuQt1uAqwapNg5Lo2qjJM9ZG5g2wfzZoLh_Ztyk,77
23
- leap_model_parser-0.1.123.dev3.dist-info/RECORD,,
19
+ leap_model_parser-0.1.124.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
20
+ leap_model_parser-0.1.124.dist-info/METADATA,sha256=eGY5iKVapRHkOvU_e0ULp1eC84kDK-kUiumP-HC3qP0,1010
21
+ leap_model_parser-0.1.124.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
22
+ leap_model_parser-0.1.124.dist-info/entry_points.txt,sha256=ZvV6EuQt1uAqwapNg5Lo2qjJM9ZG5g2wfzZoLh_Ztyk,77
23
+ leap_model_parser-0.1.124.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.6.1
2
+ Generator: poetry-core 1.7.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any