ttnn-visualizer 0.47.0__py3-none-any.whl → 0.48.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/models.py CHANGED
@@ -78,6 +78,7 @@ class Buffer(SerializeableDataclass):
78
78
  address: int
79
79
  max_size_per_bank: int
80
80
  buffer_type: BufferType
81
+ buffer_layout: Optional[int] = None
81
82
 
82
83
 
83
84
  @dataclasses.dataclass
@@ -146,7 +146,7 @@ class DatabaseQueries:
146
146
  ) -> Generator[Buffer, None, None]:
147
147
  rows = self._query_table("buffers", filters)
148
148
  for row in rows:
149
- yield Buffer(*row)
149
+ yield Buffer(*row[:6])
150
150
 
151
151
  def query_stack_traces(
152
152
  self, filters: Optional[Dict[str, Any]] = None
@@ -17,6 +17,7 @@ logger = getLogger(__name__)
17
17
 
18
18
  class Messages(object):
19
19
  FILE_TRANSFER_PROGRESS = "fileTransferProgress"
20
+ REPORT_GENERATED = "reportGenerated"
20
21
 
21
22
 
22
23
  class FileStatus(Enum):
@@ -27,6 +28,12 @@ class FileStatus(Enum):
27
28
  STARTED = "STARTED"
28
29
 
29
30
 
31
+ class ExitStatus(Enum):
32
+ PASS = "PASS"
33
+ FAIL = "FAIL"
34
+ ERROR = "ERROR"
35
+
36
+
30
37
  @dataclass
31
38
  class FileProgress(SerializeableDataclass):
32
39
  current_file_name: str
@@ -40,6 +47,16 @@ class FileProgress(SerializeableDataclass):
40
47
  self.percent_of_current = round(self.percent_of_current, 2)
41
48
 
42
49
 
50
+ @dataclass
51
+ class ReportGenerated(SerializeableDataclass):
52
+ report_name: str
53
+ profiler_path: str | None = None
54
+ performance_path: str | None = None
55
+ exit_status: ExitStatus | None = None
56
+ message_type: str = "report_generated"
57
+ timestamp: str = field(default_factory=lambda: datetime.utcnow().isoformat())
58
+
59
+
43
60
  # For tracking connected clients subscriber ID
44
61
  tab_clients = {}
45
62
 
@@ -77,6 +94,20 @@ def emit_file_status(progress: FileProgress, instance_id=None):
77
94
  debounce_timer.start()
78
95
 
79
96
 
97
+ def emit_report_generated(report_generated: ReportGenerated):
98
+ """Emit a report update notification to all connected clients."""
99
+ try:
100
+ if socketio is not None and hasattr(socketio, "emit"):
101
+ data = report_generated.to_dict()
102
+ socketio.emit(Messages.REPORT_GENERATED, data)
103
+ logger.info(
104
+ f"Report update notification sent: {report_generated.report_name}"
105
+ )
106
+ except NameError:
107
+ logger.warning("SocketIO not available - skipping report update notification")
108
+ pass # Can silently pass since we know the NameError is from sockets being disabled
109
+
110
+
80
111
  def register_handlers(socketio_instance):
81
112
  global socketio
82
113
  socketio = socketio_instance
@@ -1 +1 @@
1
- import{I as s}from"./index-03c8d4Gh.js";import{I as r}from"./index-PKNBViIU.js";import{p as n,I as c}from"./index-CmA3KkTi.js";function p(t,a){const o=n(t);return a===c.STANDARD?s[o]:r[o]}export{s as IconSvgPaths16,r as IconSvgPaths20,p as getIconPaths};
1
+ import{I as s}from"./index-03c8d4Gh.js";import{I as r}from"./index-PKNBViIU.js";import{p as n,I as c}from"./index-T8PVeTUn.js";function p(t,a){const o=n(t);return a===c.STANDARD?s[o]:r[o]}export{s as IconSvgPaths16,r as IconSvgPaths20,p as getIconPaths};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-DyhSRH--.js","assets/index-03c8d4Gh.js","assets/index-PKNBViIU.js","assets/index-T8PVeTUn.js","assets/index-CZ0Uonoz.css"])))=>i.map(i=>d[i]);
2
+ import{_ as e}from"./index-T8PVeTUn.js";const s=async(t,a)=>{const{getIconPaths:o}=await e(async()=>{const{getIconPaths:r}=await import("./allPaths-DyhSRH--.js");return{getIconPaths:r}},__vite__mapDeps([0,1,2,3,4]));return o(t,a)};export{s as allPathsLoader};