ttnn-visualizer 0.29.0__py3-none-any.whl → 0.31.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 +4 -4
- ttnn_visualizer/csv_queries.py +20 -5
- ttnn_visualizer/decorators.py +0 -7
- ttnn_visualizer/file_uploads.py +5 -7
- ttnn_visualizer/models.py +32 -32
- ttnn_visualizer/queries.py +6 -6
- ttnn_visualizer/sessions.py +78 -69
- ttnn_visualizer/settings.py +4 -1
- ttnn_visualizer/sftp_operations.py +24 -25
- ttnn_visualizer/static/assets/{allPaths-CJHbl9k5.js → allPaths-LtEU5_sy.js} +1 -1
- ttnn_visualizer/static/assets/{allPathsLoader-BMROdgRm.js → allPathsLoader-B4F0G1kZ.js} +2 -2
- ttnn_visualizer/static/assets/{index-DRqEueCH.js → index-CC7TIRx-.js} +249 -249
- ttnn_visualizer/static/assets/{index-CINMcROY.css → index-T38m8LD9.css} +2 -2
- ttnn_visualizer/static/assets/{splitPathsBySizeLoader-Bff1kHt3.js → splitPathsBySizeLoader-gOHSu5Y3.js} +1 -1
- ttnn_visualizer/static/index.html +2 -2
- ttnn_visualizer/tests/test_queries.py +4 -4
- ttnn_visualizer/utils.py +17 -29
- ttnn_visualizer/views.py +251 -90
- {ttnn_visualizer-0.29.0.dist-info → ttnn_visualizer-0.31.0.dist-info}/METADATA +4 -4
- {ttnn_visualizer-0.29.0.dist-info → ttnn_visualizer-0.31.0.dist-info}/RECORD +25 -25
- {ttnn_visualizer-0.29.0.dist-info → ttnn_visualizer-0.31.0.dist-info}/LICENSE +0 -0
- {ttnn_visualizer-0.29.0.dist-info → ttnn_visualizer-0.31.0.dist-info}/LICENSE_understanding.txt +0 -0
- {ttnn_visualizer-0.29.0.dist-info → ttnn_visualizer-0.31.0.dist-info}/WHEEL +0 -0
- {ttnn_visualizer-0.29.0.dist-info → ttnn_visualizer-0.31.0.dist-info}/entry_points.txt +0 -0
- {ttnn_visualizer-0.29.0.dist-info → ttnn_visualizer-0.31.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-CC7TIRx-.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-CC7TIRx-.js"></script>
|
31
|
+
<link rel="stylesheet" crossorigin href="/assets/index-T38m8LD9.css">
|
32
32
|
</head>
|
33
33
|
<body>
|
34
34
|
<div id="root"></div>
|
@@ -227,7 +227,7 @@ class TestDatabaseQueries(unittest.TestCase):
|
|
227
227
|
mock_session = Mock()
|
228
228
|
mock_session.remote_connection = Mock(useRemoteQuerying=True)
|
229
229
|
mock_session.remote_connection.sqliteBinaryPath = "/usr/bin/sqlite3"
|
230
|
-
mock_session.
|
230
|
+
mock_session.remote_profiler_folder = Mock(remotePath="/remote/path")
|
231
231
|
db_queries = DatabaseQueries(session=mock_session)
|
232
232
|
self.assertIsInstance(db_queries.query_runner, RemoteQueryRunner)
|
233
233
|
|
@@ -238,7 +238,7 @@ class TestDatabaseQueries(unittest.TestCase):
|
|
238
238
|
connection.close()
|
239
239
|
|
240
240
|
mock_session = Mock()
|
241
|
-
mock_session.
|
241
|
+
mock_session.profiler_path = temp_db_file.name
|
242
242
|
mock_session.remote_connection = None
|
243
243
|
|
244
244
|
db_queries = DatabaseQueries(session=mock_session)
|
@@ -246,7 +246,7 @@ class TestDatabaseQueries(unittest.TestCase):
|
|
246
246
|
|
247
247
|
def test_init_with_invalid_session(self):
|
248
248
|
mock_session = Mock()
|
249
|
-
mock_session.
|
249
|
+
mock_session.profiler_path = None
|
250
250
|
mock_session.remote_connection = None
|
251
251
|
with self.assertRaises(ValueError) as context:
|
252
252
|
DatabaseQueries(session=mock_session)
|
@@ -388,7 +388,7 @@ class TestRemoteQueryRunner(unittest.TestCase):
|
|
388
388
|
self.mock_session.remote_connection.sqliteBinaryPath = "/usr/bin/sqlite3"
|
389
389
|
self.mock_session.remote_connection.host = "mockhost"
|
390
390
|
self.mock_session.remote_connection.user = "mockuser"
|
391
|
-
self.mock_session.
|
391
|
+
self.mock_session.remote_profiler_folder.remotePath = "/remote/db"
|
392
392
|
|
393
393
|
@patch("ttnn_visualizer.queries.get_client")
|
394
394
|
def test_init_with_mock_get_client(self, mock_get_client):
|
ttnn_visualizer/utils.py
CHANGED
@@ -45,81 +45,69 @@ def timer(f: Callable):
|
|
45
45
|
return wrapper
|
46
46
|
|
47
47
|
|
48
|
-
def
|
48
|
+
def get_performance_path(performance_name, current_app, remote_connection=None):
|
49
49
|
"""
|
50
|
-
Gets the
|
50
|
+
Gets the path for the given performance_name.
|
51
51
|
|
52
|
-
:param
|
52
|
+
:param performance_name: The name of the performance directory.
|
53
53
|
:param current_app: Flask current application object.
|
54
|
-
:param
|
54
|
+
:param remote_connection: Remote connection model instance
|
55
55
|
|
56
56
|
:return: Profiler path as a string.
|
57
57
|
"""
|
58
58
|
local_dir = Path(current_app.config["LOCAL_DATA_DIRECTORY"])
|
59
59
|
remote_dir = Path(current_app.config["REMOTE_DATA_DIRECTORY"])
|
60
60
|
|
61
|
-
# Check if there's an associated RemoteConnection
|
62
61
|
if remote_connection:
|
63
|
-
# Use the remote directory if a remote connection exists
|
64
62
|
base_dir = Path(remote_dir).joinpath(remote_connection.host)
|
65
63
|
else:
|
66
|
-
# Default to local directory if no remote connection is present
|
67
64
|
base_dir = local_dir
|
68
65
|
|
69
|
-
|
70
|
-
|
71
|
-
else:
|
72
|
-
profile_dir = base_dir / "profiler"
|
73
|
-
|
74
|
-
# Construct the profiler path
|
75
|
-
profiler_path = profile_dir / profile_name
|
66
|
+
profiler_dir = base_dir / current_app.config["PERFORMANCE_DIRECTORY_NAME"]
|
67
|
+
performance_path = profiler_dir / performance_name
|
76
68
|
|
77
|
-
return str(
|
69
|
+
return str(performance_path)
|
78
70
|
|
79
71
|
|
80
|
-
def
|
72
|
+
def get_profiler_path(profiler_name, current_app, remote_connection=None):
|
81
73
|
"""
|
82
74
|
Gets the report path for the given active_report object.
|
83
|
-
:param
|
75
|
+
:param profiler_name: The name of the report directory.
|
84
76
|
:param current_app: Flask current application
|
85
77
|
:param remote_connection: Remote connection model instance
|
86
78
|
|
87
|
-
:return:
|
79
|
+
:return: profiler_path as a string
|
88
80
|
"""
|
89
81
|
database_file_name = current_app.config["SQLITE_DB_PATH"]
|
90
82
|
local_dir = current_app.config["LOCAL_DATA_DIRECTORY"]
|
91
83
|
remote_dir = current_app.config["REMOTE_DATA_DIRECTORY"]
|
92
84
|
|
93
|
-
if
|
94
|
-
# Check if there's an associated RemoteConnection
|
85
|
+
if profiler_name:
|
95
86
|
if remote_connection:
|
96
|
-
# Use the remote directory if a remote connection exists
|
97
87
|
base_dir = Path(remote_dir).joinpath(remote_connection.host)
|
98
88
|
else:
|
99
|
-
# Default to local directory if no remote connection is present
|
100
89
|
base_dir = local_dir
|
101
90
|
|
102
|
-
|
103
|
-
|
104
|
-
target_path = str(Path(report_path).joinpath(database_file_name))
|
91
|
+
profiler_path = base_dir / current_app.config["PROFILER_DIRECTORY_NAME"] / profiler_name
|
92
|
+
target_path = profiler_path / database_file_name
|
105
93
|
|
106
|
-
return target_path
|
94
|
+
return str(target_path)
|
107
95
|
else:
|
108
96
|
return ""
|
109
97
|
|
110
98
|
def get_npe_path(npe_name, current_app):
|
111
99
|
local_dir = Path(current_app.config["LOCAL_DATA_DIRECTORY"])
|
112
100
|
|
113
|
-
npe_path = local_dir / "
|
101
|
+
npe_path = local_dir / current_app.config["NPE_DIRECTORY_NAME"]
|
114
102
|
|
115
103
|
return str(npe_path)
|
116
104
|
|
117
105
|
|
118
106
|
def get_cluster_descriptor_path(instance):
|
119
|
-
if not instance.
|
107
|
+
if not instance.profiler_path:
|
120
108
|
return None
|
121
109
|
|
122
|
-
cluster_descriptor_path = Path(instance.
|
110
|
+
cluster_descriptor_path = Path(instance.profiler_path).parent / Path("cluster_descriptor.yaml")
|
123
111
|
|
124
112
|
if not cluster_descriptor_path.exists():
|
125
113
|
return None
|