halib 0.2.2__tar.gz → 0.2.4__tar.gz
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-0.2.2 → halib-0.2.4}/PKG-INFO +4 -4
- {halib-0.2.2 → halib-0.2.4}/README.md +3 -3
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/core/base_config.py +7 -7
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/core/base_exp.py +3 -3
- {halib-0.2.2 → halib-0.2.4}/halib.egg-info/PKG-INFO +4 -4
- {halib-0.2.2 → halib-0.2.4}/halib.egg-info/SOURCES.txt +19 -19
- {halib-0.2.2 → halib-0.2.4}/setup.py +1 -1
- {halib-0.2.2 → halib-0.2.4}/.gitignore +0 -0
- {halib-0.2.2 → halib-0.2.4}/GDriveFolder.txt +0 -0
- {halib-0.2.2 → halib-0.2.4}/LICENSE.txt +0 -0
- {halib-0.2.2 → halib-0.2.4}/MANIFEST.in +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/__init__.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/common/__init__.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/common/common.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/common/rich_color.py +0 -0
- {halib-0.2.2/halib/filetype → halib-0.2.4/halib/exp}/__init__.py +0 -0
- {halib-0.2.2/halib/online → halib-0.2.4/halib/exp/core}/__init__.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/core/param_gen.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/core/wandb_op.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp/data}/__init__.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/data/dataclass_util.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/data/dataset.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/data/torchloader.py +0 -0
- {halib-0.2.2/halib/research/core → halib-0.2.4/halib/exp/perf}/__init__.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/perf/flop_calc.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/perf/gpu_mon.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/perf/perfcalc.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/perf/perfmetrics.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/perf/perftb.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/perf/profiler.py +0 -0
- {halib-0.2.2/halib/research/data → halib-0.2.4/halib/exp/viz}/__init__.py +0 -0
- {halib-0.2.2/halib/research → halib-0.2.4/halib/exp}/viz/plot.py +0 -0
- {halib-0.2.2/halib/research/perf → halib-0.2.4/halib/filetype}/__init__.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/filetype/csvfile.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/filetype/ipynb.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/filetype/jsonfile.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/filetype/textfile.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/filetype/videofile.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/filetype/yamlfile.py +0 -0
- {halib-0.2.2/halib/research/viz → halib-0.2.4/halib/online}/__init__.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/online/gdrive.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/online/gdrive_mkdir.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/online/projectmake.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/online/tele_noti.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/system/__init__.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/system/cmd.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/system/filesys.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/system/path.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/utils/__init__.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/utils/dict.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib/utils/list.py +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib.egg-info/dependency_links.txt +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib.egg-info/requires.txt +0 -0
- {halib-0.2.2 → halib-0.2.4}/halib.egg-info/top_level.txt +0 -0
- {halib-0.2.2 → halib-0.2.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: halib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Small library for common tasks
|
|
5
5
|
Author: Hoang Van Ha
|
|
6
6
|
Author-email: hoangvanhauit@gmail.com
|
|
@@ -53,10 +53,10 @@ Dynamic: summary
|
|
|
53
53
|
|
|
54
54
|
# Helper package for coding and automation
|
|
55
55
|
|
|
56
|
-
**Version 0.2.
|
|
57
|
-
+ reorganize packages with most changes in `research` package
|
|
56
|
+
**Version 0.2.4**
|
|
57
|
+
+ reorganize packages with most changes in `research` package; also rename `research` to `exp` (package for experiment management and utilities)
|
|
58
58
|
|
|
59
|
-
**Version 0.2.
|
|
59
|
+
**Version 0.2.1**
|
|
60
60
|
+ `research/base_exp`: add `eval_exp` method to evaluate experiment (e.g., model evaluation on test set) after experiment running is done.
|
|
61
61
|
|
|
62
62
|
**Version 0.1.99**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Helper package for coding and automation
|
|
2
2
|
|
|
3
|
-
**Version 0.2.
|
|
4
|
-
+ reorganize packages with most changes in `research` package
|
|
3
|
+
**Version 0.2.4**
|
|
4
|
+
+ reorganize packages with most changes in `research` package; also rename `research` to `exp` (package for experiment management and utilities)
|
|
5
5
|
|
|
6
|
-
**Version 0.2.
|
|
6
|
+
**Version 0.2.1**
|
|
7
7
|
+ `research/base_exp`: add `eval_exp` method to evaluate experiment (e.g., model evaluation on test set) after experiment running is done.
|
|
8
8
|
|
|
9
9
|
**Version 0.1.99**
|
|
@@ -8,7 +8,7 @@ from dataclasses import dataclass
|
|
|
8
8
|
from dataclass_wizard import YAMLWizard
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
class
|
|
11
|
+
class NamedCfg(ABC):
|
|
12
12
|
"""
|
|
13
13
|
Base class for named configurations.
|
|
14
14
|
All configurations should have a name.
|
|
@@ -24,7 +24,7 @@ class NamedConfig(ABC):
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
@dataclass
|
|
27
|
-
class
|
|
27
|
+
class AutoNamedCfg(YAMLWizard, NamedCfg):
|
|
28
28
|
"""
|
|
29
29
|
Mixin that automatically implements get_name() by returning self.name.
|
|
30
30
|
Classes using this MUST have a 'name' field.
|
|
@@ -42,9 +42,9 @@ class AutoNamedConfig(YAMLWizard, NamedConfig):
|
|
|
42
42
|
# or handled by the loader.
|
|
43
43
|
pass
|
|
44
44
|
|
|
45
|
-
T = TypeVar("T", bound=
|
|
45
|
+
T = TypeVar("T", bound=AutoNamedCfg)
|
|
46
46
|
|
|
47
|
-
class
|
|
47
|
+
class BaseSelectorCfg(Generic[T]):
|
|
48
48
|
"""
|
|
49
49
|
Base class to handle the logic of selecting an item from a list by name.
|
|
50
50
|
"""
|
|
@@ -63,7 +63,7 @@ class BaseSelectorConfig(Generic[T]):
|
|
|
63
63
|
)
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
class
|
|
66
|
+
class ExpBaseCfg(ABC, YAMLWizard):
|
|
67
67
|
"""
|
|
68
68
|
Base class for configuration objects.
|
|
69
69
|
What a cfg class must have:
|
|
@@ -128,7 +128,7 @@ class ExpBaseConfig(ABC, YAMLWizard):
|
|
|
128
128
|
pass
|
|
129
129
|
|
|
130
130
|
@abstractmethod
|
|
131
|
-
def get_dataset_cfg(self) ->
|
|
131
|
+
def get_dataset_cfg(self) -> NamedCfg:
|
|
132
132
|
"""
|
|
133
133
|
Get the dataset configuration.
|
|
134
134
|
This method should be implemented in subclasses.
|
|
@@ -136,7 +136,7 @@ class ExpBaseConfig(ABC, YAMLWizard):
|
|
|
136
136
|
pass
|
|
137
137
|
|
|
138
138
|
@abstractmethod
|
|
139
|
-
def get_metric_cfg(self) ->
|
|
139
|
+
def get_metric_cfg(self) -> NamedCfg:
|
|
140
140
|
"""
|
|
141
141
|
Get the metric configuration.
|
|
142
142
|
This method should be implemented in subclasses.
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
from abc import ABC, abstractmethod
|
|
2
2
|
from typing import Tuple, Any, Optional
|
|
3
|
-
from base_config import
|
|
3
|
+
from base_config import ExpBaseCfg
|
|
4
4
|
from ..perf.perfcalc import PerfCalc
|
|
5
5
|
from ..perf.perfmetrics import MetricsBackend
|
|
6
6
|
|
|
7
7
|
# ! SEE https://github.com/hahv/base_exp for sample usage
|
|
8
|
-
class
|
|
8
|
+
class BaseExp(PerfCalc, ABC):
|
|
9
9
|
"""
|
|
10
10
|
Base class for experiments.
|
|
11
11
|
Orchestrates the experiment pipeline using a pluggable metrics backend.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
-
def __init__(self, config:
|
|
14
|
+
def __init__(self, config: ExpBaseCfg):
|
|
15
15
|
self.config = config
|
|
16
16
|
self.metric_backend = None
|
|
17
17
|
# Flag to track if init_general/prepare_dataset has run
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: halib
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Small library for common tasks
|
|
5
5
|
Author: Hoang Van Ha
|
|
6
6
|
Author-email: hoangvanhauit@gmail.com
|
|
@@ -53,10 +53,10 @@ Dynamic: summary
|
|
|
53
53
|
|
|
54
54
|
# Helper package for coding and automation
|
|
55
55
|
|
|
56
|
-
**Version 0.2.
|
|
57
|
-
+ reorganize packages with most changes in `research` package
|
|
56
|
+
**Version 0.2.4**
|
|
57
|
+
+ reorganize packages with most changes in `research` package; also rename `research` to `exp` (package for experiment management and utilities)
|
|
58
58
|
|
|
59
|
-
**Version 0.2.
|
|
59
|
+
**Version 0.2.1**
|
|
60
60
|
+ `research/base_exp`: add `eval_exp` method to evaluate experiment (e.g., model evaluation on test set) after experiment running is done.
|
|
61
61
|
|
|
62
62
|
**Version 0.1.99**
|
|
@@ -13,6 +13,25 @@ halib.egg-info/top_level.txt
|
|
|
13
13
|
halib/common/__init__.py
|
|
14
14
|
halib/common/common.py
|
|
15
15
|
halib/common/rich_color.py
|
|
16
|
+
halib/exp/__init__.py
|
|
17
|
+
halib/exp/core/__init__.py
|
|
18
|
+
halib/exp/core/base_config.py
|
|
19
|
+
halib/exp/core/base_exp.py
|
|
20
|
+
halib/exp/core/param_gen.py
|
|
21
|
+
halib/exp/core/wandb_op.py
|
|
22
|
+
halib/exp/data/__init__.py
|
|
23
|
+
halib/exp/data/dataclass_util.py
|
|
24
|
+
halib/exp/data/dataset.py
|
|
25
|
+
halib/exp/data/torchloader.py
|
|
26
|
+
halib/exp/perf/__init__.py
|
|
27
|
+
halib/exp/perf/flop_calc.py
|
|
28
|
+
halib/exp/perf/gpu_mon.py
|
|
29
|
+
halib/exp/perf/perfcalc.py
|
|
30
|
+
halib/exp/perf/perfmetrics.py
|
|
31
|
+
halib/exp/perf/perftb.py
|
|
32
|
+
halib/exp/perf/profiler.py
|
|
33
|
+
halib/exp/viz/__init__.py
|
|
34
|
+
halib/exp/viz/plot.py
|
|
16
35
|
halib/filetype/__init__.py
|
|
17
36
|
halib/filetype/csvfile.py
|
|
18
37
|
halib/filetype/ipynb.py
|
|
@@ -25,25 +44,6 @@ halib/online/gdrive.py
|
|
|
25
44
|
halib/online/gdrive_mkdir.py
|
|
26
45
|
halib/online/projectmake.py
|
|
27
46
|
halib/online/tele_noti.py
|
|
28
|
-
halib/research/__init__.py
|
|
29
|
-
halib/research/core/__init__.py
|
|
30
|
-
halib/research/core/base_config.py
|
|
31
|
-
halib/research/core/base_exp.py
|
|
32
|
-
halib/research/core/param_gen.py
|
|
33
|
-
halib/research/core/wandb_op.py
|
|
34
|
-
halib/research/data/__init__.py
|
|
35
|
-
halib/research/data/dataclass_util.py
|
|
36
|
-
halib/research/data/dataset.py
|
|
37
|
-
halib/research/data/torchloader.py
|
|
38
|
-
halib/research/perf/__init__.py
|
|
39
|
-
halib/research/perf/flop_calc.py
|
|
40
|
-
halib/research/perf/gpu_mon.py
|
|
41
|
-
halib/research/perf/perfcalc.py
|
|
42
|
-
halib/research/perf/perfmetrics.py
|
|
43
|
-
halib/research/perf/perftb.py
|
|
44
|
-
halib/research/perf/profiler.py
|
|
45
|
-
halib/research/viz/__init__.py
|
|
46
|
-
halib/research/viz/plot.py
|
|
47
47
|
halib/system/__init__.py
|
|
48
48
|
halib/system/cmd.py
|
|
49
49
|
halib/system/filesys.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|