ttnn-visualizer 0.25.0__py3-none-any.whl → 0.26.0__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.
- ttnn_visualizer/file_uploads.py +7 -0
- ttnn_visualizer/models.py +10 -1
- ttnn_visualizer/sessions.py +21 -4
- ttnn_visualizer/settings.py +1 -1
- ttnn_visualizer/static/assets/{allPaths-DCydHV9G.js → allPaths-egCeGMYd.js} +1 -1
- ttnn_visualizer/static/assets/{allPathsLoader-XdAstF0k.js → allPathsLoader-ChZ_kotC.js} +2 -2
- ttnn_visualizer/static/assets/{index-C6f3UdbP.css → index-S-_ELv4m.css} +2 -2
- ttnn_visualizer/static/assets/{index-D0kD885Y.js → index-rIoXC5rS.js} +236 -236
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-B81xALt1.js → splitPathsBySizeLoader-BfocwQsJ.js} +1 -1
- ttnn_visualizer/static/index.html +3 -3
- ttnn_visualizer/utils.py +6 -0
- ttnn_visualizer/views.py +42 -1
- {ttnn_visualizer-0.25.0.dist-info → ttnn_visualizer-0.26.0.dist-info}/METADATA +6 -9
- {ttnn_visualizer-0.25.0.dist-info → ttnn_visualizer-0.26.0.dist-info}/RECORD +19 -19
- {ttnn_visualizer-0.25.0.dist-info → ttnn_visualizer-0.26.0.dist-info}/LICENSE +0 -0
- {ttnn_visualizer-0.25.0.dist-info → ttnn_visualizer-0.26.0.dist-info}/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.25.0.dist-info → ttnn_visualizer-0.26.0.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.25.0.dist-info → ttnn_visualizer-0.26.0.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.25.0.dist-info → ttnn_visualizer-0.26.0.dist-info}/top_level.txt +0 -0
ttnn_visualizer/file_uploads.py
CHANGED
@@ -43,6 +43,13 @@ def extract_report_name(files):
|
|
43
43
|
unsplit_report_name = str(files[0].filename)
|
44
44
|
return unsplit_report_name.split("/")[0]
|
45
45
|
|
46
|
+
def extract_npe_name(files):
|
47
|
+
if not files:
|
48
|
+
return None
|
49
|
+
|
50
|
+
file_path = Path(files[0].filename)
|
51
|
+
return file_path.stem
|
52
|
+
|
46
53
|
|
47
54
|
def save_uploaded_files(
|
48
55
|
files,
|
ttnn_visualizer/models.py
CHANGED
@@ -182,6 +182,7 @@ class StatusMessage(SerializeableModel):
|
|
182
182
|
class ActiveReport(SerializeableModel):
|
183
183
|
report_name: Optional[str] = None
|
184
184
|
profile_name: Optional[str] = None
|
185
|
+
npe_name: Optional[str] = None
|
185
186
|
|
186
187
|
|
187
188
|
class RemoteReportFolder(SerializeableModel):
|
@@ -195,6 +196,7 @@ class TabSession(BaseModel):
|
|
195
196
|
tab_id: str
|
196
197
|
report_path: Optional[str] = None
|
197
198
|
profiler_path: Optional[str] = None
|
199
|
+
npe_path: Optional[str] = None
|
198
200
|
active_report: Optional[ActiveReport] = None
|
199
201
|
remote_connection: Optional[RemoteConnection] = None
|
200
202
|
remote_folder: Optional[RemoteReportFolder] = None
|
@@ -208,6 +210,7 @@ class TabSessionTable(db.Model):
|
|
208
210
|
tab_id = Column(String, unique=True, nullable=False)
|
209
211
|
report_path = Column(String)
|
210
212
|
profiler_path = Column(String, nullable=True)
|
213
|
+
npe_path = Column(String, nullable=True)
|
211
214
|
active_report = db.Column(MutableDict.as_mutable(JSON), nullable=False, default={})
|
212
215
|
remote_connection = Column(JSON, nullable=True)
|
213
216
|
remote_folder = Column(JSON, nullable=True)
|
@@ -219,13 +222,15 @@ class TabSessionTable(db.Model):
|
|
219
222
|
active_report,
|
220
223
|
remote_connection=None,
|
221
224
|
remote_folder=None,
|
225
|
+
remote_profile_folder=None,
|
222
226
|
report_path=None,
|
223
227
|
profiler_path=None,
|
224
|
-
|
228
|
+
npe_path=None,
|
225
229
|
):
|
226
230
|
self.tab_id = tab_id
|
227
231
|
self.active_report = active_report
|
228
232
|
self.report_path = report_path
|
233
|
+
self.npe_path = npe_path
|
229
234
|
self.remote_connection = remote_connection
|
230
235
|
self.remote_folder = remote_folder
|
231
236
|
self.profiler_path = profiler_path
|
@@ -241,6 +246,7 @@ class TabSessionTable(db.Model):
|
|
241
246
|
"remote_profile_folder": self.remote_profile_folder,
|
242
247
|
"report_path": self.report_path,
|
243
248
|
"profiler_path": self.profiler_path,
|
249
|
+
"npe_path": self.npe_path
|
244
250
|
}
|
245
251
|
|
246
252
|
def to_pydantic(self) -> TabSession:
|
@@ -250,6 +256,9 @@ class TabSessionTable(db.Model):
|
|
250
256
|
profiler_path=(
|
251
257
|
str(self.profiler_path) if self.profiler_path is not None else None
|
252
258
|
),
|
259
|
+
npe_path=(
|
260
|
+
str(self.npe_path) if self.npe_path is not None else None
|
261
|
+
),
|
253
262
|
active_report=(
|
254
263
|
(ActiveReport(**self.active_report) if self.active_report else None)
|
255
264
|
if isinstance(self.active_report, dict)
|
ttnn_visualizer/sessions.py
CHANGED
@@ -6,7 +6,7 @@ from logging import getLogger
|
|
6
6
|
|
7
7
|
from flask import request
|
8
8
|
|
9
|
-
from ttnn_visualizer.utils import get_report_path, get_profiler_path
|
9
|
+
from ttnn_visualizer.utils import get_report_path, get_profiler_path, get_npe_path
|
10
10
|
from ttnn_visualizer.models import (
|
11
11
|
TabSessionTable,
|
12
12
|
)
|
@@ -23,6 +23,7 @@ def update_existing_tab_session(
|
|
23
23
|
session_data,
|
24
24
|
report_name,
|
25
25
|
profile_name,
|
26
|
+
npe_name,
|
26
27
|
remote_connection,
|
27
28
|
remote_folder,
|
28
29
|
remote_profile_folder,
|
@@ -34,6 +35,8 @@ def update_existing_tab_session(
|
|
34
35
|
active_report["report_name"] = report_name
|
35
36
|
if profile_name:
|
36
37
|
active_report["profile_name"] = profile_name
|
38
|
+
if npe_name:
|
39
|
+
active_report["npe_name"] = npe_name
|
37
40
|
|
38
41
|
session_data.active_report = active_report
|
39
42
|
|
@@ -48,7 +51,7 @@ def update_existing_tab_session(
|
|
48
51
|
clear_remote_data(session_data)
|
49
52
|
|
50
53
|
update_paths(
|
51
|
-
session_data, active_report, remote_connection
|
54
|
+
session_data, active_report, remote_connection
|
52
55
|
)
|
53
56
|
|
54
57
|
|
@@ -73,7 +76,7 @@ def commit_and_log_session(session_data, tab_id):
|
|
73
76
|
|
74
77
|
|
75
78
|
def update_paths(
|
76
|
-
session_data, active_report, remote_connection
|
79
|
+
session_data, active_report, remote_connection
|
77
80
|
):
|
78
81
|
if active_report.get("profile_name"):
|
79
82
|
session_data.profiler_path = get_profiler_path(
|
@@ -89,11 +92,18 @@ def update_paths(
|
|
89
92
|
remote_connection=remote_connection,
|
90
93
|
)
|
91
94
|
|
95
|
+
if active_report.get("npe_name"):
|
96
|
+
session_data.npe_path = get_npe_path(
|
97
|
+
npe_name=active_report["npe_name"],
|
98
|
+
current_app=current_app
|
99
|
+
)
|
100
|
+
|
92
101
|
|
93
102
|
def create_new_tab_session(
|
94
103
|
tab_id,
|
95
104
|
report_name,
|
96
105
|
profile_name,
|
106
|
+
npe_name,
|
97
107
|
remote_connection,
|
98
108
|
remote_folder,
|
99
109
|
remote_profile_folder,
|
@@ -104,6 +114,8 @@ def create_new_tab_session(
|
|
104
114
|
active_report["report_name"] = report_name
|
105
115
|
if profile_name:
|
106
116
|
active_report["profile_name"] = profile_name
|
117
|
+
if npe_name:
|
118
|
+
active_report["npe_name"] = npe_name
|
107
119
|
|
108
120
|
if clear_remote:
|
109
121
|
remote_connection = None
|
@@ -134,6 +146,7 @@ def update_tab_session(
|
|
134
146
|
tab_id,
|
135
147
|
report_name=None,
|
136
148
|
profile_name=None,
|
149
|
+
npe_name=None,
|
137
150
|
remote_connection=None,
|
138
151
|
remote_folder=None,
|
139
152
|
remote_profile_folder=None,
|
@@ -147,6 +160,7 @@ def update_tab_session(
|
|
147
160
|
session_data,
|
148
161
|
report_name,
|
149
162
|
profile_name,
|
163
|
+
npe_name,
|
150
164
|
remote_connection,
|
151
165
|
remote_folder,
|
152
166
|
remote_profile_folder,
|
@@ -157,6 +171,7 @@ def update_tab_session(
|
|
157
171
|
tab_id,
|
158
172
|
report_name,
|
159
173
|
profile_name,
|
174
|
+
npe_name,
|
160
175
|
remote_connection,
|
161
176
|
remote_folder,
|
162
177
|
remote_profile_folder,
|
@@ -175,6 +190,7 @@ def get_or_create_tab_session(
|
|
175
190
|
tab_id,
|
176
191
|
report_name=None,
|
177
192
|
profile_name=None,
|
193
|
+
npe_name=None,
|
178
194
|
remote_connection=None,
|
179
195
|
remote_folder=None,
|
180
196
|
):
|
@@ -198,11 +214,12 @@ def get_or_create_tab_session(
|
|
198
214
|
db.session.commit()
|
199
215
|
|
200
216
|
# Update the session if any new data is provided
|
201
|
-
if report_name or profile_name or remote_connection or remote_folder:
|
217
|
+
if report_name or profile_name or npe_name or remote_connection or remote_folder:
|
202
218
|
update_tab_session(
|
203
219
|
tab_id=tab_id,
|
204
220
|
report_name=report_name,
|
205
221
|
profile_name=profile_name,
|
222
|
+
npe_name=npe_name,
|
206
223
|
remote_connection=remote_connection,
|
207
224
|
remote_folder=remote_folder,
|
208
225
|
)
|
ttnn_visualizer/settings.py
CHANGED
@@ -19,7 +19,7 @@ class DefaultConfig(object):
|
|
19
19
|
|
20
20
|
# Path Settings
|
21
21
|
REPORT_DATA_DIRECTORY = Path(__file__).parent.absolute().joinpath("data")
|
22
|
-
VERSION = "0.
|
22
|
+
VERSION = "0.26.0"
|
23
23
|
LOCAL_DATA_DIRECTORY = Path(REPORT_DATA_DIRECTORY).joinpath("local")
|
24
24
|
REMOTE_DATA_DIRECTORY = Path(REPORT_DATA_DIRECTORY).joinpath("remote")
|
25
25
|
APPLICATION_DIR = os.path.abspath(os.path.join(__file__, "..", os.pardir))
|
@@ -1 +1 @@
|
|
1
|
-
import{I as n}from"./index-BVMreIQm.js";import{I as e}from"./index-Do7YB6C4.js";import{p as r,I as s}from"./index-
|
1
|
+
import{I as n}from"./index-BVMreIQm.js";import{I as e}from"./index-Do7YB6C4.js";import{p as r,I as s}from"./index-rIoXC5rS.js";function I(o,t){var a=r(o);return t===s.STANDARD?n[a]:e[a]}function p(o){return r(o)}export{n as IconSvgPaths16,e as IconSvgPaths20,I as getIconPaths,p as iconNameToPathsRecordKey};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-
|
2
|
-
import{_ as o,a as n,b as i}from"./index-
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-egCeGMYd.js","assets/index-BVMreIQm.js","assets/index-Do7YB6C4.js","assets/index-rIoXC5rS.js","assets/index-S-_ELv4m.css"])))=>i.map(i=>d[i]);
|
2
|
+
import{_ as o,a as n,b as i}from"./index-rIoXC5rS.js";var _=function(e,a){return o(void 0,void 0,void 0,function(){var t;return n(this,function(r){switch(r.label){case 0:return[4,i(()=>import("./allPaths-egCeGMYd.js"),__vite__mapDeps([0,1,2,3,4]))];case 1:return t=r.sent().getIconPaths,[2,t(e,a)]}})})};export{_ as allPathsLoader};
|