ttnn-visualizer 0.33.2__py3-none-any.whl → 0.34.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 +11 -7
- ttnn_visualizer/requirements.txt +1 -0
- ttnn_visualizer/sessions.py +1 -1
- ttnn_visualizer/settings.py +2 -4
- ttnn_visualizer/static/assets/{allPaths-C1NlZ4tc.js → allPaths-D0uOIsnD.js} +1 -1
- ttnn_visualizer/static/assets/{allPathsLoader-B5Ah5bqG.js → allPathsLoader-B1iveKGB.js} +2 -2
- ttnn_visualizer/static/assets/{index-C2xbrqJV.js → index-CHS7htir.js} +209 -209
- ttnn_visualizer/static/assets/{index-Dhl0up3F.css → index-CJJgzCye.css} +2 -2
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-BHVWfA4U.js → splitPathsBySizeLoader-C1_1pXJQ.js} +1 -1
- ttnn_visualizer/static/index.html +2 -2
- ttnn_visualizer/views.py +40 -41
- {ttnn_visualizer-0.33.2.dist-info → ttnn_visualizer-0.34.0.dist-info}/METADATA +2 -1
- {ttnn_visualizer-0.33.2.dist-info → ttnn_visualizer-0.34.0.dist-info}/RECORD +18 -18
- {ttnn_visualizer-0.33.2.dist-info → ttnn_visualizer-0.34.0.dist-info}/LICENSE +0 -0
- {ttnn_visualizer-0.33.2.dist-info → ttnn_visualizer-0.34.0.dist-info}/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.33.2.dist-info → ttnn_visualizer-0.34.0.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.33.2.dist-info → ttnn_visualizer-0.34.0.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.33.2.dist-info → ttnn_visualizer-0.34.0.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
|
|
1
|
-
import{_ as o,a as _,b as i,p as c,I as u}from"./index-
|
1
|
+
import{_ as o,a as _,b as i,p as c,I as u}from"./index-CHS7htir.js";var p=function(n,s){return o(void 0,void 0,void 0,function(){var a,r;return _(this,function(e){switch(e.label){case 0:return a=c(n),s!==u.STANDARD?[3,2]:[4,i(()=>import("./index-BVMreIQm.js").then(t=>t.I),[])];case 1:return r=e.sent(),[3,4];case 2:return[4,i(()=>import("./index-Do7YB6C4.js").then(t=>t.I),[])];case 3:r=e.sent(),e.label=4;case 4:return[2,r[a]]}})})};export{p as splitPathsBySizeLoader};
|
@@ -27,8 +27,8 @@
|
|
27
27
|
name="theme-color"
|
28
28
|
content="#33333d"
|
29
29
|
/>
|
30
|
-
<script type="module" crossorigin src="/assets/index-
|
31
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
30
|
+
<script type="module" crossorigin src="/assets/index-CHS7htir.js"></script>
|
31
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CJJgzCye.css">
|
32
32
|
</head>
|
33
33
|
<body>
|
34
34
|
<div id="root"></div>
|
ttnn_visualizer/views.py
CHANGED
@@ -11,6 +11,7 @@ from pathlib import Path
|
|
11
11
|
from typing import List
|
12
12
|
import shutil
|
13
13
|
|
14
|
+
import zstd
|
14
15
|
from flask import Blueprint
|
15
16
|
from flask import request, current_app
|
16
17
|
|
@@ -424,7 +425,7 @@ def delete_profiler_report(profiler_name, session: Instance):
|
|
424
425
|
else:
|
425
426
|
path = data_directory / current_app.config["PROFILER_DIRECTORY_NAME"] / profiler_name
|
426
427
|
|
427
|
-
if session.active_report.profiler_name == profiler_name:
|
428
|
+
if session.active_report and session.active_report.profiler_name == profiler_name:
|
428
429
|
instance_id = request.args.get("instanceId")
|
429
430
|
update_instance(instance_id=instance_id,profiler_name="")
|
430
431
|
|
@@ -512,7 +513,7 @@ def delete_performance_report(performance_name, session: Instance):
|
|
512
513
|
else:
|
513
514
|
path = data_directory / current_app.config["PERFORMANCE_DIRECTORY_NAME"] / performance_name
|
514
515
|
|
515
|
-
if session.active_report.performance_name == performance_name:
|
516
|
+
if session.active_report and session.active_report.performance_name == performance_name:
|
516
517
|
instance_id = request.args.get("instanceId")
|
517
518
|
update_instance(instance_id=instance_id,performance_name="")
|
518
519
|
|
@@ -592,9 +593,10 @@ def get_devices(session: Instance):
|
|
592
593
|
@api.route("/local/upload/profiler", methods=["POST"])
|
593
594
|
def create_profiler_files():
|
594
595
|
files = request.files.getlist("files")
|
596
|
+
folder_name = request.form.get("folderName") # Optional folder name
|
595
597
|
profiler_directory = current_app.config["LOCAL_DATA_DIRECTORY"] / current_app.config["PROFILER_DIRECTORY_NAME"]
|
596
598
|
|
597
|
-
if not validate_files(files, {"db.sqlite", "config.json"}):
|
599
|
+
if not validate_files(files, {"db.sqlite", "config.json"}, folder_name=folder_name):
|
598
600
|
return StatusMessage(
|
599
601
|
status=ConnectionTestStates.FAILED,
|
600
602
|
message="Invalid project directory.",
|
@@ -603,10 +605,14 @@ def create_profiler_files():
|
|
603
605
|
if not profiler_directory.exists():
|
604
606
|
profiler_directory.mkdir(parents=True, exist_ok=True)
|
605
607
|
|
606
|
-
|
608
|
+
if folder_name:
|
609
|
+
profiler_name = folder_name
|
610
|
+
else:
|
611
|
+
profiler_name = extract_profiler_name(files)
|
612
|
+
|
607
613
|
logger.info(f"Writing report files to {profiler_directory}/{profiler_name}")
|
608
614
|
|
609
|
-
save_uploaded_files(files, profiler_directory,
|
615
|
+
save_uploaded_files(files, profiler_directory, folder_name)
|
610
616
|
|
611
617
|
instance_id = request.args.get("instanceId")
|
612
618
|
update_instance(instance_id=instance_id, profiler_name=profiler_name, clear_remote=True)
|
@@ -619,46 +625,41 @@ def create_profiler_files():
|
|
619
625
|
@api.route("/local/upload/performance", methods=["POST"])
|
620
626
|
def create_profile_files():
|
621
627
|
files = request.files.getlist("files")
|
628
|
+
folder_name = request.form.get("folderName") # Optional folder name
|
622
629
|
data_directory = Path(current_app.config["LOCAL_DATA_DIRECTORY"])
|
623
|
-
instance_id = request.args.get("instanceId")
|
624
630
|
|
625
631
|
if not validate_files(
|
626
632
|
files,
|
627
633
|
{"profile_log_device.csv", "tracy_profile_log_host.tracy"},
|
628
634
|
pattern="ops_perf_results",
|
635
|
+
folder_name=folder_name,
|
629
636
|
):
|
630
637
|
return StatusMessage(
|
631
638
|
status=ConnectionTestStates.FAILED,
|
632
639
|
message="Invalid project directory.",
|
633
640
|
).model_dump()
|
634
641
|
|
635
|
-
logger.info(f"Writing profile files to {data_directory} / {current_app.config['PERFORMANCE_DIRECTORY_NAME']}")
|
636
|
-
|
637
|
-
# Construct the base directory with profiler_name first
|
638
642
|
target_directory = data_directory / current_app.config["PERFORMANCE_DIRECTORY_NAME"]
|
639
|
-
target_directory.mkdir(parents=True, exist_ok=True)
|
640
643
|
|
641
|
-
if
|
642
|
-
|
643
|
-
|
644
|
+
if not target_directory.exists():
|
645
|
+
target_directory.mkdir(parents=True, exist_ok=True)
|
646
|
+
|
647
|
+
if folder_name:
|
648
|
+
performance_name = folder_name
|
644
649
|
else:
|
645
|
-
|
650
|
+
performance_name = extract_profiler_name(files)
|
646
651
|
|
647
|
-
|
648
|
-
for file in files:
|
649
|
-
original_path = Path(file.filename)
|
650
|
-
updated_path = target_directory / original_path
|
651
|
-
updated_path.parent.mkdir(parents=True, exist_ok=True)
|
652
|
-
file.filename = str(updated_path)
|
653
|
-
updated_files.append(file)
|
652
|
+
logger.info(f"Writing performance files to {target_directory}/{performance_name}")
|
654
653
|
|
655
654
|
save_uploaded_files(
|
656
|
-
|
657
|
-
|
655
|
+
files,
|
656
|
+
target_directory,
|
657
|
+
folder_name
|
658
658
|
)
|
659
659
|
|
660
|
+
instance_id = request.args.get("instanceId")
|
660
661
|
update_instance(
|
661
|
-
instance_id=instance_id, performance_name=
|
662
|
+
instance_id=instance_id, performance_name=performance_name, clear_remote=True
|
662
663
|
)
|
663
664
|
|
664
665
|
return StatusMessage(
|
@@ -672,17 +673,17 @@ def create_npe_files():
|
|
672
673
|
data_directory = current_app.config["LOCAL_DATA_DIRECTORY"]
|
673
674
|
|
674
675
|
for file in files:
|
675
|
-
if not file.filename.endswith(".json"):
|
676
|
+
if not file.filename.endswith(".json") and not file.filename.endswith('.npeviz.zst'):
|
676
677
|
return StatusMessage(
|
677
678
|
status=ConnectionTestStates.FAILED,
|
678
|
-
message="NPE requires a valid
|
679
|
+
message="NPE requires a valid .json or .npeviz.zst file",
|
679
680
|
).model_dump()
|
680
681
|
|
681
682
|
npe_name = extract_npe_name(files)
|
682
683
|
target_directory = data_directory / current_app.config["NPE_DIRECTORY_NAME"]
|
683
684
|
target_directory.mkdir(parents=True, exist_ok=True)
|
684
685
|
|
685
|
-
save_uploaded_files(files, target_directory
|
686
|
+
save_uploaded_files(files, target_directory)
|
686
687
|
|
687
688
|
instance_id = request.args.get("instanceId")
|
688
689
|
update_instance(instance_id=instance_id, npe_name=npe_name, clear_remote=True)
|
@@ -1019,22 +1020,20 @@ def get_npe_data(session: Instance):
|
|
1019
1020
|
logger.error("NPE path is not set in the session.")
|
1020
1021
|
return Response(status=HTTPStatus.NOT_FOUND)
|
1021
1022
|
|
1022
|
-
|
1023
|
+
compressed_path = Path(f"{session.npe_path}/{session.active_report.npe_name}.npeviz.zst")
|
1024
|
+
uncompressed_path = Path(f"{session.npe_path}/{session.active_report.npe_name}.json")
|
1023
1025
|
|
1024
|
-
if not
|
1025
|
-
logger.error(f"NPE file does not exist: {
|
1026
|
+
if not compressed_path.exists() and not uncompressed_path.exists():
|
1027
|
+
logger.error(f"NPE file does not exist: {compressed_path} / {uncompressed_path}")
|
1026
1028
|
return Response(status=HTTPStatus.NOT_FOUND)
|
1027
1029
|
|
1028
|
-
|
1029
|
-
|
1030
|
+
if compressed_path.exists():
|
1031
|
+
with open(compressed_path, "rb") as file:
|
1032
|
+
compressed_data = file.read()
|
1033
|
+
uncompressed_data = zstd.uncompress(compressed_data)
|
1034
|
+
npe_data = json.loads(uncompressed_data)
|
1035
|
+
else:
|
1036
|
+
with open(uncompressed_path, "r") as file:
|
1037
|
+
npe_data = json.load(file)
|
1030
1038
|
|
1031
1039
|
return jsonify(npe_data)
|
1032
|
-
|
1033
|
-
|
1034
|
-
@api.route("/config.js", methods=["GET"])
|
1035
|
-
def config_js():
|
1036
|
-
config = {
|
1037
|
-
"SERVER_MODE": current_app.config["SERVER_MODE"],
|
1038
|
-
}
|
1039
|
-
js = f"window.TTNN_VISUALIZER_CONFIG = {json.dumps(config)};"
|
1040
|
-
return Response(js, mimetype="application/javascript")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ttnn_visualizer
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.34.0
|
4
4
|
Summary: TT-NN Visualizer
|
5
5
|
Classifier: Programming Language :: Python :: 3
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
@@ -25,6 +25,7 @@ Requires-Dist: python-dotenv==1.0.1
|
|
25
25
|
Requires-Dist: sqlalchemy==2.0.34
|
26
26
|
Requires-Dist: PyYAML==6.0.2
|
27
27
|
Requires-Dist: tt-perf-report==1.0.6
|
28
|
+
Requires-Dist: zstd==1.5.7.0
|
28
29
|
|
29
30
|
|
30
31
|
<div align="center">
|
@@ -5,30 +5,30 @@ ttnn_visualizer/decorators.py,sha256=A0GIiPDLfKFONXrUbTRqVPZ-NqUMQQQc1lSChoDkLa8
|
|
5
5
|
ttnn_visualizer/enums.py,sha256=XTWZGvPFtKmIhPXGCbbzi6bxFgRpLrAZGrrR5YvGYjY,203
|
6
6
|
ttnn_visualizer/exceptions.py,sha256=tl3WvS_6mVCFixN_elFUeypV51trVuKVcM36D2svEbE,1055
|
7
7
|
ttnn_visualizer/extensions.py,sha256=jovwo_j9toJVuXDVq4iPpXJMRXPpzSliNpE1TOJMDHI,380
|
8
|
-
ttnn_visualizer/file_uploads.py,sha256=
|
8
|
+
ttnn_visualizer/file_uploads.py,sha256=j33om0DtRC4cR-XhRsqTn818ale7pxOAH8zymfBzzug,2577
|
9
9
|
ttnn_visualizer/models.py,sha256=aHm3dt_QqtsmAPjGfyTHOhwsvVyqwvgnWp_vEuWoWFs,7776
|
10
10
|
ttnn_visualizer/queries.py,sha256=q5WMHxfhDCSWn19zXIRqXHO3NpWVNShoE85cdlD3FDE,13649
|
11
11
|
ttnn_visualizer/remote_sqlite_setup.py,sha256=Zd7U7q_N92rD0P2qb1GIXuZjhV4LXqfq7Bhg0MTLS5k,3269
|
12
|
-
ttnn_visualizer/requirements.txt,sha256=
|
12
|
+
ttnn_visualizer/requirements.txt,sha256=9OKs0ZPl1QmeewA8I59cHCNNLlVfy6NuWk0DyNgnrEg,384
|
13
13
|
ttnn_visualizer/serializers.py,sha256=w7IKTetpZHmTPqurxhVSQk9VXakqaL4O1XQMezUgt3g,8030
|
14
|
-
ttnn_visualizer/sessions.py,sha256=
|
15
|
-
ttnn_visualizer/settings.py,sha256=
|
14
|
+
ttnn_visualizer/sessions.py,sha256=0LL-hYkySM58UdKAu4OsubyoGck4jUE_fvtMgNDiiPk,9841
|
15
|
+
ttnn_visualizer/settings.py,sha256=gWagCCxFx6iYyR6qpQlgOkr4eVOTGZPaGSXmERTY54c,4052
|
16
16
|
ttnn_visualizer/sftp_operations.py,sha256=0uCxIx8yNAMTa2TB_hH7Q39qFABXfnFjNKYE_eHZtJs,17819
|
17
17
|
ttnn_visualizer/sockets.py,sha256=o0oTG26LCjTJL8ajHR28ZBp9Z8RfWDehaS8Orns1HoQ,3624
|
18
18
|
ttnn_visualizer/ssh_client.py,sha256=KRLuIk6wxrZZQUQKfC8QWMhXGJQvfKKeyxLThgRX6ak,2679
|
19
19
|
ttnn_visualizer/utils.py,sha256=_cAeR2wZylyGXaGAI6Z15n110i_rJmtFNBtHfsm_JXc,6186
|
20
|
-
ttnn_visualizer/views.py,sha256=
|
20
|
+
ttnn_visualizer/views.py,sha256=FGKtc92M3f1u0gkwc2Mnd9JB-1dBBka5mg1QaIOZGik,36639
|
21
21
|
ttnn_visualizer/bin/docker-entrypoint-web,sha256=uuv6aubpMCfOcuvDBxwBDITE8PN39teuwyJ2zA5KWuw,413
|
22
22
|
ttnn_visualizer/bin/pip3-install,sha256=nbSRT4GfJQIQ9KTNO3j-6b5WM4lrx9XA4GBlAURRMws,502
|
23
|
-
ttnn_visualizer/static/index.html,sha256=
|
24
|
-
ttnn_visualizer/static/assets/allPaths-
|
25
|
-
ttnn_visualizer/static/assets/allPathsLoader-
|
23
|
+
ttnn_visualizer/static/index.html,sha256=kIWqVidYdgqtrX0C8MVvDAZHZnlmBMtN6-09Pj4hQ_I,923
|
24
|
+
ttnn_visualizer/static/assets/allPaths-D0uOIsnD.js,sha256=Ytbf1VsP3etmq7xYRQdWsLRtFWUEzwn6wtVm645WgiE,309
|
25
|
+
ttnn_visualizer/static/assets/allPathsLoader-B1iveKGB.js,sha256=iaSxl7RqGIh-2_SJAHHUwUNbYJmbNLft5wmgG7Iba_Y,550
|
26
26
|
ttnn_visualizer/static/assets/index-BVMreIQm.js,sha256=QJTBb4VVCMoLPYsWdru3heJX1VtMJQYJGx-tq8gZNTw,280965
|
27
|
-
ttnn_visualizer/static/assets/index-
|
28
|
-
ttnn_visualizer/static/assets/index-
|
27
|
+
ttnn_visualizer/static/assets/index-CHS7htir.js,sha256=T0bWxzavvoaXLaSB8IxuhnEtNB11AzMozmcxkSi2-6I,7007303
|
28
|
+
ttnn_visualizer/static/assets/index-CJJgzCye.css,sha256=u3A7sqHh2VR03ULg-zkD8OzFylCxoPON6CgqBBibgCA,621910
|
29
29
|
ttnn_visualizer/static/assets/index-Do7YB6C4.js,sha256=10jCIy7zph8mPB2htGfhXJBV7LO2FFrGhfz7xoQyh00,289378
|
30
30
|
ttnn_visualizer/static/assets/site-BTBrvHC5.webmanifest,sha256=Uy_XmnGuYFVf-OZuma2NvgEPdrCrevb3HZvaxSIHoA0,456
|
31
|
-
ttnn_visualizer/static/assets/splitPathsBySizeLoader-
|
31
|
+
ttnn_visualizer/static/assets/splitPathsBySizeLoader-C1_1pXJQ.js,sha256=L2mshZh7I4Ob2E1ccNELy_yuG4JLH38dRt-maE4kBYo,472
|
32
32
|
ttnn_visualizer/static/favicon/android-chrome-192x192.png,sha256=BZWA09Zxaa3fXbaeS6nhWo2e-DUSjm9ElzNQ_xTB5XU,6220
|
33
33
|
ttnn_visualizer/static/favicon/android-chrome-512x512.png,sha256=HBiJSZyguB3o8fMJuqIGcpeBy_9JOdImme3wD02UYCw,62626
|
34
34
|
ttnn_visualizer/static/favicon/favicon-32x32.png,sha256=Zw201qUsczQv1UvoQvJf5smQ2ss10xaTeWxmQNYCGtY,480
|
@@ -37,10 +37,10 @@ ttnn_visualizer/static/sample-data/cluster-desc.yaml,sha256=LMxOmsRUXtVVU5ogzYkX
|
|
37
37
|
ttnn_visualizer/tests/__init__.py,sha256=qn9AwfHTxYYK0Icz-q2Q41Xo9ET6oc6anZzgh02PhK4,94
|
38
38
|
ttnn_visualizer/tests/test_queries.py,sha256=h3Yhq_JyiUpbZUNSoTZvOpucJ9WU4nQMMHLeihxa694,16568
|
39
39
|
ttnn_visualizer/tests/test_serializers.py,sha256=966AJkXLAwzsceSQ9QR-Sy7VrEbE71AtfMF3y9ZIIWc,18490
|
40
|
-
ttnn_visualizer-0.
|
41
|
-
ttnn_visualizer-0.
|
42
|
-
ttnn_visualizer-0.
|
43
|
-
ttnn_visualizer-0.
|
44
|
-
ttnn_visualizer-0.
|
45
|
-
ttnn_visualizer-0.
|
46
|
-
ttnn_visualizer-0.
|
40
|
+
ttnn_visualizer-0.34.0.dist-info/LICENSE,sha256=7_uV4foXIbLyroI1M6NdIySajtLuPwayZr1UN2ItErI,11353
|
41
|
+
ttnn_visualizer-0.34.0.dist-info/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
|
42
|
+
ttnn_visualizer-0.34.0.dist-info/METADATA,sha256=lt4HboMSq7xd8KvRTmqCxRmSwD-8gLA-afjWnPP6f4c,7361
|
43
|
+
ttnn_visualizer-0.34.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
44
|
+
ttnn_visualizer-0.34.0.dist-info/entry_points.txt,sha256=QpuUpkmQ_mEHJTMqOBdU0MH2Z4WF_9iFsGACeyyAO1E,61
|
45
|
+
ttnn_visualizer-0.34.0.dist-info/top_level.txt,sha256=M1EGkvDOuIfbhDbcUdz2-TSdmCtDoQ2Uyag9k5JLDSY,16
|
46
|
+
ttnn_visualizer-0.34.0.dist-info/RECORD,,
|
File without changes
|
{ttnn_visualizer-0.33.2.dist-info → ttnn_visualizer-0.34.0.dist-info}/LICENSE_understanding.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|