libinephany 0.19.0__py3-none-any.whl → 1.0.1__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.
- libinephany/observations/observers/base_observers.py +20 -8
- libinephany/observations/observers/global_observers/gradient_observers.py +15 -16
- libinephany/observations/observers/global_observers/hyperparameter_observers.py +26 -18
- libinephany/observations/observers/global_observers/model_observers.py +18 -20
- libinephany/observations/observers/global_observers/progress_observers.py +7 -1
- libinephany/observations/observers/local_observers.py +35 -28
- libinephany/observations/statistic_trackers.py +52 -237
- libinephany/pydantic_models/schemas/tensor_statistics.py +33 -32
- libinephany/pydantic_models/states/hyperparameter_states.py +32 -30
- libinephany/utils/enums.py +6 -0
- {libinephany-0.19.0.dist-info → libinephany-1.0.1.dist-info}/METADATA +1 -1
- {libinephany-0.19.0.dist-info → libinephany-1.0.1.dist-info}/RECORD +15 -15
- {libinephany-0.19.0.dist-info → libinephany-1.0.1.dist-info}/WHEEL +0 -0
- {libinephany-0.19.0.dist-info → libinephany-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {libinephany-0.19.0.dist-info → libinephany-1.0.1.dist-info}/top_level.txt +0 -0
@@ -295,52 +295,52 @@ class HyperparameterContainer(BaseModel):
|
|
295
295
|
f"{self.get_hyperparameters()}."
|
296
296
|
)
|
297
297
|
|
298
|
-
def get_initial_internal_values(self,
|
298
|
+
def get_initial_internal_values(self, include_hparams: list[str] | None = None) -> dict[str, float | int | None]:
|
299
299
|
"""
|
300
|
-
:param
|
301
|
-
|
300
|
+
:param include_hparams: Names of the hyperparameters to include in the hyperparameter name to initial internal
|
301
|
+
value mapping.
|
302
302
|
:return: Dictionary mapping hyperparameter names to their current values for this parameter group.
|
303
303
|
"""
|
304
304
|
|
305
|
-
if
|
306
|
-
|
305
|
+
if include_hparams is None:
|
306
|
+
include_hparams = list(self.model_fields.keys())
|
307
307
|
|
308
308
|
return {
|
309
309
|
field_name: field_value.initial_internal_value
|
310
310
|
for field_name, field_value in self.__dict__.items()
|
311
|
-
if isinstance(field_value, Hyperparameter) and field_name
|
311
|
+
if isinstance(field_value, Hyperparameter) and field_name in include_hparams
|
312
312
|
}
|
313
313
|
|
314
|
-
def get_current_internal_values(self,
|
314
|
+
def get_current_internal_values(self, include_hparams: list[str] | None = None) -> dict[str, float | int | None]:
|
315
315
|
"""
|
316
|
-
:param
|
317
|
-
|
316
|
+
:param include_hparams: Names of the hyperparameters to include in the hyperparameter name to current internal
|
317
|
+
value mapping.
|
318
318
|
:return: Dictionary mapping hyperparameter names to their current values for this parameter group.
|
319
319
|
"""
|
320
320
|
|
321
|
-
if
|
322
|
-
|
321
|
+
if include_hparams is None:
|
322
|
+
include_hparams = list(self.model_fields.keys())
|
323
323
|
|
324
324
|
return {
|
325
325
|
field_name: field_value.current_internal_value
|
326
326
|
for field_name, field_value in self.__dict__.items()
|
327
|
-
if isinstance(field_value, Hyperparameter) and field_name
|
327
|
+
if isinstance(field_value, Hyperparameter) and field_name in include_hparams
|
328
328
|
}
|
329
329
|
|
330
|
-
def get_current_deltas(self,
|
330
|
+
def get_current_deltas(self, include_hparams: list[str] | None = None) -> dict[str, float | int | None]:
|
331
331
|
"""
|
332
|
-
:param
|
333
|
-
|
332
|
+
:param include_hparams: Names of the hyperparameters to include in the hyperparameter name to current delta
|
333
|
+
mapping.
|
334
334
|
:return: Dictionary mapping hyperparameter names to their current deltas for this parameter group.
|
335
335
|
"""
|
336
336
|
|
337
|
-
if
|
338
|
-
|
337
|
+
if include_hparams is None:
|
338
|
+
include_hparams = list(self.model_fields.keys())
|
339
339
|
|
340
340
|
return {
|
341
341
|
field_name: field_value.current_delta
|
342
342
|
for field_name, field_value in self.__dict__.items()
|
343
|
-
if isinstance(field_value, Hyperparameter) and field_name
|
343
|
+
if isinstance(field_value, Hyperparameter) and field_name in include_hparams
|
344
344
|
}
|
345
345
|
|
346
346
|
def set_internal_values(self, internal_values: dict[str, float | int | None]) -> None:
|
@@ -440,19 +440,21 @@ class ParameterGroupHParams(HyperparameterContainer):
|
|
440
440
|
)
|
441
441
|
|
442
442
|
def get_hyperparameter_transform_types(
|
443
|
-
self,
|
443
|
+
self, include_hparams: list[str] | None = None
|
444
444
|
) -> dict[str, HyperparameterTransformType]:
|
445
445
|
"""
|
446
|
+
:param include_hparams: Names of the hyperparameters to include in the hyperparameter name to transform type
|
447
|
+
mapping.
|
446
448
|
:return: Dictionary mapping hyperparameter names to their transform type for this parameter group.
|
447
449
|
"""
|
448
450
|
|
449
|
-
if
|
450
|
-
|
451
|
+
if include_hparams is None:
|
452
|
+
include_hparams = list(self.model_fields.keys())
|
451
453
|
|
452
454
|
return {
|
453
455
|
field_name: field_value.transform_type
|
454
456
|
for field_name, field_value in self.__dict__.items()
|
455
|
-
if isinstance(field_value, Hyperparameter) and field_name
|
457
|
+
if isinstance(field_value, Hyperparameter) and field_name in include_hparams
|
456
458
|
}
|
457
459
|
|
458
460
|
|
@@ -839,15 +841,15 @@ class HyperparameterStates(BaseModel):
|
|
839
841
|
for parameter_group_hparams in self.parameter_group_hparams.values():
|
840
842
|
parameter_group_hparams.set_to_initial_values()
|
841
843
|
|
842
|
-
def get_initial_internal_values(self,
|
844
|
+
def get_initial_internal_values(self, include_hparams: list[str] | None = None) -> dict[str, float | int | None]:
|
843
845
|
"""
|
844
|
-
:param
|
846
|
+
:param include_hparams: Hyperparameters to include while retrieving initial values.
|
845
847
|
:return: Dictionary mapping hyperparameter names to their initial values at the start of training.
|
846
848
|
"""
|
847
849
|
|
848
850
|
initial_internal_values = {
|
849
|
-
**self.global_hparams.get_initial_internal_values(
|
850
|
-
**next(iter(self.parameter_group_hparams.values())).get_initial_internal_values(
|
851
|
+
**self.global_hparams.get_initial_internal_values(include_hparams),
|
852
|
+
**next(iter(self.parameter_group_hparams.values())).get_initial_internal_values(include_hparams),
|
851
853
|
}
|
852
854
|
initial_internal_values = {
|
853
855
|
hparam_name: initial_internal_values.get(hparam_name, None)
|
@@ -856,15 +858,15 @@ class HyperparameterStates(BaseModel):
|
|
856
858
|
|
857
859
|
return initial_internal_values
|
858
860
|
|
859
|
-
def get_current_internal_values(self,
|
861
|
+
def get_current_internal_values(self, include_hparams: list[str] | None = None) -> dict[str, float | int | None]:
|
860
862
|
"""
|
861
|
-
:param
|
863
|
+
:param include_hparams: Hyperparameters to include while retrieving current values.
|
862
864
|
:return: Dictionary mapping hyperparameter names to their current values during training.
|
863
865
|
"""
|
864
866
|
|
865
867
|
current_internal_values = {
|
866
|
-
**self.global_hparams.get_current_internal_values(
|
867
|
-
**next(iter(self.parameter_group_hparams.values())).get_current_internal_values(
|
868
|
+
**self.global_hparams.get_current_internal_values(include_hparams),
|
869
|
+
**next(iter(self.parameter_group_hparams.values())).get_current_internal_values(include_hparams),
|
868
870
|
}
|
869
871
|
current_internal_values = {
|
870
872
|
hparam_name: current_internal_values.get(hparam_name, None)
|
libinephany/utils/enums.py
CHANGED
@@ -6,19 +6,19 @@ libinephany/observations/observation_utils.py,sha256=JSNJYEi2d-VQ0ZovfHrn28RDv41
|
|
6
6
|
libinephany/observations/observer_pipeline.py,sha256=_xA4vrijhG8-9MCtGXnKAEmpd6q0nKVpJgY_qSbypIA,12979
|
7
7
|
libinephany/observations/pipeline_coordinator.py,sha256=mLfaHhkXVhMp9w5jWIAL3jPyauCM-795qOzyqwGOSdw,7932
|
8
8
|
libinephany/observations/statistic_manager.py,sha256=LLg1zSxnJr2oQQepYla3qoUuRy10rsthr9jta4wEbnc,8956
|
9
|
-
libinephany/observations/statistic_trackers.py,sha256=
|
9
|
+
libinephany/observations/statistic_trackers.py,sha256=F98V-H2Ljx0v2YnppYCCJLJojL6pzYBdbBh8Lb4lasA,47666
|
10
10
|
libinephany/observations/observers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
11
|
-
libinephany/observations/observers/base_observers.py,sha256=
|
12
|
-
libinephany/observations/observers/local_observers.py,sha256=
|
11
|
+
libinephany/observations/observers/base_observers.py,sha256=9YI_jkivoCjyPtNSn3VnPADF1VqwGdHPkgi1kDzed3Y,16516
|
12
|
+
libinephany/observations/observers/local_observers.py,sha256=yBXmuCaDZotJPmBZKdrPfGYtVO-CCvT5ZS0KvROOcE4,45657
|
13
13
|
libinephany/observations/observers/observer_containers.py,sha256=VNyqGgxYJ4r49Msp_kk-POgicb-_5w54twuT1qfNdxw,9562
|
14
14
|
libinephany/observations/observers/global_observers/__init__.py,sha256=87WHRPYmL0tVsaTKUd91pwEpCZtHPSKRQoba2VQjswA,3018
|
15
15
|
libinephany/observations/observers/global_observers/base_classes.py,sha256=CCkRx86Lll3gFzfqervP0jKdzNFKkKU7tEBh8ic1Yrc,8249
|
16
16
|
libinephany/observations/observers/global_observers/constants.py,sha256=C_PwYhKxatJxNe5Jzb1tpoiRXAxxPrGkcdQBMQD8msY,1139
|
17
|
-
libinephany/observations/observers/global_observers/gradient_observers.py,sha256=
|
18
|
-
libinephany/observations/observers/global_observers/hyperparameter_observers.py,sha256=
|
17
|
+
libinephany/observations/observers/global_observers/gradient_observers.py,sha256=ZeujBhKeq8adw_J13omurjZnfloiadMYkiPuXYUZ8BU,20972
|
18
|
+
libinephany/observations/observers/global_observers/hyperparameter_observers.py,sha256=o035-nSfjj7dy7Pz1IxpAqvU3tYQraxQd8Pttknxa6A,15034
|
19
19
|
libinephany/observations/observers/global_observers/loss_observers.py,sha256=FlSuJqAJIXcAS_ypdZna6xxz89glI23A6D00sDn7ZLU,18508
|
20
|
-
libinephany/observations/observers/global_observers/model_observers.py,sha256=
|
21
|
-
libinephany/observations/observers/global_observers/progress_observers.py,sha256=
|
20
|
+
libinephany/observations/observers/global_observers/model_observers.py,sha256=HVNHnqk2uuXkmP8y3SL-IQ0AYArfXc7b-wckv9X7qbM,28457
|
21
|
+
libinephany/observations/observers/global_observers/progress_observers.py,sha256=ypLk1_POAjA8V8rAaQ0B6Qh8m_04s9PAoXsw1KxVrLg,5872
|
22
22
|
libinephany/observations/post_processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
23
|
libinephany/observations/post_processors/postprocessors.py,sha256=43_e5UaDPr2KbAvqc_w3wLqnlm7bgRjqgCtyQ95-8cM,5913
|
24
24
|
libinephany/pydantic_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -32,9 +32,9 @@ libinephany/pydantic_models/schemas/inner_task_profile.py,sha256=Xu0tQmhGwV043tT
|
|
32
32
|
libinephany/pydantic_models/schemas/observation_models.py,sha256=MLhxqDet9Yol1D5mkQGQsQT23sm37AStRLnPc4sgcZc,2110
|
33
33
|
libinephany/pydantic_models/schemas/request_schemas.py,sha256=VED8eAUvBofxeAx9gWU8DyCZOTVD3QsHRq-TO7kyOqk,1260
|
34
34
|
libinephany/pydantic_models/schemas/response_schemas.py,sha256=SKFuasdjX5aH_I0vT3SwnpwhyMf9cNPB1ZpDeAGgoO8,2158
|
35
|
-
libinephany/pydantic_models/schemas/tensor_statistics.py,sha256=
|
35
|
+
libinephany/pydantic_models/schemas/tensor_statistics.py,sha256=hWl52SxPYHFBXUwwZ9X7E1iFhuxGsPypd14hFTx91jw,8166
|
36
36
|
libinephany/pydantic_models/states/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
37
|
-
libinephany/pydantic_models/states/hyperparameter_states.py,sha256=
|
37
|
+
libinephany/pydantic_models/states/hyperparameter_states.py,sha256=Esi1xdrH9xOJwhpSezkfbTzbKX4O26IpN5zzkWD3Mf8,33779
|
38
38
|
libinephany/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
39
|
libinephany/utils/agent_utils.py,sha256=_2w1AY5Y4mQ5hes_Rq014VhZXOtIOn-W92mZgeixv3g,2658
|
40
40
|
libinephany/utils/asyncio_worker.py,sha256=Ew23zKIbG1zwyCudcyiObMrw4G0f3p2QXzZfM4mePqI,2751
|
@@ -42,7 +42,7 @@ libinephany/utils/backend_statuses.py,sha256=ZbpBPbz0qKmeqxyGGN_ePTrQ7Wrxh7KM6W2
|
|
42
42
|
libinephany/utils/constants.py,sha256=XAOuPowvM4FDSbfvNsubKTAqSB84AANX4CoHb7LwgEI,2330
|
43
43
|
libinephany/utils/directory_utils.py,sha256=408unVeE_5_Hm-ZYZuxc9sdvfuU0CgYELX7EzPlPieo,1217
|
44
44
|
libinephany/utils/dropout_utils.py,sha256=X43yCW7Dh1cC5sNnivgS5j1fn871K_RCvxCBTT0YHKg,3392
|
45
|
-
libinephany/utils/enums.py,sha256=
|
45
|
+
libinephany/utils/enums.py,sha256=6fTgUd4EiFh4TzNXjvWX-zx1UKb90emgDaGB5gyAbdo,2977
|
46
46
|
libinephany/utils/error_severities.py,sha256=B9oidqOVaYOe0W6P6GwjpmuDsrkyTX30v1xdiUStCFk,1427
|
47
47
|
libinephany/utils/exceptions.py,sha256=kgwLpHOgy3kciUz_I18xnYsWRtzdonfadUtwG2uDYk8,1823
|
48
48
|
libinephany/utils/import_utils.py,sha256=WzC6V6UIa0nCiU2MekROwG82fWBh9RuVzichtby5EvM,1495
|
@@ -57,8 +57,8 @@ libinephany/utils/typing.py,sha256=rGbaPO3MaUndsWiC_wHzReD_TOLYqb43i01pKN-j7Xs,6
|
|
57
57
|
libinephany/web_apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
58
58
|
libinephany/web_apps/error_logger.py,sha256=gAQIaqerqP4ornXZwFF1cghjnd2mMZEt3aVrTuUCr34,16653
|
59
59
|
libinephany/web_apps/web_app_utils.py,sha256=qiq_lasPipgN1RgRudPJc342kYci8O_4RqppxmIX8NY,4095
|
60
|
-
libinephany-0.
|
61
|
-
libinephany-0.
|
62
|
-
libinephany-0.
|
63
|
-
libinephany-0.
|
64
|
-
libinephany-0.
|
60
|
+
libinephany-1.0.1.dist-info/licenses/LICENSE,sha256=pogfDoMBP07ehIOvWymuWIar8pg2YLUhqOHsJQU3wdc,9250
|
61
|
+
libinephany-1.0.1.dist-info/METADATA,sha256=V6iQ6cRxETVLRSiikWuuQi9CCmSSc7BSsy0M4p0HcwE,8389
|
62
|
+
libinephany-1.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
63
|
+
libinephany-1.0.1.dist-info/top_level.txt,sha256=bYAOXQdJgIoLkO2Ui0kxe7pSYegS_e38u0dMscd7COQ,12
|
64
|
+
libinephany-1.0.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|