ttnn-visualizer 0.49.0__py3-none-any.whl → 0.51.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/csv_queries.py +20 -13
- ttnn_visualizer/static/assets/{allPaths-G_CNx_x1.js → allPaths-DucASGPg.js} +1 -1
- ttnn_visualizer/static/assets/allPathsLoader-CaG_8uEi.js +2 -0
- ttnn_visualizer/static/assets/{index-DVrPLQJ7.js → index-DFKuZosj.js} +207 -207
- ttnn_visualizer/static/assets/{index-UuXdrHif.css → index-UWmN5XEZ.css} +1 -1
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-ivxxaHxa.js → splitPathsBySizeLoader-ld7TLnGh.js} +1 -1
- ttnn_visualizer/static/index.html +2 -2
- ttnn_visualizer/views.py +115 -51
- {ttnn_visualizer-0.49.0.dist-info → ttnn_visualizer-0.51.0.dist-info}/METADATA +2 -2
- {ttnn_visualizer-0.49.0.dist-info → ttnn_visualizer-0.51.0.dist-info}/RECORD +15 -15
- ttnn_visualizer/static/assets/allPathsLoader-s_Yfmxfp.js +0 -2
- {ttnn_visualizer-0.49.0.dist-info → ttnn_visualizer-0.51.0.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.49.0.dist-info → ttnn_visualizer-0.51.0.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.49.0.dist-info → ttnn_visualizer-0.51.0.dist-info}/licenses/LICENSE +0 -0
- {ttnn_visualizer-0.49.0.dist-info → ttnn_visualizer-0.51.0.dist-info}/licenses/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.49.0.dist-info → ttnn_visualizer-0.51.0.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{p as r,I as s,_ as a}from"./index-
|
1
|
+
import{p as r,I as s,_ as a}from"./index-DFKuZosj.js";const n=async(o,_)=>{const i=r(o);let t;return _===s.STANDARD?t=await a(()=>import("./index-CnPrfHYh.js").then(e=>e.I),[]):t=await a(()=>import("./index-Cnc1EkDo.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-
|
38
|
-
<link rel="stylesheet" crossorigin href="/static/assets/index-
|
37
|
+
<script type="module" crossorigin src="/static/assets/index-DFKuZosj.js"></script>
|
38
|
+
<link rel="stylesheet" crossorigin href="/static/assets/index-UWmN5XEZ.css">
|
39
39
|
</head>
|
40
40
|
<body>
|
41
41
|
|
ttnn_visualizer/views.py
CHANGED
@@ -25,12 +25,9 @@ from ttnn_visualizer.csv_queries import (
|
|
25
25
|
from ttnn_visualizer.decorators import local_only, with_instance
|
26
26
|
from ttnn_visualizer.enums import ConnectionTestStates
|
27
27
|
from ttnn_visualizer.exceptions import (
|
28
|
-
AuthenticationException,
|
29
28
|
AuthenticationFailedException,
|
30
29
|
DataFormatError,
|
31
|
-
NoValidConnectionsError,
|
32
30
|
RemoteConnectionException,
|
33
|
-
SSHException,
|
34
31
|
)
|
35
32
|
from ttnn_visualizer.file_uploads import (
|
36
33
|
extract_folder_name_from_files,
|
@@ -46,7 +43,7 @@ from ttnn_visualizer.models import (
|
|
46
43
|
StatusMessage,
|
47
44
|
)
|
48
45
|
from ttnn_visualizer.queries import DatabaseQueries
|
49
|
-
from ttnn_visualizer.remote_sqlite_setup import
|
46
|
+
from ttnn_visualizer.remote_sqlite_setup import get_sqlite_path
|
50
47
|
from ttnn_visualizer.serializers import (
|
51
48
|
serialize_buffer,
|
52
49
|
serialize_buffer_pages,
|
@@ -102,8 +99,7 @@ def operation_list(instance: Instance):
|
|
102
99
|
inputs = list(db.query_input_tensors())
|
103
100
|
devices = list(db.query_devices())
|
104
101
|
producers_consumers = list(db.query_producers_consumers())
|
105
|
-
|
106
|
-
return serialize_operations(
|
102
|
+
serialized_operations = serialize_operations(
|
107
103
|
inputs,
|
108
104
|
operation_arguments,
|
109
105
|
operations,
|
@@ -114,6 +110,10 @@ def operation_list(instance: Instance):
|
|
114
110
|
producers_consumers,
|
115
111
|
device_operations,
|
116
112
|
)
|
113
|
+
return Response(
|
114
|
+
orjson.dumps(serialized_operations),
|
115
|
+
mimetype="application/json",
|
116
|
+
)
|
117
117
|
|
118
118
|
|
119
119
|
@api.route("/operations/<operation_id>", methods=["GET"])
|
@@ -173,7 +173,7 @@ def operation_detail(operation_id, instance: Instance):
|
|
173
173
|
|
174
174
|
devices = list(db.query_devices())
|
175
175
|
|
176
|
-
|
176
|
+
serialized_operation = serialize_operation(
|
177
177
|
buffers,
|
178
178
|
inputs,
|
179
179
|
operation,
|
@@ -188,6 +188,11 @@ def operation_detail(operation_id, instance: Instance):
|
|
188
188
|
device_operations,
|
189
189
|
)
|
190
190
|
|
191
|
+
return Response(
|
192
|
+
orjson.dumps(serialized_operation),
|
193
|
+
mimetype="application/json",
|
194
|
+
)
|
195
|
+
|
191
196
|
|
192
197
|
@api.route("/operation-history", methods=["GET"])
|
193
198
|
@with_instance
|
@@ -198,9 +203,12 @@ def operation_history(instance: Instance):
|
|
198
203
|
Path(str(instance.profiler_path)).parent / operation_history_filename
|
199
204
|
)
|
200
205
|
if not operation_history_file.exists():
|
201
|
-
return []
|
206
|
+
return jsonify([])
|
202
207
|
with open(operation_history_file, "r") as file:
|
203
|
-
return
|
208
|
+
return Response(
|
209
|
+
orjson.dumps(json.load(file)),
|
210
|
+
mimetype="application/json",
|
211
|
+
)
|
204
212
|
|
205
213
|
|
206
214
|
@api.route("/config")
|
@@ -211,7 +219,10 @@ def get_config(instance: Instance):
|
|
211
219
|
if not config_file.exists():
|
212
220
|
return {}
|
213
221
|
with open(config_file, "r") as file:
|
214
|
-
return
|
222
|
+
return Response(
|
223
|
+
orjson.dumps(json.load(file)),
|
224
|
+
mimetype="application/json",
|
225
|
+
)
|
215
226
|
|
216
227
|
|
217
228
|
@api.route("/tensors", methods=["GET"])
|
@@ -224,9 +235,13 @@ def tensors_list(instance: Instance):
|
|
224
235
|
local_comparisons = list(db.query_tensor_comparisons())
|
225
236
|
global_comparisons = list(db.query_tensor_comparisons(local=False))
|
226
237
|
producers_consumers = list(db.query_producers_consumers())
|
227
|
-
|
238
|
+
serialized_tensors = serialize_tensors(
|
228
239
|
tensors, producers_consumers, local_comparisons, global_comparisons
|
229
240
|
)
|
241
|
+
return Response(
|
242
|
+
orjson.dumps(serialized_tensors),
|
243
|
+
mimetype="application/json",
|
244
|
+
)
|
230
245
|
|
231
246
|
|
232
247
|
@api.route("/buffer", methods=["GET"])
|
@@ -248,7 +263,10 @@ def buffer_detail(instance: Instance):
|
|
248
263
|
buffer = db.query_next_buffer(operation_id, address)
|
249
264
|
if not buffer:
|
250
265
|
return Response(status=HTTPStatus.NOT_FOUND)
|
251
|
-
return
|
266
|
+
return Response(
|
267
|
+
orjson.dumps(dataclasses.asdict(buffer)),
|
268
|
+
mimetype="application/json",
|
269
|
+
)
|
252
270
|
|
253
271
|
|
254
272
|
@api.route("/buffer-pages", methods=["GET"])
|
@@ -283,7 +301,10 @@ def buffer_pages(instance: Instance):
|
|
283
301
|
)
|
284
302
|
)
|
285
303
|
)
|
286
|
-
return
|
304
|
+
return Response(
|
305
|
+
orjson.dumps(serialize_buffer_pages(buffers)),
|
306
|
+
mimetype="application/json",
|
307
|
+
)
|
287
308
|
|
288
309
|
|
289
310
|
@api.route("/tensors/<tensor_id>", methods=["GET"])
|
@@ -295,7 +316,10 @@ def tensor_detail(tensor_id, instance: Instance):
|
|
295
316
|
if not tensors:
|
296
317
|
return Response(status=HTTPStatus.NOT_FOUND)
|
297
318
|
|
298
|
-
return
|
319
|
+
return Response(
|
320
|
+
orjson.dumps(dataclasses.asdict(tensors[0])),
|
321
|
+
mimetype="application/json",
|
322
|
+
)
|
299
323
|
|
300
324
|
|
301
325
|
@api.route("/buffers", methods=["GET"])
|
@@ -315,7 +339,7 @@ def get_all_buffers(instance: Instance):
|
|
315
339
|
)
|
316
340
|
)
|
317
341
|
serialized = [serialize_buffer(b) for b in buffers]
|
318
|
-
return
|
342
|
+
return Response(orjson.dumps(serialized), mimetype="application/json")
|
319
343
|
|
320
344
|
|
321
345
|
@api.route("/operation-buffers", methods=["GET"])
|
@@ -335,7 +359,10 @@ def get_operations_buffers(instance: Instance):
|
|
335
359
|
)
|
336
360
|
)
|
337
361
|
operations = list(db.query_operations())
|
338
|
-
return
|
362
|
+
return Response(
|
363
|
+
orjson.dumps(serialize_operations_buffers(operations, buffers)),
|
364
|
+
mimetype="application/json",
|
365
|
+
)
|
339
366
|
|
340
367
|
|
341
368
|
@api.route("/operation-buffers/<operation_id>", methods=["GET"])
|
@@ -364,7 +391,11 @@ def get_operation_buffers(operation_id, instance: Instance):
|
|
364
391
|
)
|
365
392
|
if not operation:
|
366
393
|
return Response(status=HTTPStatus.NOT_FOUND)
|
367
|
-
|
394
|
+
|
395
|
+
return Response(
|
396
|
+
orjson.dumps(serialize_operation_buffers(operation, buffers)),
|
397
|
+
mimetype="application/json",
|
398
|
+
)
|
368
399
|
|
369
400
|
|
370
401
|
@api.route("/profiler", methods=["GET"])
|
@@ -374,12 +405,12 @@ def get_profiler_data_list(instance: Instance):
|
|
374
405
|
resolver = create_path_resolver(current_app)
|
375
406
|
|
376
407
|
# Note: "profiler" in app terminology maps to tt-metal's ttnn/reports
|
377
|
-
path = resolver.get_base_report_path("profiler"
|
408
|
+
path = resolver.get_base_report_path("profiler")
|
378
409
|
|
379
410
|
if not path.exists():
|
380
411
|
if resolver.is_direct_report_mode:
|
381
412
|
logger.warning(f"TT-Metal profiler reports not found: {path}")
|
382
|
-
return
|
413
|
+
return []
|
383
414
|
else:
|
384
415
|
path.mkdir(parents=True, exist_ok=True)
|
385
416
|
|
@@ -439,7 +470,7 @@ def get_profiler_data_list(instance: Instance):
|
|
439
470
|
continue
|
440
471
|
valid_dirs.append({"path": dir_path.name, "reportName": report_name})
|
441
472
|
|
442
|
-
return
|
473
|
+
return Response(orjson.dumps(valid_dirs), mimetype="application/json")
|
443
474
|
|
444
475
|
|
445
476
|
@api.route("/profiler/<profiler_name>", methods=["DELETE"])
|
@@ -494,16 +525,12 @@ def get_performance_data_list(instance: Instance):
|
|
494
525
|
resolver = create_path_resolver(current_app)
|
495
526
|
|
496
527
|
# Note: "performance" in app terminology maps to tt-metal's profiler/reports
|
497
|
-
path = resolver.get_base_report_path("performance"
|
498
|
-
|
499
|
-
is_remote = True if instance.remote_connection else False
|
528
|
+
path = resolver.get_base_report_path("performance")
|
500
529
|
|
501
530
|
if not path.exists():
|
502
531
|
if resolver.is_direct_report_mode:
|
503
532
|
logger.warning(f"TT-Metal performance reports not found: {path}")
|
504
533
|
return jsonify([])
|
505
|
-
elif not is_remote:
|
506
|
-
path.mkdir(parents=True, exist_ok=True)
|
507
534
|
|
508
535
|
if current_app.config["SERVER_MODE"]:
|
509
536
|
session_instances = session.get("instances", [])
|
@@ -564,7 +591,7 @@ def get_performance_data_list(instance: Instance):
|
|
564
591
|
}
|
565
592
|
)
|
566
593
|
|
567
|
-
return
|
594
|
+
return Response(orjson.dumps(valid_dirs), mimetype="application/json")
|
568
595
|
|
569
596
|
|
570
597
|
@api.route("/performance/device-log", methods=["GET"])
|
@@ -572,9 +599,10 @@ def get_performance_data_list(instance: Instance):
|
|
572
599
|
def get_performance_data(instance: Instance):
|
573
600
|
if not instance.performance_path:
|
574
601
|
return Response(status=HTTPStatus.NOT_FOUND)
|
602
|
+
|
575
603
|
with DeviceLogProfilerQueries(instance) as csv:
|
576
604
|
result = csv.get_all_entries(as_dict=True, limit=100)
|
577
|
-
return
|
605
|
+
return Response(orjson.dumps(result), mimetype="application/json")
|
578
606
|
|
579
607
|
|
580
608
|
@api.route("/performance/perf-results", methods=["GET"])
|
@@ -585,7 +613,7 @@ def get_profiler_performance_data(instance: Instance):
|
|
585
613
|
with OpsPerformanceQueries(instance) as csv:
|
586
614
|
# result = csv.query_by_op_code(op_code="(torch) contiguous", as_dict=True)
|
587
615
|
result = csv.get_all_entries(as_dict=True, limit=100)
|
588
|
-
return
|
616
|
+
return Response(orjson.dumps(result), mimetype="application/json")
|
589
617
|
|
590
618
|
|
591
619
|
@api.route("/performance/<performance_name>", methods=["DELETE"])
|
@@ -670,7 +698,7 @@ def get_performance_results_report(instance: Instance):
|
|
670
698
|
except DataFormatError:
|
671
699
|
return Response(status=HTTPStatus.UNPROCESSABLE_ENTITY)
|
672
700
|
|
673
|
-
return
|
701
|
+
return Response(orjson.dumps(report), mimetype="application/json")
|
674
702
|
|
675
703
|
|
676
704
|
@api.route("/performance/device-log/raw", methods=["GET"])
|
@@ -678,7 +706,16 @@ def get_performance_results_report(instance: Instance):
|
|
678
706
|
def get_performance_data_raw(instance: Instance):
|
679
707
|
if not instance.performance_path:
|
680
708
|
return Response(status=HTTPStatus.NOT_FOUND)
|
709
|
+
|
710
|
+
name = request.args.get("name", None)
|
711
|
+
|
712
|
+
if name and not current_app.config["SERVER_MODE"]:
|
713
|
+
performance_path = Path(instance.performance_path).parent / name
|
714
|
+
instance.performance_path = str(performance_path)
|
715
|
+
logger.info(f"************ Performance path set to {instance.performance_path}")
|
716
|
+
|
681
717
|
content = DeviceLogProfilerQueries.get_raw_csv(instance)
|
718
|
+
|
682
719
|
return Response(
|
683
720
|
content,
|
684
721
|
mimetype="text/csv",
|
@@ -696,7 +733,7 @@ def get_npe_manifest(instance: Instance):
|
|
696
733
|
except FileNotFoundError:
|
697
734
|
return jsonify([])
|
698
735
|
|
699
|
-
return
|
736
|
+
return Response(orjson.dumps(content), mimetype="application/json")
|
700
737
|
|
701
738
|
|
702
739
|
@api.route("/performance/npe/timeline", methods=["GET"])
|
@@ -708,16 +745,16 @@ def get_npe_timeline(instance: Instance):
|
|
708
745
|
filename = request.args.get("filename", default=None)
|
709
746
|
|
710
747
|
if not filename:
|
711
|
-
return
|
748
|
+
return Response(orjson.dumps({}), mimetype="application/json")
|
712
749
|
|
713
750
|
filename = Path(filename).name
|
714
751
|
|
715
752
|
try:
|
716
753
|
content = NPEQueries.get_npe_timeline(instance, filename=filename)
|
717
754
|
except FileNotFoundError:
|
718
|
-
return
|
755
|
+
return Response(orjson.dumps({}), mimetype="application/json")
|
719
756
|
|
720
|
-
return
|
757
|
+
return Response(orjson.dumps(content), mimetype="application/json")
|
721
758
|
|
722
759
|
|
723
760
|
@api.route("/performance/device-log/zone/<zone>", methods=["GET"])
|
@@ -727,7 +764,7 @@ def get_zone_statistics(zone, instance: Instance):
|
|
727
764
|
return Response(status=HTTPStatus.NOT_FOUND)
|
728
765
|
with DeviceLogProfilerQueries(instance) as csv:
|
729
766
|
result = csv.query_zone_statistics(zone_name=zone, as_dict=True)
|
730
|
-
return
|
767
|
+
return Response(orjson.dumps(result), mimetype="application/json")
|
731
768
|
|
732
769
|
|
733
770
|
@api.route("/devices", methods=["GET"])
|
@@ -735,7 +772,10 @@ def get_zone_statistics(zone, instance: Instance):
|
|
735
772
|
def get_devices(instance: Instance):
|
736
773
|
with DatabaseQueries(instance) as db:
|
737
774
|
devices = list(db.query_devices())
|
738
|
-
return
|
775
|
+
return Response(
|
776
|
+
orjson.dumps(serialize_devices(devices)),
|
777
|
+
mimetype="application/json",
|
778
|
+
)
|
739
779
|
|
740
780
|
|
741
781
|
@api.route("/local/upload/profiler", methods=["POST"])
|
@@ -915,7 +955,10 @@ def get_remote_folders_profiler():
|
|
915
955
|
if not rf.lastSynced:
|
916
956
|
logger.info(f"{directory_name} not yet synced")
|
917
957
|
|
918
|
-
return
|
958
|
+
return Response(
|
959
|
+
orjson.dumps([r.model_dump() for r in remote_folders]),
|
960
|
+
mimetype="application/json",
|
961
|
+
)
|
919
962
|
except RemoteConnectionException as e:
|
920
963
|
return Response(status=e.http_status, response=e.message)
|
921
964
|
|
@@ -948,7 +991,10 @@ def get_remote_folders_performance():
|
|
948
991
|
if not rf.lastSynced:
|
949
992
|
logger.info(f"{performance_name} not yet synced")
|
950
993
|
|
951
|
-
return
|
994
|
+
return Response(
|
995
|
+
orjson.dumps([r.model_dump() for r in remote_performance_folders]),
|
996
|
+
mimetype="application/json",
|
997
|
+
)
|
952
998
|
except RemoteConnectionException as e:
|
953
999
|
return Response(status=e.http_status, response=e.message)
|
954
1000
|
|
@@ -981,7 +1027,10 @@ def get_cluster_descriptor(instance: Instance):
|
|
981
1027
|
try:
|
982
1028
|
with open(local_path) as cluster_desc_file:
|
983
1029
|
yaml_data = yaml.safe_load(cluster_desc_file)
|
984
|
-
return
|
1030
|
+
return Response(
|
1031
|
+
orjson.dumps(yaml_data),
|
1032
|
+
mimetype="application/json",
|
1033
|
+
)
|
985
1034
|
except yaml.YAMLError as e:
|
986
1035
|
return jsonify({"error": f"Failed to parse YAML: {str(e)}"}), 400
|
987
1036
|
|
@@ -1011,7 +1060,7 @@ def test_remote_folder():
|
|
1011
1060
|
add_status(
|
1012
1061
|
ConnectionTestStates.FAILED.value, e.message, getattr(e, "detail", None)
|
1013
1062
|
)
|
1014
|
-
return [status.model_dump() for status in statuses], e.http_status
|
1063
|
+
return jsonify([status.model_dump() for status in statuses]), e.http_status
|
1015
1064
|
except RemoteConnectionException as e:
|
1016
1065
|
add_status(
|
1017
1066
|
ConnectionTestStates.FAILED.value, e.message, getattr(e, "detail", None)
|
@@ -1026,7 +1075,7 @@ def test_remote_folder():
|
|
1026
1075
|
add_status(
|
1027
1076
|
ConnectionTestStates.FAILED.value, e.message, getattr(e, "detail", None)
|
1028
1077
|
)
|
1029
|
-
return [status.model_dump() for status in statuses], e.http_status
|
1078
|
+
return jsonify([status.model_dump() for status in statuses]), e.http_status
|
1030
1079
|
except RemoteConnectionException as e:
|
1031
1080
|
add_status(
|
1032
1081
|
ConnectionTestStates.FAILED.value, e.message, getattr(e, "detail", None)
|
@@ -1041,7 +1090,7 @@ def test_remote_folder():
|
|
1041
1090
|
add_status(
|
1042
1091
|
ConnectionTestStates.FAILED.value, e.message, getattr(e, "detail", None)
|
1043
1092
|
)
|
1044
|
-
return [status.model_dump() for status in statuses], e.http_status
|
1093
|
+
return jsonify([status.model_dump() for status in statuses]), e.http_status
|
1045
1094
|
except RemoteConnectionException as e:
|
1046
1095
|
add_status(
|
1047
1096
|
ConnectionTestStates.FAILED.value, e.message, getattr(e, "detail", None)
|
@@ -1055,13 +1104,16 @@ def test_remote_folder():
|
|
1055
1104
|
add_status(
|
1056
1105
|
ConnectionTestStates.FAILED.value, e.message, getattr(e, "detail", None)
|
1057
1106
|
)
|
1058
|
-
return [status.model_dump() for status in statuses], e.http_status
|
1107
|
+
return jsonify([status.model_dump() for status in statuses]), e.http_status
|
1059
1108
|
except RemoteConnectionException as e:
|
1060
1109
|
add_status(
|
1061
1110
|
ConnectionTestStates.FAILED.value, e.message, getattr(e, "detail", None)
|
1062
1111
|
)
|
1063
1112
|
|
1064
|
-
return
|
1113
|
+
return Response(
|
1114
|
+
orjson.dumps([status.model_dump() for status in statuses]),
|
1115
|
+
mimetype="application/json",
|
1116
|
+
)
|
1065
1117
|
|
1066
1118
|
|
1067
1119
|
@api.route("/remote/read", methods=["POST"])
|
@@ -1126,7 +1178,10 @@ def sync_remote_folder():
|
|
1126
1178
|
|
1127
1179
|
remote_profiler_folder.lastSynced = int(time.time())
|
1128
1180
|
|
1129
|
-
return
|
1181
|
+
return Response(
|
1182
|
+
orjson.dumps(remote_profiler_folder.model_dump()),
|
1183
|
+
mimetype="application/json",
|
1184
|
+
)
|
1130
1185
|
|
1131
1186
|
except RemoteConnectionException as e:
|
1132
1187
|
return Response(status=e.http_status, response=e.message)
|
@@ -1154,7 +1209,10 @@ def detect_sqlite_path():
|
|
1154
1209
|
message="Unable to detect SQLite3 path. See logs",
|
1155
1210
|
)
|
1156
1211
|
finally:
|
1157
|
-
return
|
1212
|
+
return Response(
|
1213
|
+
orjson.dumps(status_message.model_dump()),
|
1214
|
+
mimetype="application/json",
|
1215
|
+
)
|
1158
1216
|
|
1159
1217
|
|
1160
1218
|
@api.route("/remote/use", methods=["POST"])
|
@@ -1204,7 +1262,10 @@ def health_check():
|
|
1204
1262
|
@with_instance
|
1205
1263
|
def get_instance(instance: Instance):
|
1206
1264
|
# Used to gate UI functions if no report is active
|
1207
|
-
return
|
1265
|
+
return Response(
|
1266
|
+
orjson.dumps(instance.model_dump()),
|
1267
|
+
mimetype="application/json",
|
1268
|
+
)
|
1208
1269
|
|
1209
1270
|
|
1210
1271
|
@api.route("/instance", methods=["PUT"])
|
@@ -1275,7 +1336,6 @@ def get_npe_data(instance: Instance):
|
|
1275
1336
|
logger.error(f"Invalid JSON in NPE file: {e}")
|
1276
1337
|
return Response(status=HTTPStatus.UNPROCESSABLE_ENTITY)
|
1277
1338
|
|
1278
|
-
# Use orjson for much faster JSON serialization of large files
|
1279
1339
|
return Response(orjson.dumps(npe_data), mimetype="application/json")
|
1280
1340
|
|
1281
1341
|
|
@@ -1323,8 +1383,8 @@ def notify_report_update():
|
|
1323
1383
|
|
1324
1384
|
logger.info(f"Report generated notification processed: {report_name}")
|
1325
1385
|
|
1326
|
-
return (
|
1327
|
-
|
1386
|
+
return Response(
|
1387
|
+
orjson.dumps(
|
1328
1388
|
{
|
1329
1389
|
"report_name": report_name,
|
1330
1390
|
"profiler_path": report_generated.profiler_path,
|
@@ -1333,9 +1393,13 @@ def notify_report_update():
|
|
1333
1393
|
"timestamp": report_generated.timestamp,
|
1334
1394
|
}
|
1335
1395
|
),
|
1336
|
-
|
1396
|
+
mimetype="application/json",
|
1337
1397
|
)
|
1338
1398
|
|
1339
1399
|
except Exception as e:
|
1340
1400
|
logger.error(f"Error processing report update notification: {str(e)}")
|
1341
|
-
return
|
1401
|
+
return Response(
|
1402
|
+
orjson.dumps({"error": "Internal server error"}),
|
1403
|
+
mimetype="application/json",
|
1404
|
+
status=HTTPStatus.INTERNAL_SERVER_ERROR,
|
1405
|
+
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ttnn_visualizer
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.51.0
|
4
4
|
Summary: TT-NN Visualizer
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
@@ -23,7 +23,7 @@ Requires-Dist: pydantic_core==2.27.1
|
|
23
23
|
Requires-Dist: pydantic==2.10.3
|
24
24
|
Requires-Dist: python-dotenv==1.0.1
|
25
25
|
Requires-Dist: PyYAML==6.0.2
|
26
|
-
Requires-Dist: tt-perf-report==1.
|
26
|
+
Requires-Dist: tt-perf-report==1.1.1
|
27
27
|
Requires-Dist: uvicorn==0.30.1
|
28
28
|
Requires-Dist: zstd==1.5.7.0
|
29
29
|
Provides-Extra: dev
|
@@ -1,6 +1,6 @@
|
|
1
1
|
ttnn_visualizer/__init__.py,sha256=FCQeTWnXsf-Wx-fay53-lQsm0y5-GcPMUmzhE5upDx0,93
|
2
2
|
ttnn_visualizer/app.py,sha256=5LEFKR-jn5HGqzYU1OWE4LCHzS4OAzwLKge5jSRDsBc,8663
|
3
|
-
ttnn_visualizer/csv_queries.py,sha256=
|
3
|
+
ttnn_visualizer/csv_queries.py,sha256=EJriw6uTbq-WOq63fS41FJJ-9MpL2N7vdnhU-sbGkRA,15317
|
4
4
|
ttnn_visualizer/decorators.py,sha256=8k73rTiGPSpPP5CHxzLxTQPxoQTAlhMQNcEbplQL3Ek,5805
|
5
5
|
ttnn_visualizer/enums.py,sha256=SEIqp1tlc_zw2vQ8nHH9YTaV0m3Cb8fjn_goqz5wurE,203
|
6
6
|
ttnn_visualizer/exceptions.py,sha256=XwTIykJpdvZV8nqrd9JZdHIYL0EBFBhTbE9H09VZluA,2273
|
@@ -17,16 +17,16 @@ ttnn_visualizer/sftp_operations.py,sha256=9HwbPJPSO1UUQ98d5zeWAkEwR0zFPryUakcI68
|
|
17
17
|
ttnn_visualizer/sockets.py,sha256=_Hdne33r4FrB2tg58Vw87FWLbgQ_ikICVp4o1Mkv2mo,4789
|
18
18
|
ttnn_visualizer/ssh_client.py,sha256=-GS2_1tdlUqVoLfRS02i3_o1fQaM39UQN-jtAnPBmzQ,13511
|
19
19
|
ttnn_visualizer/utils.py,sha256=_W990vRnup9zlWJ-g_Bggyo-wDjCYF49p0nPxWNgxrE,12934
|
20
|
-
ttnn_visualizer/views.py,sha256=
|
21
|
-
ttnn_visualizer/static/index.html,sha256=
|
22
|
-
ttnn_visualizer/static/assets/allPaths-
|
23
|
-
ttnn_visualizer/static/assets/allPathsLoader-
|
20
|
+
ttnn_visualizer/views.py,sha256=nd3hz4rL9Jx6LU30ZRra8Dj7uZtNUnPpWfeeIxnXBRI,47696
|
21
|
+
ttnn_visualizer/static/index.html,sha256=aC7iLFZJsfquwIVbCwgP0ZfWwI8DWrNGf-oVugRdznI,1135
|
22
|
+
ttnn_visualizer/static/assets/allPaths-DucASGPg.js,sha256=MSY7Ijk-sRG_buHlM3PnzK4fsJWRyg6QUtpqXesY6ww,255
|
23
|
+
ttnn_visualizer/static/assets/allPathsLoader-CaG_8uEi.js,sha256=htc9PXXXGUdiS-g227r2UN1k3W6h40HaPEEWR9wCv-4,477
|
24
24
|
ttnn_visualizer/static/assets/index-CnPrfHYh.js,sha256=xtrmUrKcMSwTBA7zqXJ6I_L70LzG9DkO-zbC3aWJS8g,289282
|
25
25
|
ttnn_visualizer/static/assets/index-Cnc1EkDo.js,sha256=m-gmIOT0AsJcaW0TVjRpOwSm52Dfp4ZDcrdnIS4qBHA,298140
|
26
|
-
ttnn_visualizer/static/assets/index-
|
27
|
-
ttnn_visualizer/static/assets/index-
|
26
|
+
ttnn_visualizer/static/assets/index-DFKuZosj.js,sha256=Eq2pMU_y-K_ida5-pYCuoNqYhy4x-lu-jVUu1012Jps,7893748
|
27
|
+
ttnn_visualizer/static/assets/index-UWmN5XEZ.css,sha256=-cO_1pADB48X8MthQUaUN-3_JW-9Tx7o1onKY7xoD70,623851
|
28
28
|
ttnn_visualizer/static/assets/site-BTBrvHC5.webmanifest,sha256=Uy_XmnGuYFVf-OZuma2NvgEPdrCrevb3HZvaxSIHoA0,456
|
29
|
-
ttnn_visualizer/static/assets/splitPathsBySizeLoader-
|
29
|
+
ttnn_visualizer/static/assets/splitPathsBySizeLoader-ld7TLnGh.js,sha256=a0G3RaWrQzfF5o-J1yLEB5fS_VGmAIwmsRoVJH-PjxY,281
|
30
30
|
ttnn_visualizer/static/favicon/android-chrome-192x192.png,sha256=BZWA09Zxaa3fXbaeS6nhWo2e-DUSjm9ElzNQ_xTB5XU,6220
|
31
31
|
ttnn_visualizer/static/favicon/android-chrome-512x512.png,sha256=HBiJSZyguB3o8fMJuqIGcpeBy_9JOdImme3wD02UYCw,62626
|
32
32
|
ttnn_visualizer/static/favicon/favicon-32x32.png,sha256=Zw201qUsczQv1UvoQvJf5smQ2ss10xaTeWxmQNYCGtY,480
|
@@ -35,10 +35,10 @@ ttnn_visualizer/static/sample-data/cluster-desc.yaml,sha256=LMxOmsRUXtVVU5ogzYkX
|
|
35
35
|
ttnn_visualizer/tests/__init__.py,sha256=FCQeTWnXsf-Wx-fay53-lQsm0y5-GcPMUmzhE5upDx0,93
|
36
36
|
ttnn_visualizer/tests/test_queries.py,sha256=HqaDXwudZpXiigJdHkdJP8oiUc-PtHASbpLnQQpbD7A,13792
|
37
37
|
ttnn_visualizer/tests/test_serializers.py,sha256=IJekAZRBpyOr_Ffp0dqSrnhFOU_ZZ8pHma_JO0j23TQ,18762
|
38
|
-
ttnn_visualizer-0.
|
39
|
-
ttnn_visualizer-0.
|
40
|
-
ttnn_visualizer-0.
|
41
|
-
ttnn_visualizer-0.
|
42
|
-
ttnn_visualizer-0.
|
43
|
-
ttnn_visualizer-0.
|
44
|
-
ttnn_visualizer-0.
|
38
|
+
ttnn_visualizer-0.51.0.dist-info/licenses/LICENSE,sha256=bapl7NysYmv8aYSVxr5qFDya0vCqppyjkyyNJYosBdc,20044
|
39
|
+
ttnn_visualizer-0.51.0.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
|
40
|
+
ttnn_visualizer-0.51.0.dist-info/METADATA,sha256=8pvhkGurcU_0bQqsoDlWQoa8XkiO87UItxx0UY-Zq3I,7780
|
41
|
+
ttnn_visualizer-0.51.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
|
42
|
+
ttnn_visualizer-0.51.0.dist-info/entry_points.txt,sha256=QpuUpkmQ_mEHJTMqOBdU0MH2Z4WF_9iFsGACeyyAO1E,61
|
43
|
+
ttnn_visualizer-0.51.0.dist-info/top_level.txt,sha256=M1EGkvDOuIfbhDbcUdz2-TSdmCtDoQ2Uyag9k5JLDSY,16
|
44
|
+
ttnn_visualizer-0.51.0.dist-info/RECORD,,
|
@@ -1,2 +0,0 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-G_CNx_x1.js","assets/index-CnPrfHYh.js","assets/index-Cnc1EkDo.js","assets/index-DVrPLQJ7.js","assets/index-UuXdrHif.css"])))=>i.map(i=>d[i]);
|
2
|
-
import{_ as e}from"./index-DVrPLQJ7.js";const s=async(t,a)=>{const{getIconPaths:o}=await e(async()=>{const{getIconPaths:r}=await import("./allPaths-G_CNx_x1.js");return{getIconPaths:r}},__vite__mapDeps([0,1,2,3,4]));return o(t,a)};export{s as allPathsLoader};
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|