ttnn-visualizer 0.28.0__py3-none-any.whl → 0.29.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/sessions.py +8 -8
- ttnn_visualizer/static/assets/{allPaths-DGdUWICT.js → allPaths-CJHbl9k5.js} +1 -1
- ttnn_visualizer/static/assets/{allPathsLoader-BSYo-ZTH.js → allPathsLoader-BMROdgRm.js} +2 -2
- ttnn_visualizer/static/assets/{index-DWVfq2z5.css → index-CINMcROY.css} +2 -2
- ttnn_visualizer/static/assets/{index-CYZZ70nJ.js → index-DRqEueCH.js} +170 -170
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-hHE0y-FQ.js → splitPathsBySizeLoader-Bff1kHt3.js} +1 -1
- ttnn_visualizer/static/index.html +2 -2
- ttnn_visualizer/utils.py +15 -0
- ttnn_visualizer/views.py +29 -16
- {ttnn_visualizer-0.28.0.dist-info → ttnn_visualizer-0.29.0.dist-info}/METADATA +1 -1
- {ttnn_visualizer-0.28.0.dist-info → ttnn_visualizer-0.29.0.dist-info}/RECORD +16 -16
- {ttnn_visualizer-0.28.0.dist-info → ttnn_visualizer-0.29.0.dist-info}/LICENSE +0 -0
- {ttnn_visualizer-0.28.0.dist-info → ttnn_visualizer-0.29.0.dist-info}/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.28.0.dist-info → ttnn_visualizer-0.29.0.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.28.0.dist-info → ttnn_visualizer-0.29.0.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.28.0.dist-info → ttnn_visualizer-0.29.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-DRqEueCH.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-DRqEueCH.js"></script>
|
31
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CINMcROY.css">
|
32
32
|
</head>
|
33
33
|
<body>
|
34
34
|
<div id="root"></div>
|
ttnn_visualizer/utils.py
CHANGED
@@ -13,6 +13,7 @@ import re
|
|
13
13
|
from timeit import default_timer
|
14
14
|
from typing import Callable, Optional, Dict, Any
|
15
15
|
|
16
|
+
|
16
17
|
logger = logging.getLogger(__name__)
|
17
18
|
|
18
19
|
LAST_SYNCED_FILE_NAME = ".last-synced"
|
@@ -113,6 +114,19 @@ def get_npe_path(npe_name, current_app):
|
|
113
114
|
|
114
115
|
return str(npe_path)
|
115
116
|
|
117
|
+
|
118
|
+
def get_cluster_descriptor_path(instance):
|
119
|
+
if not instance.report_path:
|
120
|
+
return None
|
121
|
+
|
122
|
+
cluster_descriptor_path = Path(instance.report_path).parent / Path("cluster_descriptor.yaml")
|
123
|
+
|
124
|
+
if not cluster_descriptor_path.exists():
|
125
|
+
return None
|
126
|
+
|
127
|
+
return str(cluster_descriptor_path)
|
128
|
+
|
129
|
+
|
116
130
|
def read_last_synced_file(directory: str) -> Optional[int]:
|
117
131
|
"""Reads the '.last-synced' file in the specified directory and returns the timestamp as an integer, or None if not found."""
|
118
132
|
last_synced_path = Path(directory) / LAST_SYNCED_FILE_NAME
|
@@ -189,3 +203,4 @@ def read_version_from_package_json() -> str:
|
|
189
203
|
raise FileNotFoundError(f"The file {file_path} was not found.")
|
190
204
|
except KeyError:
|
191
205
|
raise KeyError("The 'version' key was not found in the package.json file.")
|
206
|
+
|
ttnn_visualizer/views.py
CHANGED
@@ -56,6 +56,7 @@ from ttnn_visualizer.sftp_operations import (
|
|
56
56
|
)
|
57
57
|
from ttnn_visualizer.ssh_client import get_client
|
58
58
|
from ttnn_visualizer.utils import (
|
59
|
+
get_cluster_descriptor_path,
|
59
60
|
read_last_synced_file,
|
60
61
|
timer,
|
61
62
|
)
|
@@ -614,27 +615,39 @@ from flask import Response, jsonify
|
|
614
615
|
import yaml
|
615
616
|
|
616
617
|
|
617
|
-
@api.route("/
|
618
|
+
@api.route("/cluster-descriptor", methods=["GET"])
|
618
619
|
@with_session
|
619
|
-
def
|
620
|
-
if
|
621
|
-
|
620
|
+
def get_cluster_descriptor(session: Instance):
|
621
|
+
if session.remote_connection:
|
622
|
+
try:
|
623
|
+
cluster_desc_file = get_cluster_desc(session.remote_connection)
|
624
|
+
if not cluster_desc_file:
|
625
|
+
return jsonify({"error": "cluster_descriptor.yaml not found"}), 404
|
626
|
+
yaml_data = yaml.safe_load(cluster_desc_file.decode("utf-8"))
|
627
|
+
return jsonify(yaml_data), 200
|
622
628
|
|
623
|
-
|
624
|
-
|
625
|
-
if not cluster_desc_file:
|
626
|
-
return jsonify({"error": "cluster_descriptor.yaml not found"}), 404
|
627
|
-
yaml_data = yaml.safe_load(cluster_desc_file.decode("utf-8"))
|
628
|
-
return jsonify(yaml_data), 200
|
629
|
+
except yaml.YAMLError as e:
|
630
|
+
return jsonify({"error": f"Failed to parse YAML: {str(e)}"}), 400
|
629
631
|
|
630
|
-
|
631
|
-
|
632
|
+
except RemoteConnectionException as e:
|
633
|
+
return jsonify({"error": e.message}), e.http_status
|
632
634
|
|
633
|
-
|
634
|
-
|
635
|
+
except Exception as e:
|
636
|
+
return jsonify({"error": f"An unexpected error occurred: {str(e)}"}), 500
|
637
|
+
else:
|
638
|
+
local_path = get_cluster_descriptor_path(session)
|
639
|
+
|
640
|
+
if not local_path:
|
641
|
+
return jsonify({"error": "cluster_descriptor.yaml not found"}), 404
|
642
|
+
|
643
|
+
try:
|
644
|
+
with open(local_path) as cluster_desc_file:
|
645
|
+
yaml_data = yaml.safe_load(cluster_desc_file)
|
646
|
+
return jsonify(yaml_data), 200
|
647
|
+
except yaml.YAMLError as e:
|
648
|
+
return jsonify({"error": f"Failed to parse YAML: {str(e)}"}), 400
|
635
649
|
|
636
|
-
|
637
|
-
return jsonify({"error": f"An unexpected error occurred: {str(e)}"}), 500
|
650
|
+
return jsonify({"error": "Cluster descriptor not found"}), 404
|
638
651
|
|
639
652
|
|
640
653
|
@api.route("/remote/test", methods=["POST"])
|
@@ -11,24 +11,24 @@ ttnn_visualizer/queries.py,sha256=oifyj_ROmQwUkQCFO1SteuphaoZbROcnizG1ix-1r3U,13
|
|
11
11
|
ttnn_visualizer/remote_sqlite_setup.py,sha256=Zd7U7q_N92rD0P2qb1GIXuZjhV4LXqfq7Bhg0MTLS5k,3269
|
12
12
|
ttnn_visualizer/requirements.txt,sha256=LiycuPs-Oh8PZ1qM6v1KlUPQG86nQyQFz_x7dU8DSpA,370
|
13
13
|
ttnn_visualizer/serializers.py,sha256=w7IKTetpZHmTPqurxhVSQk9VXakqaL4O1XQMezUgt3g,8030
|
14
|
-
ttnn_visualizer/sessions.py,sha256=
|
14
|
+
ttnn_visualizer/sessions.py,sha256=MSVsc0lX2bZGmoBG92YDjRfEjApBtGi5pLrpoaCzvCs,9044
|
15
15
|
ttnn_visualizer/settings.py,sha256=oKjsPgk9PcPM5sBGgtPW30nOcW72Tti-JVS05rHS3ck,3890
|
16
16
|
ttnn_visualizer/sftp_operations.py,sha256=RrzCGo__2sQ2g4r90qlyFBEq4v6ooX2ntJ7VDKuynC0,17659
|
17
17
|
ttnn_visualizer/sockets.py,sha256=o0oTG26LCjTJL8ajHR28ZBp9Z8RfWDehaS8Orns1HoQ,3624
|
18
18
|
ttnn_visualizer/ssh_client.py,sha256=KRLuIk6wxrZZQUQKfC8QWMhXGJQvfKKeyxLThgRX6ak,2679
|
19
|
-
ttnn_visualizer/utils.py,sha256=
|
20
|
-
ttnn_visualizer/views.py,sha256=
|
19
|
+
ttnn_visualizer/utils.py,sha256=yhH5qinhe1ZJyy-x-PCF6BeEJ4DK9QCN_Rr1Fq9RVGM,6679
|
20
|
+
ttnn_visualizer/views.py,sha256=mYVkbD_QS_npOFV_c0xZgruVyg_cJmxEIBmxN7E7aHo,29138
|
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=ZBx2Rh5RM2D0cJ2_Qw3HuBr2yhgdYY5XUemHsYB5c5s,923
|
24
|
+
ttnn_visualizer/static/assets/allPaths-CJHbl9k5.js,sha256=Un-yJiNIbhyrkexlqvgcU8tTjUir_xjhbEb8qz5eFcY,309
|
25
|
+
ttnn_visualizer/static/assets/allPathsLoader-BMROdgRm.js,sha256=WlezdmPXlC4jZOz66U9Lume5dl8LyYA16Frf7Jdm3TU,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-CINMcROY.css,sha256=eE7di5HrnOu4WQZLANg-Aas4AwEBAwoPVZqGtqnzRTU,616215
|
28
|
+
ttnn_visualizer/static/assets/index-DRqEueCH.js,sha256=KYbE36cuEZIKhT1LpDPV3Qh0Z7bzWAT0HUdBenI_ZPk,6991615
|
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-Bff1kHt3.js,sha256=XJClwaBhSFMRz1qSXKntg802sANj-ud-PgpV7m7jyA0,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=OoINMZezyJkpiQuM1Owp4DlMoJGTl6OgsUbPa2Rxqc0,16546
|
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.29.0.dist-info/LICENSE,sha256=7_uV4foXIbLyroI1M6NdIySajtLuPwayZr1UN2ItErI,11353
|
41
|
+
ttnn_visualizer-0.29.0.dist-info/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
|
42
|
+
ttnn_visualizer-0.29.0.dist-info/METADATA,sha256=ILr33UvunhRqXHtqj9XFD0Qi6zqAm3GEMlHttvZYNsQ,7317
|
43
|
+
ttnn_visualizer-0.29.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
44
|
+
ttnn_visualizer-0.29.0.dist-info/entry_points.txt,sha256=QpuUpkmQ_mEHJTMqOBdU0MH2Z4WF_9iFsGACeyyAO1E,61
|
45
|
+
ttnn_visualizer-0.29.0.dist-info/top_level.txt,sha256=M1EGkvDOuIfbhDbcUdz2-TSdmCtDoQ2Uyag9k5JLDSY,16
|
46
|
+
ttnn_visualizer-0.29.0.dist-info/RECORD,,
|
File without changes
|
{ttnn_visualizer-0.28.0.dist-info → ttnn_visualizer-0.29.0.dist-info}/LICENSE_understanding.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|