halib 0.1.53__py3-none-any.whl → 0.1.54__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.
- halib/research/perftb.py +19 -5
- {halib-0.1.53.dist-info → halib-0.1.54.dist-info}/METADATA +2 -2
- {halib-0.1.53.dist-info → halib-0.1.54.dist-info}/RECORD +6 -6
- {halib-0.1.53.dist-info → halib-0.1.54.dist-info}/LICENSE.txt +0 -0
- {halib-0.1.53.dist-info → halib-0.1.54.dist-info}/WHEEL +0 -0
- {halib-0.1.53.dist-info → halib-0.1.54.dist-info}/top_level.txt +0 -0
halib/research/perftb.py
CHANGED
@@ -12,10 +12,10 @@ from typing import Dict, List, Union, Optional
|
|
12
12
|
from rich.pretty import pprint
|
13
13
|
import pandas as pd
|
14
14
|
|
15
|
-
|
15
|
+
from halib import *
|
16
16
|
# internal imports
|
17
|
-
from ..filetype import csvfile
|
18
|
-
from ..common import ConsoleLog
|
17
|
+
# from ..filetype import csvfile
|
18
|
+
# from ..common import ConsoleLog
|
19
19
|
|
20
20
|
|
21
21
|
class DatasetMetrics:
|
@@ -249,12 +249,15 @@ class PerfTB:
|
|
249
249
|
|
250
250
|
current_our_method = -1 # Start with -1 to avoid index error
|
251
251
|
exp_pattern_dict = {}
|
252
|
+
shown_legends = set()
|
252
253
|
for row_idx, metric in enumerate(metric_list, start=1):
|
253
254
|
metric_df = df[df["Metric"] == metric]
|
254
255
|
list_exp = list(metric_df["Experiment"].unique())
|
255
256
|
if custom_sort_exp_fn:
|
256
257
|
list_exp = custom_sort_exp_fn(list_exp)
|
257
258
|
for exp in list_exp:
|
259
|
+
showlegend = exp not in shown_legends
|
260
|
+
shown_legends.add(exp) # since it is a set, it will only keep unique values
|
258
261
|
should_highlight = (
|
259
262
|
custom_highlight_method_fn is not None and custom_highlight_method_fn(exp)
|
260
263
|
)
|
@@ -274,7 +277,7 @@ class PerfTB:
|
|
274
277
|
y=exp_df["Value"],
|
275
278
|
name=f"{exp}",
|
276
279
|
legendgroup=exp,
|
277
|
-
showlegend=
|
280
|
+
showlegend=showlegend, # Show legend only for the first row
|
278
281
|
marker=dict(
|
279
282
|
color=color_map[exp],
|
280
283
|
pattern=(
|
@@ -749,8 +752,19 @@ def test_mics() -> None:
|
|
749
752
|
custom_sort_exp_fn=lambda exps: sorted(exps, reverse=True),
|
750
753
|
open_plot=True,
|
751
754
|
)
|
755
|
+
def test_bench2():
|
756
|
+
perftb = PerfTB.from_csv(
|
757
|
+
"test/bench2.csv",
|
758
|
+
sep=";")
|
759
|
+
perftb.display()
|
760
|
+
perftb.plot(
|
761
|
+
save_path="zout/bench2_plot.svg",
|
762
|
+
title="Bench2 Performance Comparison",
|
763
|
+
open_plot=True,
|
764
|
+
)
|
752
765
|
|
753
766
|
|
754
767
|
# Example usage
|
755
768
|
if __name__ == "__main__":
|
756
|
-
test_mics()
|
769
|
+
# test_mics()
|
770
|
+
test_bench2()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: halib
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.54
|
4
4
|
Summary: Small library for common tasks
|
5
5
|
Author: Hoang Van Ha
|
6
6
|
Author-email: hoangvanhauit@gmail.com
|
@@ -45,7 +45,7 @@ Requires-Dist: dataclass-wizard
|
|
45
45
|
|
46
46
|
Helper package for coding and automation
|
47
47
|
|
48
|
-
**Version 0.1.
|
48
|
+
**Version 0.1.54**
|
49
49
|
|
50
50
|
+ add `util/dataclass_util` to help dynamically create `dataclass` classes from dictionary or YAML file, including support for nested dataclasses. From there, we can use `dataclass_wizard` to create a list of `dataclass` classes with the help from ChatGPT.
|
51
51
|
|
@@ -30,7 +30,7 @@ halib/online/projectmake.py,sha256=Zrs96WgXvO4nIrwxnCOletL4aTBge-EoF0r7hpKO1w8,4
|
|
30
30
|
halib/research/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
31
31
|
halib/research/benchquery.py,sha256=FuKnbWQtCEoRRtJAfN-zaN-jPiO_EzsakmTOMiqi7GQ,4626
|
32
32
|
halib/research/dataset.py,sha256=QU0Hr5QFb8_XlvnOMgC9QJGIpwXAZ9lDd0RdQi_QRec,6743
|
33
|
-
halib/research/perftb.py,sha256=
|
33
|
+
halib/research/perftb.py,sha256=Fj1l3RFGrswR7UzmMDafRwhQkInUUcNfxt5Wayc2swc,30465
|
34
34
|
halib/research/plot.py,sha256=-pDUk4z3C_GnyJ5zWmf-mGMdT4gaipVJWzIgcpIPiRk,9448
|
35
35
|
halib/research/torchloader.py,sha256=yqUjcSiME6H5W210363HyRUrOi3ISpUFAFkTr1w4DCw,6503
|
36
36
|
halib/research/wandb_op.py,sha256=YzLEqME5kIRxi3VvjFkW83wnFrsn92oYeqYuNwtYRkY,4188
|
@@ -44,8 +44,8 @@ halib/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
halib/utils/dataclass_util.py,sha256=aD5Ik9BRJzIEyfdlOCHmOddA7TM_TIAfapZfU0vMigE,1414
|
45
45
|
halib/utils/listop.py,sha256=Vpa8_2fI0wySpB2-8sfTBkyi_A4FhoFVVvFiuvW8N64,339
|
46
46
|
halib/utils/tele_noti.py,sha256=-4WXZelCA4W9BroapkRyIdUu9cUVrcJJhegnMs_WpGU,5928
|
47
|
-
halib-0.1.
|
48
|
-
halib-0.1.
|
49
|
-
halib-0.1.
|
50
|
-
halib-0.1.
|
51
|
-
halib-0.1.
|
47
|
+
halib-0.1.54.dist-info/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
|
48
|
+
halib-0.1.54.dist-info/METADATA,sha256=WzE-_Dwk2TFEWoTPVAHQLwTDOlV7BXaDvG1CkBP5d3E,4675
|
49
|
+
halib-0.1.54.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
50
|
+
halib-0.1.54.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
|
51
|
+
halib-0.1.54.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|