leap-model-parser 0.1.199.dev3__py3-none-any.whl → 0.1.201.dev1__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.
- leap_model_parser/leap_graph_editor.py +6 -1
- leap_model_parser/model_parser.py +2 -1
- leap_model_parser-0.1.201.dev1.dist-info/LICENSE +21 -0
- {leap_model_parser-0.1.199.dev3.dist-info → leap_model_parser-0.1.201.dev1.dist-info}/METADATA +5 -5
- {leap_model_parser-0.1.199.dev3.dist-info → leap_model_parser-0.1.201.dev1.dist-info}/RECORD +8 -7
- {leap_model_parser-0.1.199.dev3.dist-info → leap_model_parser-0.1.201.dev1.dist-info}/WHEEL +1 -1
- /leap_model_parser-0.1.199.dev3.dist-info/LICENSE → /LICENSE +0 -0
- {leap_model_parser-0.1.199.dev3.dist-info → leap_model_parser-0.1.201.dev1.dist-info}/entry_points.txt +0 -0
@@ -31,7 +31,7 @@ class LeapGraphEditor:
|
|
31
31
|
f"Prediction node with name {prediction_node.name} not found in model graph"
|
32
32
|
prediction_node_id = prediction_mapping_node.id
|
33
33
|
self.model_graph[prediction_node_id].data['prediction_type'] = prediction_labels_name
|
34
|
-
|
34
|
+
elif node_connection.node.type == NodeMappingType.Visualizer:
|
35
35
|
new_visualizer_node_id = self._add_visualizer_node(
|
36
36
|
node_connection.node.name, node_connection.node.sub_type,
|
37
37
|
node_connection.node.user_unique_name, node_connection.node.arg_names)
|
@@ -71,6 +71,8 @@ class LeapGraphEditor:
|
|
71
71
|
|
72
72
|
def _find_input_node_by_origin_name(self, origin_name: str) -> Optional[Node]:
|
73
73
|
for node in self.model_graph.values():
|
74
|
+
if node.data.get('original_output_name') == origin_name:
|
75
|
+
return node
|
74
76
|
if node.data.get('output_name') == origin_name:
|
75
77
|
return node
|
76
78
|
return None
|
@@ -210,7 +212,10 @@ class LeapGraphEditor:
|
|
210
212
|
input_node_by_origin = self._find_input_node_by_origin_name(origin_name)
|
211
213
|
assert input_node_by_origin is not None, f"Input node with origin name {origin_name} not found in model graph"
|
212
214
|
input_node_id = input_node_by_origin.id
|
215
|
+
if 'original_output_name' not in self.model_graph[input_node_id].data:
|
216
|
+
self.model_graph[input_node_id].data['original_output_name'] = self.model_graph[input_node_id].data['output_name']
|
213
217
|
self.model_graph[input_node_id].data['output_name'] = input_node.name
|
218
|
+
|
214
219
|
output_keys = list(self.model_graph[input_node_id].outputs.keys())
|
215
220
|
for output_key in output_keys:
|
216
221
|
new_output_key = f'{input_node_id}-{input_node.name}'
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import glob
|
2
2
|
import json
|
3
3
|
import ntpath
|
4
|
+
import pickle
|
4
5
|
import tarfile
|
5
6
|
import tempfile
|
6
7
|
from importlib.util import find_spec
|
@@ -8,7 +9,7 @@ from pathlib import Path
|
|
8
9
|
|
9
10
|
|
10
11
|
import tensorflow as tf # type: ignore
|
11
|
-
from code_loader.contract.mapping import NodeConnection # type: ignore
|
12
|
+
from code_loader.contract.mapping import NodeConnection, NodeMapping # type: ignore
|
12
13
|
from keras import Model # type: ignore
|
13
14
|
from keras_data_format_converter import convert_channels_first_to_last # type: ignore
|
14
15
|
from leap_model_rebuilder import rebuild_model # type: ignore
|
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2021 TensorLeap
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
{leap_model_parser-0.1.199.dev3.dist-info → leap_model_parser-0.1.201.dev1.dist-info}/METADATA
RENAMED
@@ -1,7 +1,8 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.1
|
2
2
|
Name: leap-model-parser
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.201.dev1
|
4
4
|
Summary:
|
5
|
+
Home-page: https://github.com/tensorleap/leap-model-parser
|
5
6
|
License: MIT
|
6
7
|
Author: idan
|
7
8
|
Author-email: idan.yogev@tensorleap.ai
|
@@ -11,16 +12,15 @@ Classifier: Programming Language :: Python :: 3
|
|
11
12
|
Classifier: Programming Language :: Python :: 3.8
|
12
13
|
Classifier: Programming Language :: Python :: 3.9
|
13
14
|
Classifier: Programming Language :: Python :: 3.10
|
14
|
-
Requires-Dist: code-loader (==1.0.
|
15
|
+
Requires-Dist: code-loader (==1.0.102.dev3)
|
15
16
|
Requires-Dist: keras-data-format-converter (==0.1.22)
|
16
17
|
Requires-Dist: leap-model-rebuilder (==0.1.7)
|
17
18
|
Requires-Dist: numpy (>=1.22.3,<2.0.0)
|
18
19
|
Requires-Dist: onnx (==1.13.0)
|
19
|
-
Requires-Dist: onnx2kerastl (==0.0.
|
20
|
+
Requires-Dist: onnx2kerastl (==0.0.175)
|
20
21
|
Requires-Dist: tensorflow (==2.12.0) ; platform_machine == "x86_64"
|
21
22
|
Requires-Dist: tensorflow-io-gcs-filesystem (==0.34.0)
|
22
23
|
Requires-Dist: tensorflow-macos (==2.12.0) ; platform_machine == "arm64"
|
23
|
-
Project-URL: Homepage, https://github.com/tensorleap/leap-model-parser
|
24
24
|
Project-URL: Repository, https://github.com/tensorleap/leap-model-parser
|
25
25
|
Description-Content-Type: text/markdown
|
26
26
|
|
{leap_model_parser-0.1.199.dev3.dist-info → leap_model_parser-0.1.201.dev1.dist-info}/RECORD
RENAMED
@@ -1,3 +1,4 @@
|
|
1
|
+
LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
1
2
|
leap_model_parser/__init__.py,sha256=OAU7rFHAVVWUM-cDtQ4Ohum567KN8M-YTkHZp5KiYbo,132
|
2
3
|
leap_model_parser/contract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
4
|
leap_model_parser/contract/graph.py,sha256=c5rSlJJQ3JzLhyeniglzrP5GH0fp8UZDQKZw1fcrNe8,1132
|
@@ -5,8 +6,8 @@ leap_model_parser/contract/importmodelresponse.py,sha256=GlvnKS8xrebU2Sj0dxqtEhA
|
|
5
6
|
leap_model_parser/contract/nodedata.py,sha256=1_ML0nzp3QUZ0_9mGSLhfO4_hqjYMwi0DWLwymUnWEs,43326
|
6
7
|
leap_model_parser/contract/ui_components.json,sha256=0lsxwOLElW1E-imCcdh3zKPWgzFuQ_bApG6aHvYfTvo,410591
|
7
8
|
leap_model_parser/keras_json_model_import.py,sha256=x7HOH6iaASfzJgwMRHgF5SQS-iFOF5j9yCG0mDC9HEA,16794
|
8
|
-
leap_model_parser/leap_graph_editor.py,sha256=
|
9
|
-
leap_model_parser/model_parser.py,sha256=
|
9
|
+
leap_model_parser/leap_graph_editor.py,sha256=fGbGo_28nG_KU7vFB3-d_zkXVvYWwtqOk_1ZkBeg6So,13289
|
10
|
+
leap_model_parser/model_parser.py,sha256=Je37-FjrNgi8w17rBIt_b71xm-BoiopBAvgW30qfb7o,6614
|
10
11
|
leap_model_parser/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
12
|
leap_model_parser/utils/layerpedia/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
13
|
leap_model_parser/utils/layerpedia/layerpedia.py,sha256=1syubfXBTB630TVkgcQ-Ge7Qe9Zbr6EtZRreuqCJnQ8,9292
|
@@ -17,8 +18,8 @@ leap_model_parser/utils/uicomponents/generatenodedata.py,sha256=LRaPlO5jJ9pUtkvL
|
|
17
18
|
leap_model_parser/utils/uicomponents/tensorflowinscpection.py,sha256=ym613z9iQKPDBpr0RYD35bTABdm1L-Ez86G47BYT7qw,6775
|
18
19
|
leap_model_parser/utils/uicomponents/ui_components.json,sha256=0lsxwOLElW1E-imCcdh3zKPWgzFuQ_bApG6aHvYfTvo,410591
|
19
20
|
leap_model_parser/utils/uicomponents/ui_components_config.yaml,sha256=cRH8T-c3TAL0nfefRvt9pFsjbTWNEg38NRyHR7RpJsk,19534
|
20
|
-
leap_model_parser-0.1.
|
21
|
-
leap_model_parser-0.1.
|
22
|
-
leap_model_parser-0.1.
|
23
|
-
leap_model_parser-0.1.
|
24
|
-
leap_model_parser-0.1.
|
21
|
+
leap_model_parser-0.1.201.dev1.dist-info/LICENSE,sha256=qIwWjdspQeSMTtnFZBC8MuT-95L02FPvzRUdWFxrwJY,1067
|
22
|
+
leap_model_parser-0.1.201.dev1.dist-info/METADATA,sha256=4BgmCL8EBcdv1YuJLUL2Y1mCGhkb-BYVcJMi4hVFf48,1114
|
23
|
+
leap_model_parser-0.1.201.dev1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
24
|
+
leap_model_parser-0.1.201.dev1.dist-info/entry_points.txt,sha256=ZvV6EuQt1uAqwapNg5Lo2qjJM9ZG5g2wfzZoLh_Ztyk,77
|
25
|
+
leap_model_parser-0.1.201.dev1.dist-info/RECORD,,
|
File without changes
|
File without changes
|