ttnn-visualizer 0.47.0__py3-none-any.whl → 0.48.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.
@@ -1 +1 @@
1
- import{p as r,I as s,_ as a}from"./index-CmA3KkTi.js";const n=async(o,_)=>{const i=r(o);let t;return _===s.STANDARD?t=await a(()=>import("./index-03c8d4Gh.js").then(e=>e.I),[]):t=await a(()=>import("./index-PKNBViIU.js").then(e=>e.I),[]),t[i]};export{n as splitPathsBySizeLoader};
1
+ import{p as r,I as s,_ as a}from"./index-T8PVeTUn.js";const n=async(o,_)=>{const i=r(o);let t;return _===s.STANDARD?t=await a(()=>import("./index-03c8d4Gh.js").then(e=>e.I),[]):t=await a(()=>import("./index-PKNBViIU.js").then(e=>e.I),[]),t[i]};export{n as splitPathsBySizeLoader};
@@ -34,8 +34,8 @@
34
34
  /* SERVER_CONFIG */
35
35
  </script>
36
36
 
37
- <script type="module" crossorigin src="/static/assets/index-CmA3KkTi.js"></script>
38
- <link rel="stylesheet" crossorigin href="/static/assets/index-DJA68-a6.css">
37
+ <script type="module" crossorigin src="/static/assets/index-T8PVeTUn.js"></script>
38
+ <link rel="stylesheet" crossorigin href="/static/assets/index-CZ0Uonoz.css">
39
39
  </head>
40
40
  <body>
41
41
 
@@ -161,12 +161,14 @@ class TestSerializers(unittest.TestCase):
161
161
  "device_id": 1,
162
162
  "address": 1000,
163
163
  "buffer_type": 0,
164
+ "buffer_layout": None,
164
165
  "size": 256,
165
166
  },
166
167
  {
167
168
  "device_id": 2,
168
169
  "address": 2000,
169
170
  "buffer_type": 1,
171
+ "buffer_layout": None,
170
172
  "size": 512,
171
173
  },
172
174
  ],
@@ -179,6 +181,7 @@ class TestSerializers(unittest.TestCase):
179
181
  "device_id": 3,
180
182
  "address": 3000,
181
183
  "buffer_type": 1,
184
+ "buffer_layout": None,
182
185
  "size": 1024,
183
186
  },
184
187
  ],
@@ -260,12 +263,14 @@ class TestSerializers(unittest.TestCase):
260
263
  "device_id": 1,
261
264
  "address": 1000,
262
265
  "buffer_type": 0,
266
+ "buffer_layout": None,
263
267
  "size": 256,
264
268
  },
265
269
  {
266
270
  "device_id": 2,
267
271
  "address": 2000,
268
272
  "buffer_type": 1,
273
+ "buffer_layout": None,
269
274
  "size": 512,
270
275
  },
271
276
  ],
@@ -389,6 +394,7 @@ class TestSerializers(unittest.TestCase):
389
394
  "buffers": [
390
395
  {
391
396
  "address": 1000,
397
+ "buffer_layout": None,
392
398
  "buffer_type": 0,
393
399
  "device_id": 1,
394
400
  "max_size_per_bank": 256,
ttnn_visualizer/views.py CHANGED
@@ -12,6 +12,7 @@ from http import HTTPStatus
12
12
  from pathlib import Path
13
13
  from typing import List
14
14
 
15
+ import orjson
15
16
  import yaml
16
17
  import zstd
17
18
  from flask import Blueprint, Response, current_app, jsonify, request, session
@@ -865,12 +866,10 @@ def create_npe_files():
865
866
  data_directory = current_app.config["LOCAL_DATA_DIRECTORY"]
866
867
 
867
868
  for file in files:
868
- if not file.filename.endswith(".json") and not file.filename.endswith(
869
- ".npeviz.zst"
870
- ):
869
+ if not file.filename.endswith(".json") and not file.filename.endswith(".zst"):
871
870
  return StatusMessage(
872
871
  status=ConnectionTestStates.FAILED,
873
- message="NPE requires a valid .json or .npeviz.zst file",
872
+ message="NPE requires a valid .json or .zst file",
874
873
  ).model_dump()
875
874
 
876
875
  npe_name = extract_npe_name(files)
@@ -1272,4 +1271,67 @@ def get_npe_data(instance: Instance):
1272
1271
  with open(uncompressed_path, "r") as file:
1273
1272
  npe_data = json.load(file)
1274
1273
 
1275
- return jsonify(npe_data)
1274
+ # Use orjson for much faster JSON serialization of large files
1275
+ return Response(orjson.dumps(npe_data), mimetype="application/json")
1276
+
1277
+
1278
+ @api.route("/notify", methods=["POST"])
1279
+ def notify_report_update():
1280
+ """
1281
+ Endpoint to receive notifications about report updates and broadcast them via websockets.
1282
+ """
1283
+ from ttnn_visualizer.sockets import (
1284
+ ExitStatus,
1285
+ ReportGenerated,
1286
+ emit_report_generated,
1287
+ )
1288
+
1289
+ try:
1290
+ data = request.get_json()
1291
+ if not data:
1292
+ return jsonify({"error": "No JSON data provided"}), 400
1293
+
1294
+ report_name = data.get("report_name")
1295
+ exit_status_str = data.get("exit_status")
1296
+
1297
+ if not report_name:
1298
+ return jsonify({"error": "report_name is required"}), 400
1299
+
1300
+ # Validate status
1301
+ try:
1302
+ exit_status = (
1303
+ ExitStatus(exit_status_str.upper()) if exit_status_str else None
1304
+ )
1305
+ except ValueError:
1306
+ return (
1307
+ jsonify({"error": "Invalid exit_status."}),
1308
+ 400,
1309
+ )
1310
+
1311
+ # Create and emit the report update
1312
+ report_generated = ReportGenerated(
1313
+ report_name=report_name,
1314
+ exit_status=exit_status,
1315
+ profiler_path=data.get("profiler_path"),
1316
+ performance_path=data.get("performance_path"),
1317
+ )
1318
+ emit_report_generated(report_generated)
1319
+
1320
+ logger.info(f"Report generated notification processed: {report_name}")
1321
+
1322
+ return (
1323
+ jsonify(
1324
+ {
1325
+ "report_name": report_name,
1326
+ "profiler_path": report_generated.profiler_path,
1327
+ "performance_path": report_generated.performance_path,
1328
+ "exit_status": exit_status.value if exit_status else None,
1329
+ "timestamp": report_generated.timestamp,
1330
+ }
1331
+ ),
1332
+ 200,
1333
+ )
1334
+
1335
+ except Exception as e:
1336
+ logger.error(f"Error processing report update notification: {str(e)}")
1337
+ return jsonify({"error": "Internal server error"}), 500
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ttnn_visualizer
3
- Version: 0.47.0
3
+ Version: 0.48.0
4
4
  Summary: TT-NN Visualizer
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -17,6 +17,7 @@ Requires-Dist: Flask-Static-Digest==0.4.1
17
17
  Requires-Dist: Flask==3.1.1
18
18
  Requires-Dist: gevent==24.10.2
19
19
  Requires-Dist: gunicorn~=23.0.0
20
+ Requires-Dist: orjson>=3.9.0
20
21
  Requires-Dist: pandas==2.2.3
21
22
  Requires-Dist: pydantic_core==2.27.1
22
23
  Requires-Dist: pydantic==2.10.3
@@ -7,25 +7,25 @@ ttnn_visualizer/exceptions.py,sha256=XwTIykJpdvZV8nqrd9JZdHIYL0EBFBhTbE9H09VZluA
7
7
  ttnn_visualizer/extensions.py,sha256=6OIRJ8-_ccfjOaXSruRXiS29jEbxp4Pyk-0JlD8IHBQ,379
8
8
  ttnn_visualizer/file_uploads.py,sha256=HFcC6TBt5I0oBkiKgM2Qw1W7hpixE8TOTACS5N-rmGE,5013
9
9
  ttnn_visualizer/instances.py,sha256=XctQgQXdlwtuXWFXFletRoX1m1lGUZdiW3TwIIjY0uw,11564
10
- ttnn_visualizer/models.py,sha256=oxZVvWjtBDP0X6GqoYaH4wDa5PqJF_vG_I3Q_YWHMmo,7814
11
- ttnn_visualizer/queries.py,sha256=3Nv0jXIDNVH-qKx9xc9zSINy4FdmDidu-1I6f-VYV48,9603
10
+ ttnn_visualizer/models.py,sha256=QCL64uynSS3WbUI05UoHIgex6eWgMGqf0-YTm1XwCwI,7854
11
+ ttnn_visualizer/queries.py,sha256=0s2zGA7CH1fbV6BWB-MhdHfWW7GhkDti4gVJyDmeCE8,9607
12
12
  ttnn_visualizer/remote_sqlite_setup.py,sha256=VdJk5LfkaJo1XPC-yxy909I0AOgJF1GUjryj0Oe0O14,3498
13
13
  ttnn_visualizer/serializers.py,sha256=LmjHIrFg8BLx1JKVFh9Nd_TcA7nyy1MwY2BOGnX1MKw,8029
14
14
  ttnn_visualizer/settings.py,sha256=W0PCeBCGXONNfFHqI7ATCVGhKv0a02-BhwBwrB3Clag,4660
15
15
  ttnn_visualizer/sftp_operations.py,sha256=9HwbPJPSO1UUQ98d5zeWAkEwR0zFPryUakcI68GqkVw,30181
16
- ttnn_visualizer/sockets.py,sha256=W5pK0QmlsU58EH_Qnra6HlcswLS7vsw5C_pk4avVYvs,3706
16
+ ttnn_visualizer/sockets.py,sha256=_Hdne33r4FrB2tg58Vw87FWLbgQ_ikICVp4o1Mkv2mo,4789
17
17
  ttnn_visualizer/ssh_client.py,sha256=-GS2_1tdlUqVoLfRS02i3_o1fQaM39UQN-jtAnPBmzQ,13511
18
18
  ttnn_visualizer/utils.py,sha256=_W990vRnup9zlWJ-g_Bggyo-wDjCYF49p0nPxWNgxrE,12934
19
- ttnn_visualizer/views.py,sha256=4l9bYIdDMyui1WjBDOn7rJ9V4egc439jeN1uG47Yk7Y,43072
20
- ttnn_visualizer/static/index.html,sha256=5kiMyUyhbOhgwPgREMpeH3v-AGdP5G4Qtb10TcV7A-w,1135
21
- ttnn_visualizer/static/assets/allPaths-OR2-IW-_.js,sha256=Oh2drbxvlmAIFWE4Srb9Pi8hdb__NF3_mVn2Vm60UI4,255
22
- ttnn_visualizer/static/assets/allPathsLoader-xRXweacG.js,sha256=co2dBtSW_xZQ_XduamaE0h5AVsH-Ldswk44uwD7QvNc,477
19
+ ttnn_visualizer/views.py,sha256=E5UFdbR8_lqHRPJmGrjq3S_F0Wu1WCsydWNihSUj9Fk,45133
20
+ ttnn_visualizer/static/index.html,sha256=PtUUC8PiSjaLZOgM7sFiII-ykqwrL1rX95MzjzYcXmc,1135
21
+ ttnn_visualizer/static/assets/allPaths-DyhSRH--.js,sha256=EUUj2FYiXwESHvwikbQ1n87byC2le5LLW8Q0LY3VyfM,255
22
+ ttnn_visualizer/static/assets/allPathsLoader-DXd_rN1a.js,sha256=eMyPpUy4eYuBbW1TRf5zx1fkA0ihMVzP_joOkP9GMow,477
23
23
  ttnn_visualizer/static/assets/index-03c8d4Gh.js,sha256=k0jIi5q-lzXcPCqAD7K091vBMOkJHmx_fYcYKh-fOnM,285602
24
- ttnn_visualizer/static/assets/index-CmA3KkTi.js,sha256=rp_h66A8t5Jl7OwbDKnM6bj03uE_H2bwqBAc6aIuIKY,7882665
25
- ttnn_visualizer/static/assets/index-DJA68-a6.css,sha256=sPrF4HPkGtkuy0Ae8wkQXcUUzGGRGeKNeymUY6YPtwo,622830
24
+ ttnn_visualizer/static/assets/index-CZ0Uonoz.css,sha256=Xl6ASk5fzFtSKl55fxH-0Qw_RjPZC1aNvIqZmrzSdck,622981
26
25
  ttnn_visualizer/static/assets/index-PKNBViIU.js,sha256=dUuCyAPr_QvvTY0Xula4q4rgOm1J7xgdbppL67off4k,294225
26
+ ttnn_visualizer/static/assets/index-T8PVeTUn.js,sha256=1hk1rZB2-tBCp5WIQB_UZQDnbayuBQp2IX4s62i3-hY,7883860
27
27
  ttnn_visualizer/static/assets/site-BTBrvHC5.webmanifest,sha256=Uy_XmnGuYFVf-OZuma2NvgEPdrCrevb3HZvaxSIHoA0,456
28
- ttnn_visualizer/static/assets/splitPathsBySizeLoader-P9sdNg6R.js,sha256=hrgrHehC3Bwy8EF3pWi11eVXlDm4JZ9Y2-j7CSX0WCY,281
28
+ ttnn_visualizer/static/assets/splitPathsBySizeLoader-Gsi3qlIM.js,sha256=ssz5DwLHNfrtvO7Bji0ya9GLCkwQU9bYScLIErs2j5o,281
29
29
  ttnn_visualizer/static/favicon/android-chrome-192x192.png,sha256=BZWA09Zxaa3fXbaeS6nhWo2e-DUSjm9ElzNQ_xTB5XU,6220
30
30
  ttnn_visualizer/static/favicon/android-chrome-512x512.png,sha256=HBiJSZyguB3o8fMJuqIGcpeBy_9JOdImme3wD02UYCw,62626
31
31
  ttnn_visualizer/static/favicon/favicon-32x32.png,sha256=Zw201qUsczQv1UvoQvJf5smQ2ss10xaTeWxmQNYCGtY,480
@@ -33,11 +33,11 @@ ttnn_visualizer/static/favicon/favicon.svg,sha256=wDPY3VrekJ_DE1TnJ2vUy602K3S4Xe
33
33
  ttnn_visualizer/static/sample-data/cluster-desc.yaml,sha256=LMxOmsRUXtVVU5ogzYkXUozB3dg2IzqIRJQpV_O5qMU,29618
34
34
  ttnn_visualizer/tests/__init__.py,sha256=FCQeTWnXsf-Wx-fay53-lQsm0y5-GcPMUmzhE5upDx0,93
35
35
  ttnn_visualizer/tests/test_queries.py,sha256=HqaDXwudZpXiigJdHkdJP8oiUc-PtHASbpLnQQpbD7A,13792
36
- ttnn_visualizer/tests/test_serializers.py,sha256=AF6m6tvewnZ_OSQMgMTUhsOI26GdJHPajvnRGIa9P4U,18492
37
- ttnn_visualizer-0.47.0.dist-info/licenses/LICENSE,sha256=gcO1GgS_1J-gOVcHALMiIPsyPv2Pu7hSSHhsgkp6F_Y,19345
38
- ttnn_visualizer-0.47.0.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
39
- ttnn_visualizer-0.47.0.dist-info/METADATA,sha256=ugKvf2bHr5oB9S0nXFfYV8tRTBr652XPa3t43IrnFRI,7751
40
- ttnn_visualizer-0.47.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
41
- ttnn_visualizer-0.47.0.dist-info/entry_points.txt,sha256=QpuUpkmQ_mEHJTMqOBdU0MH2Z4WF_9iFsGACeyyAO1E,61
42
- ttnn_visualizer-0.47.0.dist-info/top_level.txt,sha256=M1EGkvDOuIfbhDbcUdz2-TSdmCtDoQ2Uyag9k5JLDSY,16
43
- ttnn_visualizer-0.47.0.dist-info/RECORD,,
36
+ ttnn_visualizer/tests/test_serializers.py,sha256=IJekAZRBpyOr_Ffp0dqSrnhFOU_ZZ8pHma_JO0j23TQ,18762
37
+ ttnn_visualizer-0.48.0.dist-info/licenses/LICENSE,sha256=NQB3xoEB14Z4uKwzMDm2AZSYIcx4hZ5ZNgJNcIChWCo,19504
38
+ ttnn_visualizer-0.48.0.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
39
+ ttnn_visualizer-0.48.0.dist-info/METADATA,sha256=k9gZwu0y6_VmfFxAUwmKwlSYYOkmv9Si--B3AVoMQoE,7780
40
+ ttnn_visualizer-0.48.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
41
+ ttnn_visualizer-0.48.0.dist-info/entry_points.txt,sha256=QpuUpkmQ_mEHJTMqOBdU0MH2Z4WF_9iFsGACeyyAO1E,61
42
+ ttnn_visualizer-0.48.0.dist-info/top_level.txt,sha256=M1EGkvDOuIfbhDbcUdz2-TSdmCtDoQ2Uyag9k5JLDSY,16
43
+ ttnn_visualizer-0.48.0.dist-info/RECORD,,
@@ -162,6 +162,7 @@ The following separate and independent dependencies are utilized by this project
162
162
  - flask-sqlalchemy - BSD‑3‑Clause - https://github.com/pallets-eco/flask-sqlalchemy/blob/main/LICENSE
163
163
  - gevent - MIT - https://github.com/gevent/gevent/blob/master/LICENSE
164
164
  - gunicorn - MIT - https://github.com/benoitc/gunicorn/blob/master/LICENSE
165
+ - orjson - Dual-license Apache-2.0 or MIT - https://github.com/ijl/orjson/blob/master/LICENSE-APACHE and https://github.com/ijl/orjson/blob/master/LICENSE-MIT
165
166
  - pandas - BSD‑3‑Clause - https://github.com/pandas-dev/pandas/blob/main/LICENSE
166
167
  - playwright - Apache-2.0 - https://github.com/microsoft/playwright-python/blob/main/LICENSE
167
168
  - pydantic - MIT - https://github.com/pydantic/pydantic-settings/blob/main/LICENSE
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-OR2-IW-_.js","assets/index-03c8d4Gh.js","assets/index-PKNBViIU.js","assets/index-CmA3KkTi.js","assets/index-DJA68-a6.css"])))=>i.map(i=>d[i]);
2
- import{_ as e}from"./index-CmA3KkTi.js";const s=async(t,a)=>{const{getIconPaths:o}=await e(async()=>{const{getIconPaths:r}=await import("./allPaths-OR2-IW-_.js");return{getIconPaths:r}},__vite__mapDeps([0,1,2,3,4]));return o(t,a)};export{s as allPathsLoader};