ttnn-visualizer 0.25.1__py3-none-any.whl → 0.27.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/app.py +32 -5
- ttnn_visualizer/csv_queries.py +20 -4
- ttnn_visualizer/decorators.py +6 -6
- ttnn_visualizer/exceptions.py +7 -0
- ttnn_visualizer/file_uploads.py +7 -0
- ttnn_visualizer/models.py +21 -12
- ttnn_visualizer/queries.py +5 -5
- ttnn_visualizer/sessions.py +95 -40
- ttnn_visualizer/settings.py +1 -1
- ttnn_visualizer/sockets.py +17 -17
- ttnn_visualizer/static/assets/{allPaths-BsZhgQ3T.js → allPaths-DfvpbqXZ.js} +1 -1
- ttnn_visualizer/static/assets/{allPathsLoader-DgFQ6cmn.js → allPathsLoader-C1wkx2sM.js} +2 -2
- ttnn_visualizer/static/assets/{index-C6f3UdbP.css → index-BTfoVg9a.css} +2 -2
- ttnn_visualizer/static/assets/{index-Fd4wdmZt.js → index-CeYOVqR1.js} +247 -247
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-BFDp4kIf.js → splitPathsBySizeLoader-C_Kuh9CJ.js} +1 -1
- ttnn_visualizer/static/index.html +3 -3
- ttnn_visualizer/utils.py +6 -0
- ttnn_visualizer/views.py +73 -32
- {ttnn_visualizer-0.25.1.dist-info → ttnn_visualizer-0.27.0.dist-info}/METADATA +6 -9
- {ttnn_visualizer-0.25.1.dist-info → ttnn_visualizer-0.27.0.dist-info}/RECORD +25 -25
- {ttnn_visualizer-0.25.1.dist-info → ttnn_visualizer-0.27.0.dist-info}/LICENSE +0 -0
- {ttnn_visualizer-0.25.1.dist-info → ttnn_visualizer-0.27.0.dist-info}/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.25.1.dist-info → ttnn_visualizer-0.27.0.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.25.1.dist-info → ttnn_visualizer-0.27.0.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.25.1.dist-info → ttnn_visualizer-0.27.0.dist-info}/top_level.txt +0 -0
ttnn_visualizer/sockets.py
CHANGED
@@ -51,7 +51,7 @@ debounce_delay = 0.5 # Delay in seconds (adjust as needed)
|
|
51
51
|
last_emit_time = 0
|
52
52
|
|
53
53
|
|
54
|
-
def emit_file_status(progress: FileProgress,
|
54
|
+
def emit_file_status(progress: FileProgress, instance_id=None):
|
55
55
|
"""Debounced emit for file status updates using a debounce timer."""
|
56
56
|
global debounce_timer, last_emit_time
|
57
57
|
|
@@ -59,10 +59,10 @@ def emit_file_status(progress: FileProgress, tab_id=None):
|
|
59
59
|
global last_emit_time
|
60
60
|
last_emit_time = time.time()
|
61
61
|
data = progress.to_dict()
|
62
|
-
data.update({"
|
62
|
+
data.update({"instance_id": instance_id})
|
63
63
|
try:
|
64
64
|
if socketio is not None and hasattr(socketio, "emit"):
|
65
|
-
socketio.emit(Messages.FILE_TRANSFER_PROGRESS, data, to=
|
65
|
+
socketio.emit(Messages.FILE_TRANSFER_PROGRESS, data, to=instance_id)
|
66
66
|
except NameError:
|
67
67
|
pass # Can silently pass since we know the NameError is from sockets being disabled
|
68
68
|
|
@@ -89,30 +89,30 @@ def register_handlers(socketio_instance):
|
|
89
89
|
|
90
90
|
sid = getattr(request, "sid", "")
|
91
91
|
|
92
|
-
|
93
|
-
print(f"Received
|
92
|
+
instance_id = request.args.get("instanceId")
|
93
|
+
print(f"Received instanceId: {instance_id}, socket ID: {sid}") # Log for debugging
|
94
94
|
|
95
|
-
if
|
96
|
-
join_room(
|
97
|
-
tab_clients[
|
98
|
-
print(f"Joined room: {
|
95
|
+
if instance_id:
|
96
|
+
join_room(instance_id) # Join the room identified by the instanceId
|
97
|
+
tab_clients[instance_id] = sid # Store the socket ID associated with this instanceId
|
98
|
+
print(f"Joined room: {instance_id}")
|
99
99
|
else:
|
100
|
-
print("No
|
100
|
+
print("No instanceId provided, disconnecting client.")
|
101
101
|
disconnect()
|
102
102
|
|
103
103
|
@socketio.on("disconnect")
|
104
104
|
def handle_disconnect():
|
105
105
|
from flask import request
|
106
106
|
|
107
|
-
|
108
|
-
# Find and remove the socket ID associated with this
|
107
|
+
instance_id = None
|
108
|
+
# Find and remove the socket ID associated with this instanceId
|
109
109
|
sid = getattr(request, "sid", "")
|
110
110
|
for key, value in tab_clients.items():
|
111
111
|
|
112
112
|
if value == sid:
|
113
|
-
|
113
|
+
instance_id = key
|
114
114
|
break
|
115
|
-
if
|
116
|
-
leave_room(
|
117
|
-
del tab_clients[
|
118
|
-
print(f"Client disconnected from
|
115
|
+
if instance_id:
|
116
|
+
leave_room(instance_id)
|
117
|
+
del tab_clients[instance_id]
|
118
|
+
print(f"Client disconnected from instanceId: {instance_id}, Socket ID: {sid}")
|
@@ -1 +1 @@
|
|
1
|
-
import{I as n}from"./index-BVMreIQm.js";import{I as e}from"./index-Do7YB6C4.js";import{p as r,I as s}from"./index-
|
1
|
+
import{I as n}from"./index-BVMreIQm.js";import{I as e}from"./index-Do7YB6C4.js";import{p as r,I as s}from"./index-CeYOVqR1.js";function I(o,t){var a=r(o);return t===s.STANDARD?n[a]:e[a]}function p(o){return r(o)}export{n as IconSvgPaths16,e as IconSvgPaths20,I as getIconPaths,p as iconNameToPathsRecordKey};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-
|
2
|
-
import{_ as o,a as n,b as i}from"./index-
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-DfvpbqXZ.js","assets/index-BVMreIQm.js","assets/index-Do7YB6C4.js","assets/index-CeYOVqR1.js","assets/index-BTfoVg9a.css"])))=>i.map(i=>d[i]);
|
2
|
+
import{_ as o,a as n,b as i}from"./index-CeYOVqR1.js";var _=function(e,a){return o(void 0,void 0,void 0,function(){var t;return n(this,function(r){switch(r.label){case 0:return[4,i(()=>import("./allPaths-DfvpbqXZ.js"),__vite__mapDeps([0,1,2,3,4]))];case 1:return t=r.sent().getIconPaths,[2,t(e,a)]}})})};export{_ as allPathsLoader};
|