ttnn-visualizer 0.33.1__py3-none-any.whl → 0.34.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.
@@ -482,6 +482,8 @@ class OpsPerformanceQueries:
482
482
 
483
483
  # Find the latest file with the correct prefix
484
484
  perf_files = list(
485
+ performance_path.glob(f"{OpsPerformanceQueries.PERF_RESULTS_PREFIX}.csv")
486
+ ) + list(
485
487
  performance_path.glob(f"{OpsPerformanceQueries.PERF_RESULTS_PREFIX}_*.csv")
486
488
  )
487
489
  if not perf_files:
@@ -4,11 +4,12 @@
4
4
 
5
5
  from pathlib import Path
6
6
  import logging
7
+ import re
7
8
 
8
9
  logger = logging.getLogger(__name__)
9
10
 
10
11
 
11
- def validate_files(files, required_files, pattern=None):
12
+ def validate_files(files, required_files, pattern=None, folder_name=None):
12
13
  """Validate uploaded files against required file names and an optional pattern."""
13
14
  found_files = set()
14
15
 
@@ -19,7 +20,7 @@ def validate_files(files, required_files, pattern=None):
19
20
  pattern and file_path.name.startswith(pattern)
20
21
  ):
21
22
  found_files.add(file_path.name)
22
- if len(file_path.parents) != 2:
23
+ if not folder_name and len(file_path.parents) != 2:
23
24
  logger.warning(
24
25
  f"File {file.filename} is not under a single parent folder."
25
26
  )
@@ -43,25 +44,25 @@ def extract_profiler_name(files):
43
44
  unsplit_profiler_name = str(files[0].filename)
44
45
  return unsplit_profiler_name.split("/")[0]
45
46
 
47
+
46
48
  def extract_npe_name(files):
47
49
  if not files:
48
50
  return None
49
51
 
50
- file_path = Path(files[0].filename)
51
- return file_path.stem
52
+ return re.sub(r"\.(json|npeviz\.zst)$", "", files[0].filename)
52
53
 
53
54
 
54
55
  def save_uploaded_files(
55
56
  files,
56
57
  target_directory,
57
- profiler_name=None,
58
+ folder_name=None,
58
59
  ):
59
60
  """
60
61
  Save uploaded files to the target directory.
61
62
 
62
63
  :param files: List of files to be saved.
63
64
  :param target_directory: The base directory for saving the files.
64
- :param profiler_name: The report name to use for the directory.
65
+ :param folder_name: The name to use for the directory.
65
66
  """
66
67
  for file in files:
67
68
  current_file_name = str(file.filename)
@@ -69,7 +70,10 @@ def save_uploaded_files(
69
70
 
70
71
  file_path = Path(current_file_name)
71
72
 
72
- destination_file = Path(target_directory).joinpath(str(file_path))
73
+ if folder_name:
74
+ destination_file = Path(target_directory) / folder_name / str(file_path)
75
+ else:
76
+ destination_file = Path(target_directory) / str(file_path)
73
77
 
74
78
  logger.info(f"Writing file to {destination_file}")
75
79
 
@@ -18,6 +18,7 @@ build
18
18
  PyYAML==6.0.2
19
19
  python-dotenv==1.0.1
20
20
  tt-perf-report==1.0.6
21
+ zstd==1.5.7.0
21
22
 
22
23
  # Dev dependencies
23
24
  mypy
@@ -53,7 +53,7 @@ class DefaultConfig(object):
53
53
  GUNICORN_WORKER_CLASS = os.getenv("GUNICORN_WORKER_CLASS", "gevent")
54
54
  GUNICORN_WORKERS = os.getenv("GUNICORN_WORKERS", "1")
55
55
  PORT = os.getenv("PORT", "8000")
56
- HOST = "localhost"
56
+ HOST = os.getenv("HOST", "localhost")
57
57
  DEV_SERVER_PORT = "5173"
58
58
  DEV_SERVER_HOST = "localhost"
59
59
 
@@ -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-Dy2mdDFG.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
+ 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-CHS7htir.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-DmImLtgS.js","assets/index-BVMreIQm.js","assets/index-Do7YB6C4.js","assets/index-Dy2mdDFG.js","assets/index-Dhl0up3F.css"])))=>i.map(i=>d[i]);
2
- import{_ as o,a as n,b as i}from"./index-Dy2mdDFG.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-DmImLtgS.js"),__vite__mapDeps([0,1,2,3,4]))];case 1:return t=r.sent().getIconPaths,[2,t(e,a)]}})})};export{_ as allPathsLoader};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/allPaths-D0uOIsnD.js","assets/index-BVMreIQm.js","assets/index-Do7YB6C4.js","assets/index-CHS7htir.js","assets/index-CJJgzCye.css"])))=>i.map(i=>d[i]);
2
+ import{_ as o,a as n,b as i}from"./index-CHS7htir.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-D0uOIsnD.js"),__vite__mapDeps([0,1,2,3,4]))];case 1:return t=r.sent().getIconPaths,[2,t(e,a)]}})})};export{_ as allPathsLoader};