halib 0.2.3__py3-none-any.whl → 0.2.4__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.
@@ -8,7 +8,7 @@ from dataclasses import dataclass
8
8
  from dataclass_wizard import YAMLWizard
9
9
 
10
10
 
11
- class NamedConfig(ABC):
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 AutoNamedConfig(YAMLWizard, NamedConfig):
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=AutoNamedConfig)
45
+ T = TypeVar("T", bound=AutoNamedCfg)
46
46
 
47
- class BaseSelectorConfig(Generic[T]):
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 ExpBaseConfig(ABC, YAMLWizard):
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) -> NamedConfig:
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) -> NamedConfig:
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 ExpBaseConfig
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 BaseExperiment(PerfCalc, ABC):
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: ExpBaseConfig):
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
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,7 +53,7 @@ Dynamic: summary
53
53
 
54
54
  # Helper package for coding and automation
55
55
 
56
- **Version 0.2.3**
56
+ **Version 0.2.4**
57
57
  + reorganize packages with most changes in `research` package; also rename `research` to `exp` (package for experiment management and utilities)
58
58
 
59
59
  **Version 0.2.1**
@@ -21,8 +21,8 @@ halib/common/common.py,sha256=olkeXdFdojOkySP5aurzxKlehngRwBHdNBw5JfE4_fQ,5038
21
21
  halib/common/rich_color.py,sha256=tyK5fl3Dtv1tKsfFzt_5Rco4Fj72QliA-w5aGXaVuqQ,6392
22
22
  halib/exp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  halib/exp/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- halib/exp/core/base_config.py,sha256=FXYFFGKry-HwNrjlPlTeTB-ROhM1Bow5Xxems2fdW5k,4204
25
- halib/exp/core/base_exp.py,sha256=6CpuTP43NA7gE5JUN4V_-UAKHrlzLPJNI8piCBh3p1s,5734
24
+ halib/exp/core/base_config.py,sha256=MtkbToF078imMcsna5Dlv9q4ORKRKkOUCERX7JbVdzM,4180
25
+ halib/exp/core/base_exp.py,sha256=Z4YbioNUmor1QGQGc86ePCkbGueauLHy2YRGupphFcg,5721
26
26
  halib/exp/core/param_gen.py,sha256=I9JHrDCaep4CjvApDoX0QzFuw38zMC2PsDFueuA7pjM,4271
27
27
  halib/exp/core/wandb_op.py,sha256=powL2QyLBqF-6PUGAOqd60s1npHLLKJxPns3S4hKeNo,4160
28
28
  halib/exp/data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -101,8 +101,8 @@ halib/utils/list.py,sha256=BM-8sRhYyqF7bh4p7TQtV7P_gnFruUCA6DTUOombaZg,337
101
101
  halib/utils/listop.py,sha256=Vpa8_2fI0wySpB2-8sfTBkyi_A4FhoFVVvFiuvW8N64,339
102
102
  halib/utils/tele_noti.py,sha256=-4WXZelCA4W9BroapkRyIdUu9cUVrcJJhegnMs_WpGU,5928
103
103
  halib/utils/video.py,sha256=zLoj5EHk4SmP9OnoHjO8mLbzPdtq6gQPzTQisOEDdO8,3261
104
- halib-0.2.3.dist-info/licenses/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
105
- halib-0.2.3.dist-info/METADATA,sha256=GkkXjVbMcu6mKJYyS-ItFgO3J0an9QAroGYvd36G9Yk,6714
106
- halib-0.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
- halib-0.2.3.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
108
- halib-0.2.3.dist-info/RECORD,,
104
+ halib-0.2.4.dist-info/licenses/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
105
+ halib-0.2.4.dist-info/METADATA,sha256=MdF16q_kQjcTgG-Tc4v1D7VYOYqkbl-orYED7-m1JTU,6714
106
+ halib-0.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
107
+ halib-0.2.4.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
108
+ halib-0.2.4.dist-info/RECORD,,
File without changes