ttnn-visualizer 0.67.0__py3-none-any.whl → 0.68.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-BO1FGYnE.js";const n=async(o,_)=>{const i=r(o);let t;return _===s.STANDARD?t=await a(()=>import("./index-voJy5fZe.js").then(e=>e.I),[]):t=await a(()=>import("./index-BZITDwoa.js").then(e=>e.I),[]),t[i]};export{n as splitPathsBySizeLoader};
1
+ import{p as r,I as s,_ as a}from"./index-ryWOUYjC.js";const n=async(o,_)=>{const i=r(o);let t;return _===s.STANDARD?t=await a(()=>import("./index-voJy5fZe.js").then(e=>e.I),[]):t=await a(()=>import("./index-BZITDwoa.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-BO1FGYnE.js"></script>
38
- <link rel="stylesheet" crossorigin href="/static/assets/index-bdndbd_j.css">
37
+ <script type="module" crossorigin src="/static/assets/index-ryWOUYjC.js"></script>
38
+ <link rel="stylesheet" crossorigin href="/static/assets/index-DS75jGv-.css">
39
39
  </head>
40
40
  <body>
41
41
 
ttnn_visualizer/utils.py CHANGED
@@ -423,6 +423,20 @@ def get_cluster_descriptor_path(instance):
423
423
  return str(cluster_descriptor_path)
424
424
 
425
425
 
426
+ def get_mesh_descriptor_paths(instance):
427
+ if not instance.profiler_path:
428
+ return []
429
+
430
+ parent = Path(instance.profiler_path).parent
431
+ pattern = re.compile(r"physical_chip_mesh_coordinate_mapping_[1-8]_of_[1-8]\.yaml")
432
+
433
+ return sorted(
434
+ str(path)
435
+ for path in parent.iterdir()
436
+ if path.is_file() and pattern.fullmatch(path.name)
437
+ )
438
+
439
+
426
440
  def read_last_synced_file(directory: str) -> Optional[int]:
427
441
  """Reads the '.last-synced' file in the specified directory and returns the timestamp as an integer, or None if not found."""
428
442
  last_synced_path = Path(directory) / LAST_SYNCED_FILE_NAME
ttnn_visualizer/views.py CHANGED
@@ -40,6 +40,7 @@ from ttnn_visualizer.models import (
40
40
  Instance,
41
41
  RemoteConnection,
42
42
  RemoteReportFolder,
43
+ ReportLocation,
43
44
  StatusMessage,
44
45
  )
45
46
  from ttnn_visualizer.queries import DatabaseQueries
@@ -67,6 +68,7 @@ from ttnn_visualizer.ssh_client import SSHClient
67
68
  from ttnn_visualizer.utils import (
68
69
  create_path_resolver,
69
70
  get_cluster_descriptor_path,
71
+ get_mesh_descriptor_paths,
70
72
  read_last_synced_file,
71
73
  str_to_bool,
72
74
  timer,
@@ -922,6 +924,7 @@ def create_profiler_files():
922
924
  update_instance(
923
925
  instance_id=instance_id,
924
926
  profiler_name=parent_folder_name,
927
+ profiler_location=ReportLocation.LOCAL.value,
925
928
  clear_remote=True,
926
929
  profiler_path=str(profiler_path) if profiler_path else None,
927
930
  )
@@ -991,6 +994,7 @@ def create_performance_files():
991
994
  update_instance(
992
995
  instance_id=instance_id,
993
996
  performance_name=parent_folder_name,
997
+ performance_location=ReportLocation.LOCAL.value,
994
998
  clear_remote=True,
995
999
  performance_path=performance_path,
996
1000
  )
@@ -1033,7 +1037,11 @@ def create_npe_files():
1033
1037
  instance_id = request.args.get("instanceId")
1034
1038
  npe_path = str(paths[0])
1035
1039
  update_instance(
1036
- instance_id=instance_id, npe_name=npe_name, clear_remote=True, npe_path=npe_path
1040
+ instance_id=instance_id,
1041
+ npe_name=npe_name,
1042
+ npe_location=ReportLocation.LOCAL.value,
1043
+ clear_remote=True,
1044
+ npe_path=npe_path,
1037
1045
  )
1038
1046
 
1039
1047
  session["npe_paths"] = session.get("npe_paths", []) + [str(npe_path)]
@@ -1044,10 +1052,18 @@ def create_npe_files():
1044
1052
 
1045
1053
  @api.route("/remote/profiler", methods=["POST"])
1046
1054
  def get_remote_folders_profiler():
1047
- connection = RemoteConnection.model_validate(request.json, strict=False)
1055
+ connection_data = request.get_json()
1056
+
1057
+ if not connection_data:
1058
+ return Response(
1059
+ status=HTTPStatus.BAD_REQUEST, response="Missing connection data"
1060
+ )
1061
+
1062
+ connection = RemoteConnection.model_validate(connection_data, strict=False)
1063
+
1048
1064
  try:
1049
1065
  remote_folders: List[RemoteReportFolder] = get_remote_profiler_folders(
1050
- RemoteConnection.model_validate(connection, strict=False)
1066
+ connection
1051
1067
  )
1052
1068
 
1053
1069
  for rf in remote_folders:
@@ -1074,16 +1090,18 @@ def get_remote_folders_profiler():
1074
1090
 
1075
1091
  @api.route("/remote/performance", methods=["POST"])
1076
1092
  def get_remote_folders_performance():
1077
- request_body = request.get_json()
1078
- connection = RemoteConnection.model_validate(
1079
- request_body.get("connection"), strict=False
1080
- )
1093
+ connection_data = request.get_json()
1094
+
1095
+ if not connection_data:
1096
+ return Response(
1097
+ status=HTTPStatus.BAD_REQUEST, response="Missing connection data"
1098
+ )
1099
+
1100
+ connection = RemoteConnection.model_validate(connection_data, strict=False)
1081
1101
 
1082
1102
  try:
1083
1103
  remote_performance_folders: List[RemoteReportFolder] = (
1084
- get_remote_performance_folders(
1085
- RemoteConnection.model_validate(connection, strict=False)
1086
- )
1104
+ get_remote_performance_folders(connection)
1087
1105
  )
1088
1106
 
1089
1107
  for rf in remote_performance_folders:
@@ -1143,9 +1161,43 @@ def get_cluster_descriptor(instance: Instance):
1143
1161
  return jsonify({"error": "Cluster descriptor not found"}), 404
1144
1162
 
1145
1163
 
1164
+ @api.route("/mesh-descriptor", methods=["GET"])
1165
+ @with_instance
1166
+ def get_mesh_descriptor(instance: Instance):
1167
+ if instance.remote_connection:
1168
+ return (
1169
+ jsonify({"error": "Remote mesh descriptor is not yet supported"}),
1170
+ HTTPStatus.NOT_IMPLEMENTED,
1171
+ )
1172
+ else:
1173
+ paths = get_mesh_descriptor_paths(instance)
1174
+ if not paths:
1175
+ return jsonify({"error": "mesh.yaml not found"}), 404
1176
+
1177
+ local_path = paths[0]
1178
+
1179
+ if not local_path:
1180
+ return jsonify({"error": "mesh.yaml not found"}), 404
1181
+
1182
+ try:
1183
+ with open(local_path) as mesh_descriptor_path:
1184
+ yaml_data = yaml.safe_load(mesh_descriptor_path)
1185
+ return jsonify(yaml_data) # yaml_data is not compatible with orjson
1186
+ except yaml.YAMLError as e:
1187
+ return jsonify({"error": f"Failed to parse YAML: {str(e)}"}), 400
1188
+
1189
+ return jsonify({"error": "Mesh descriptor not found"}), 404
1190
+
1191
+
1146
1192
  @api.route("/remote/test", methods=["POST"])
1147
1193
  def test_remote_folder():
1148
1194
  connection_data = request.json
1195
+
1196
+ if not connection_data:
1197
+ return Response(
1198
+ status=HTTPStatus.BAD_REQUEST, response="Missing connection data"
1199
+ )
1200
+
1149
1201
  connection = RemoteConnection.model_validate(connection_data)
1150
1202
  statuses = []
1151
1203
 
@@ -1304,14 +1356,16 @@ def sync_remote_folder():
1304
1356
  @api.route("/remote/use", methods=["POST"])
1305
1357
  def use_remote_folder():
1306
1358
  data = request.get_json(force=True)
1307
- connection = data.get("connection", None)
1308
- profiler = data.get("profiler", None)
1309
- performance = data.get("performance", None)
1359
+ connection_data = data.get("connection")
1360
+ profiler = data.get("profiler")
1361
+ performance = data.get("performance")
1310
1362
 
1311
- if not connection or not (profiler or performance):
1312
- return Response(status=HTTPStatus.BAD_REQUEST)
1363
+ if not connection_data or not (profiler or performance):
1364
+ return Response(
1365
+ status=HTTPStatus.BAD_REQUEST, response="Missing connection or report data"
1366
+ )
1313
1367
 
1314
- connection = RemoteConnection.model_validate(connection, strict=False)
1368
+ connection = RemoteConnection.model_validate(connection_data, strict=False)
1315
1369
 
1316
1370
  kwargs = {
1317
1371
  "instance_id": request.args.get("instanceId"),
@@ -1325,6 +1379,7 @@ def use_remote_folder():
1325
1379
  )
1326
1380
  kwargs["remote_profiler_folder"] = remote_profiler_folder
1327
1381
  kwargs["profiler_name"] = remote_profiler_folder.remotePath.split("/")[-1]
1382
+ kwargs["profiler_location"] = ReportLocation.REMOTE.value
1328
1383
 
1329
1384
  if performance:
1330
1385
  remote_performance_folder = RemoteReportFolder.model_validate(
@@ -1333,6 +1388,7 @@ def use_remote_folder():
1333
1388
  )
1334
1389
  kwargs["remote_performance_folder"] = remote_performance_folder
1335
1390
  kwargs["performance_name"] = remote_performance_folder.reportName
1391
+ kwargs["performance_location"] = ReportLocation.REMOTE.value
1336
1392
 
1337
1393
  update_instance(**kwargs)
1338
1394
 
@@ -1365,8 +1421,14 @@ def update_current_instance():
1365
1421
  update_instance(
1366
1422
  instance_id=update_data.get("instance_id"),
1367
1423
  profiler_name=update_data["active_report"].get("profiler_name"),
1424
+ profiler_location=update_data["active_report"].get("profiler_location"),
1368
1425
  performance_name=update_data["active_report"].get("performance_name"),
1426
+ performance_location=update_data["active_report"].get(
1427
+ "performance_location"
1428
+ ),
1369
1429
  npe_name=update_data["active_report"].get("npe_name"),
1430
+ # NPE is always local right now
1431
+ npe_location=ReportLocation.LOCAL.value,
1370
1432
  # Doesn't handle remote at the moment
1371
1433
  remote_connection=None,
1372
1434
  remote_profiler_folder=None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ttnn_visualizer
3
- Version: 0.67.0
3
+ Version: 0.68.0
4
4
  Summary: TT-NN Visualizer
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -1,31 +1,31 @@
1
1
  ttnn_visualizer/__init__.py,sha256=FCQeTWnXsf-Wx-fay53-lQsm0y5-GcPMUmzhE5upDx0,93
2
- ttnn_visualizer/app.py,sha256=l_pK94T-5QdMi1bYc6sSOqcj4ekymJQZstRzq7K67bc,13190
3
- ttnn_visualizer/csv_queries.py,sha256=9wlkYNnwA5eKgCp4hA5Q-RLT_ZYaBl2oZWAdIzXtSAc,20422
4
- ttnn_visualizer/decorators.py,sha256=6xBg2J6kJrwc01fcHepLbFJoUhcEKBL410gfaR8YZuM,5383
2
+ ttnn_visualizer/app.py,sha256=WORfbWaxqLZesS08fb6DrzSZZFWj8oKZ5pRgQt4cBno,13286
3
+ ttnn_visualizer/csv_queries.py,sha256=KlXhmrUjijMu_x3h-5A1bMF9RhWdSPzdq84wet2-aJ4,20474
4
+ ttnn_visualizer/decorators.py,sha256=YY_5zQdD9VOuBC5iP1Z9CEMjYz3ofD1Lc3ZrBvzQx8U,5779
5
5
  ttnn_visualizer/enums.py,sha256=SEIqp1tlc_zw2vQ8nHH9YTaV0m3Cb8fjn_goqz5wurE,203
6
6
  ttnn_visualizer/exceptions.py,sha256=KVZzb7YaWbq51DNMKPBcJHwG74RMYj_29WTSYOlXXeU,2096
7
7
  ttnn_visualizer/extensions.py,sha256=6OIRJ8-_ccfjOaXSruRXiS29jEbxp4Pyk-0JlD8IHBQ,379
8
8
  ttnn_visualizer/file_uploads.py,sha256=HFcC6TBt5I0oBkiKgM2Qw1W7hpixE8TOTACS5N-rmGE,5013
9
- ttnn_visualizer/instances.py,sha256=XctQgQXdlwtuXWFXFletRoX1m1lGUZdiW3TwIIjY0uw,11564
10
- ttnn_visualizer/models.py,sha256=IG5wPK5LDbh9866eBKBlOFFvWoL0BuVMu1oqwh2w0YE,8407
9
+ ttnn_visualizer/instances.py,sha256=yoWGV0I3xNm8nFZrQHJMq7k6C_moFiic9ZgMkgfxsHU,13406
10
+ ttnn_visualizer/models.py,sha256=b0woRZ3ZV4km_dl7sjW1pYYGclXGJmqKi4WS1WY18G8,8647
11
11
  ttnn_visualizer/pytest_plugin.py,sha256=bEG0cbqH0HUuZT5Ox9tFoexFNTyimBBPpI_jp75b54c,2629
12
12
  ttnn_visualizer/queries.py,sha256=GQTifegt3KHhTer5n8oFpI23OzIFj8Xl7vPDGqIWRKY,12601
13
13
  ttnn_visualizer/serializers.py,sha256=mKxcDu9g4gAxHB6wP_1l5VJvIBmnYDIJTikiaMYXupg,9374
14
14
  ttnn_visualizer/settings.py,sha256=FvfSqzuXEOLDH3i_mXZODHjYQEJBE6V_mPQcqz6P6zA,5168
15
- ttnn_visualizer/sftp_operations.py,sha256=9HwbPJPSO1UUQ98d5zeWAkEwR0zFPryUakcI68GqkVw,30181
15
+ ttnn_visualizer/sftp_operations.py,sha256=oSBiQ_YK0AAZTT_hFgtIFKBf181u525dlMozH7mv3nQ,31640
16
16
  ttnn_visualizer/sockets.py,sha256=_Hdne33r4FrB2tg58Vw87FWLbgQ_ikICVp4o1Mkv2mo,4789
17
17
  ttnn_visualizer/ssh_client.py,sha256=x-BUUnsaKGReuOrSpHdcIaoH6RdGiQQYWx2_pOkGzJ0,13410
18
- ttnn_visualizer/utils.py,sha256=rYQuPXdIYj5O2_U9_rqoPkU7croyXcAomdr6sOYHmgA,18291
19
- ttnn_visualizer/views.py,sha256=tN_vpTONumy4IMMujeolVw5zj2TYuFGGcydPCUYNC6Q,50443
20
- ttnn_visualizer/static/index.html,sha256=aJIx6QjQ2xaCD9tXzVGwfYNlagu0a-aXWKHuriEB_qg,1135
21
- ttnn_visualizer/static/assets/allPaths-DiBJY9fQ.js,sha256=vUkjW_PajgU2G3z-CRADi5WS6wVHIjZrtNzd0s08FrY,255
22
- ttnn_visualizer/static/assets/allPathsLoader-B_zDRgGR.js,sha256=R01JmMpFwXfYzdVPGHXh-ilG-mEC3mgnXmkBi8RrgAc,477
23
- ttnn_visualizer/static/assets/index-BO1FGYnE.js,sha256=Q8xOkoxIlFWvOH_LemOIBEnJE4nLxLX6sQoxfL91WiM,7964619
18
+ ttnn_visualizer/utils.py,sha256=4hiz-Oa-KH7uRt-I-09-3i1jPVDA5Vid9mNQbxpUYjY,18665
19
+ ttnn_visualizer/views.py,sha256=4ckwBnf-awcQpV-DUmwXwY68sM3yZkx0rg6C2LSDxrk,52474
20
+ ttnn_visualizer/static/index.html,sha256=w5q5sikGIgjgu1Y1ccbXaXRdqufioknIxq5lL4Z1t9A,1135
21
+ ttnn_visualizer/static/assets/allPaths-BZLVCrxa.js,sha256=8y2FQMMwPaRxSd_bsQu63ggaavC97Lt32ofGNWs5W6M,255
22
+ ttnn_visualizer/static/assets/allPathsLoader-7-MAALae.js,sha256=O1u0yhyx8g7U0NT86-2sz3oqdCvrUAsc8PryMGFmgXA,477
24
23
  ttnn_visualizer/static/assets/index-BZITDwoa.js,sha256=ax1pY3gjtvqTUiQSBZ6ZN9M6P9VJ4-eXzZ-C9F46Ozg,303183
25
- ttnn_visualizer/static/assets/index-bdndbd_j.css,sha256=BR534z20phIub9mO66_ROX5Zl61fsgfTUNjo1T1pm6s,630608
24
+ ttnn_visualizer/static/assets/index-DS75jGv-.css,sha256=OFiErLMCqh5_oo6tWY75ySKIabpxPPSxkYNGoY5PSxQ,630824
25
+ ttnn_visualizer/static/assets/index-ryWOUYjC.js,sha256=jzTbbc2JsDPU2905OvKUnlInEZJOaXal5hgzOQidf-E,7965016
26
26
  ttnn_visualizer/static/assets/index-voJy5fZe.js,sha256=4MEkPCpdjZkMgT0Kmxfdh5DCtJWMf-TAVQ3rc28BtEQ,293910
27
27
  ttnn_visualizer/static/assets/site-BTBrvHC5.webmanifest,sha256=Uy_XmnGuYFVf-OZuma2NvgEPdrCrevb3HZvaxSIHoA0,456
28
- ttnn_visualizer/static/assets/splitPathsBySizeLoader-DcJeKnCv.js,sha256=cELjyTg8P89wYmytRK39oWAfXsSamu7h27r-8RmSexA,281
28
+ ttnn_visualizer/static/assets/splitPathsBySizeLoader-CpZbtknp.js,sha256=PCJKRfnaHLx6LE79ziQ_C6lLca48_UerSLGFDl-xYRU,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
@@ -35,10 +35,10 @@ ttnn_visualizer/tests/__init__.py,sha256=FCQeTWnXsf-Wx-fay53-lQsm0y5-GcPMUmzhE5u
35
35
  ttnn_visualizer/tests/test_queries.py,sha256=HqaDXwudZpXiigJdHkdJP8oiUc-PtHASbpLnQQpbD7A,13792
36
36
  ttnn_visualizer/tests/test_serializers.py,sha256=t1s3rqaz3uOYL-pLB7GIs5pipy8SZDU4zvJw16mHUeY,19091
37
37
  ttnn_visualizer/tests/test_utils.py,sha256=9vUuCNg1mwhtB5RZKdJf-vo0lt9M5niHwkSezFwmklk,11186
38
- ttnn_visualizer-0.67.0.dist-info/licenses/LICENSE,sha256=73btFSS9sVfj4HGhNlBx6nYo4rkKnOlWOi8H1MpDoSE,20286
39
- ttnn_visualizer-0.67.0.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
40
- ttnn_visualizer-0.67.0.dist-info/METADATA,sha256=9LO7aiXOWvwuDxCGgj5IyOxYVhjSFo5Lyx7ugFYshDo,8912
41
- ttnn_visualizer-0.67.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
42
- ttnn_visualizer-0.67.0.dist-info/entry_points.txt,sha256=QpuUpkmQ_mEHJTMqOBdU0MH2Z4WF_9iFsGACeyyAO1E,61
43
- ttnn_visualizer-0.67.0.dist-info/top_level.txt,sha256=M1EGkvDOuIfbhDbcUdz2-TSdmCtDoQ2Uyag9k5JLDSY,16
44
- ttnn_visualizer-0.67.0.dist-info/RECORD,,
38
+ ttnn_visualizer-0.68.0.dist-info/licenses/LICENSE,sha256=73btFSS9sVfj4HGhNlBx6nYo4rkKnOlWOi8H1MpDoSE,20286
39
+ ttnn_visualizer-0.68.0.dist-info/licenses/LICENSE_understanding.txt,sha256=pymi-yb_RvYM9p2ZA4iSNsImcvhDBBxlGuJCY9dTq7M,233
40
+ ttnn_visualizer-0.68.0.dist-info/METADATA,sha256=8XB3UJobjSsy6kxf-zWBd6rFpVGABvZ_HBVIvLTTpvM,8912
41
+ ttnn_visualizer-0.68.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
42
+ ttnn_visualizer-0.68.0.dist-info/entry_points.txt,sha256=QpuUpkmQ_mEHJTMqOBdU0MH2Z4WF_9iFsGACeyyAO1E,61
43
+ ttnn_visualizer-0.68.0.dist-info/top_level.txt,sha256=M1EGkvDOuIfbhDbcUdz2-TSdmCtDoQ2Uyag9k5JLDSY,16
44
+ ttnn_visualizer-0.68.0.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-DiBJY9fQ.js","assets/index-voJy5fZe.js","assets/index-BZITDwoa.js","assets/index-BO1FGYnE.js","assets/index-bdndbd_j.css"])))=>i.map(i=>d[i]);
2
- import{_ as e}from"./index-BO1FGYnE.js";const s=async(t,a)=>{const{getIconPaths:o}=await e(async()=>{const{getIconPaths:r}=await import("./allPaths-DiBJY9fQ.js");return{getIconPaths:r}},__vite__mapDeps([0,1,2,3,4]));return o(t,a)};export{s as allPathsLoader};