halib 0.1.89__py3-none-any.whl → 0.1.90__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.
@@ -97,12 +97,11 @@ class zProfiler:
97
97
  assert (
98
98
  len(ctx_step_dict.keys()) > 0
99
99
  ), "step_dict must have only one key (step_name) for detail."
100
-
100
+ normed_ctx_step_dict = {}
101
101
  for step_name, time_list in ctx_step_dict.items():
102
- normed_ctx_step_dict = {}
103
102
  if not isinstance(ctx_step_dict[step_name], list):
104
103
  raise ValueError(f"Step data for {step_name} must be a list")
105
- step_name = list(ctx_step_dict.keys())[0]
104
+ # step_name = list(ctx_step_dict.keys())[0] # ! debug
106
105
  normed_time_ls = []
107
106
  for idx, time_data in enumerate(time_list):
108
107
  elapsed_time = -1
@@ -111,7 +110,7 @@ class zProfiler:
111
110
  elapsed_time = end - start
112
111
  normed_time_ls.append((idx, elapsed_time)) # including step
113
112
  normed_ctx_step_dict[step_name] = normed_time_ls
114
- return normed_ctx_step_dict
113
+ return normed_ctx_step_dict
115
114
 
116
115
  def get_report_dict(self, with_detail=False):
117
116
  report_dict = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: halib
3
- Version: 0.1.89
3
+ Version: 0.1.90
4
4
  Summary: Small library for common tasks
5
5
  Author: Hoang Van Ha
6
6
  Author-email: hoangvanhauit@gmail.com
@@ -52,7 +52,7 @@ Dynamic: summary
52
52
 
53
53
  Helper package for coding and automation
54
54
 
55
- **Version 0.1.89**
55
+ **Version 0.1.90**
56
56
 
57
57
  + `research/profiler`: add `zProfiler` class to measure execution time of contexts and steps, with support for dynamic color scales in plots.
58
58
 
@@ -37,7 +37,7 @@ halib/research/mics.py,sha256=uX17AGrBGER-OFMqUULE_A9YPPbn1RpQ4o5-omrmqZ8,377
37
37
  halib/research/perfcalc.py,sha256=qDa0sqfpWrwGZVJtjuUVFK7JX6j8xyXP9OnnfYmdamg,15898
38
38
  halib/research/perftb.py,sha256=FWg0b8wSgy4UwuvHSXwEqvTq1Rhi-z-HtAKuQg1lWc4,30989
39
39
  halib/research/plot.py,sha256=A3di1HZhIHIKf7d9b-I68yu_cm4u2LpHoPKlirCaNOI,17956
40
- halib/research/profiler.py,sha256=a5ndHzVCatmHIBm4Z2e7F41hJLCu-u3g97pq490mPrg,11770
40
+ halib/research/profiler.py,sha256=GRAewTo0jGkOputjmRwtYVfJYBze_ivsOnrW9exWkPQ,11772
41
41
  halib/research/torchloader.py,sha256=yqUjcSiME6H5W210363HyRUrOi3ISpUFAFkTr1w4DCw,6503
42
42
  halib/research/wandb_op.py,sha256=YzLEqME5kIRxi3VvjFkW83wnFrsn92oYeqYuNwtYRkY,4188
43
43
  halib/sys/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -53,8 +53,8 @@ halib/utils/gpu_mon.py,sha256=vD41_ZnmPLKguuq9X44SB_vwd9JrblO4BDzHLXZhhFY,2233
53
53
  halib/utils/listop.py,sha256=Vpa8_2fI0wySpB2-8sfTBkyi_A4FhoFVVvFiuvW8N64,339
54
54
  halib/utils/tele_noti.py,sha256=-4WXZelCA4W9BroapkRyIdUu9cUVrcJJhegnMs_WpGU,5928
55
55
  halib/utils/video.py,sha256=ZqzNVPgc1RZr_T0OlHvZ6SzyBpL7O27LtB86JMbBuR0,3059
56
- halib-0.1.89.dist-info/licenses/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
57
- halib-0.1.89.dist-info/METADATA,sha256=MoTmHfHJYHsxVXFTXgEmNcNyWAil2s653sx1tCFqNEI,5864
58
- halib-0.1.89.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
59
- halib-0.1.89.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
60
- halib-0.1.89.dist-info/RECORD,,
56
+ halib-0.1.90.dist-info/licenses/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
57
+ halib-0.1.90.dist-info/METADATA,sha256=Y4k_phq_7NXqZrr9JjNG2jgUM8n2XKXwI5pFt9HVIAQ,5864
58
+ halib-0.1.90.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
59
+ halib-0.1.90.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
60
+ halib-0.1.90.dist-info/RECORD,,
File without changes