liblaf.cherries
¤
Modules:
Classes:
-
BaseConfig
– -
Plugin
– -
Run
–.
Functions:
-
as_os_path
– -
as_path
– -
as_posix
– -
data
– -
end
– -
entrypoint
– -
exp_dir
– -
git_root
– -
git_root_safe
– -
input
– -
output
– -
params
– -
path
– -
run
– -
src
– -
start
–
Attributes:
-
active_run
(Run
) – -
log_asset
– -
log_input
– -
log_metric
– -
log_metrics
– -
log_other
– -
log_others
– -
log_output
– -
log_parameter
– -
log_parameters
–
BaseConfig
¤
Bases: BaseSettings
Attributes:
model_config
class-attribute
instance-attribute
¤
model_config = SettingsConfigDict(cli_parse_args=True)
Plugin
¤
Parameters:
-
plugins
(dict[str, str]
, default:<class 'dict'>
) –dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
Methods:
-
delegate
– -
plugin_id_cls
– -
register
–
Attributes:
plugins
class-attribute
instance-attribute
¤
delegate
¤
delegate(
method: MethodName,
args: Sequence[Any] = (),
kwargs: Mapping[str, Any] = {},
*,
first_result: bool = False,
) -> Any
Source code in src/liblaf/cherries/core/_plugin.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
Run
¤
Bases: Plugin
.
Parameters:
-
plugins
(dict[str, str]
, default:<class 'dict'>
) –dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)
Methods:
-
delegate
– -
end
– -
get_others
– -
get_params
– -
get_url
– -
log_asset
– -
log_input
– -
log_metric
– -
log_metrics
– -
log_other
– -
log_others
– -
log_output
– -
log_parameter
– -
log_parameters
– -
plugin_id_cls
– -
register
– -
start
–
Attributes:
-
data_dir
(Path
) – -
entrypoint
(Path
) – -
exp_dir
(Path
) – -
name
(str
) – -
params
(Mapping[str, Any]
) – -
plugin_id
(str
) – -
plugin_root
(Self
) – -
plugins
(dict[str, Plugin]
) – -
project_name
(str | None
) – -
root_dir
(Path
) – -
start_time
(datetime
) – -
url
(str
) –
plugins
class-attribute
instance-attribute
¤
delegate
¤
delegate(
method: MethodName,
args: Sequence[Any] = (),
kwargs: Mapping[str, Any] = {},
*,
first_result: bool = False,
) -> Any
Source code in src/liblaf/cherries/core/_plugin.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
end
¤
end(*args, **kwargs) -> None
Source code in src/liblaf/cherries/core/_run.py
92 93 |
|
get_others
¤
Source code in src/liblaf/cherries/core/_run.py
95 96 |
|
get_params
¤
Source code in src/liblaf/cherries/core/_run.py
98 99 |
|
get_url
¤
get_url() -> str
Source code in src/liblaf/cherries/core/_run.py
101 102 |
|
log_asset
¤
log_asset(
path: PathLike,
name: PathLike | None = None,
*,
metadata: Mapping[str, Any] | None = None,
**kwargs,
) -> None
Source code in src/liblaf/cherries/core/_run.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
|
log_input
¤
log_input(
path: PathLike,
name: PathLike | None = None,
*,
metadata: Mapping[str, Any] | None = None,
**kwargs,
) -> None
Source code in src/liblaf/cherries/core/_run.py
119 120 121 122 123 124 125 126 127 |
|
log_metric
¤
log_metric(
name: str,
value: Any,
/,
step: int | None = None,
epoch: int | None = None,
**kwargs,
) -> None
Source code in src/liblaf/cherries/core/_run.py
129 130 131 132 133 134 135 136 137 138 |
|
log_metrics
¤
log_metrics(
dic: Mapping[str, Any],
/,
prefix: str | None = None,
step: int | None = None,
epoch: int | None = None,
**kwargs,
) -> None
Source code in src/liblaf/cherries/core/_run.py
140 141 142 143 144 145 146 147 148 149 |
|
log_other
¤
Source code in src/liblaf/cherries/core/_run.py
151 152 |
|
log_others
¤
Source code in src/liblaf/cherries/core/_run.py
154 155 |
|
log_output
¤
log_output(
path: PathLike,
name: PathLike | None = None,
*,
metadata: Mapping[str, Any] | None = None,
**kwargs,
) -> None
Source code in src/liblaf/cherries/core/_run.py
157 158 159 160 161 162 163 164 165 |
|
log_parameter
¤
Source code in src/liblaf/cherries/core/_run.py
167 168 169 170 |
|
log_parameters
¤
log_parameters(
parameters: Mapping[Any, Any],
/,
prefix: str | None = None,
step: int | None = None,
**kwargs,
) -> None
Source code in src/liblaf/cherries/core/_run.py
172 173 174 175 176 177 178 179 180 |
|
plugin_id_cls
classmethod
¤
plugin_id_cls() -> str
Source code in src/liblaf/cherries/core/_plugin.py
21 22 23 |
|
register
¤
register(plugin: Plugin) -> None
Source code in src/liblaf/cherries/core/_plugin.py
58 59 60 |
|
start
¤
start(*args, **kwargs) -> None
Source code in src/liblaf/cherries/core/_run.py
182 183 184 185 |
|
as_os_path
¤
as_os_path(path: PathLike) -> str
as_os_path(path: None) -> None
as_os_path(path: PathLike | None) -> str | None
Source code in src/liblaf/cherries/paths/_convert.py
11 12 13 14 |
|
as_path
¤
as_path(path: PathLike) -> Path
as_path(path: None) -> None
as_path(path: PathLike | None) -> Path | None
Source code in src/liblaf/cherries/paths/_convert.py
21 22 23 24 |
|
as_posix
¤
as_posix(path: PathLike) -> str
as_posix(path: None) -> None
as_posix(path: PathLike | None) -> str | None
Source code in src/liblaf/cherries/paths/_convert.py
31 32 33 34 35 36 |
|
data
¤
Source code in src/liblaf/cherries/paths/_special.py
14 15 |
|
end
¤
end() -> None
Source code in src/liblaf/cherries/_entrypoint.py
12 13 |
|
entrypoint
¤
Source code in src/liblaf/cherries/paths/_path.py
12 13 14 15 16 |
|
exp_dir
¤
Source code in src/liblaf/cherries/paths/_path.py
35 36 37 38 39 |
|
git_root
¤
git_root() -> Path
Source code in src/liblaf/cherries/paths/_path.py
19 20 21 22 23 |
|
git_root_safe
¤
git_root_safe() -> Path
Source code in src/liblaf/cherries/paths/_path.py
26 27 28 29 30 31 32 |
|
input
¤
input(
path: PathLike,
extra: PathGenerator | None = None,
**kwargs,
) -> Path
Source code in src/liblaf/cherries/config/_asset.py
63 64 65 66 |
|
output
¤
output(
path: PathLike,
extra: PathGenerator | None = None,
**kwargs,
) -> Path
Source code in src/liblaf/cherries/config/_asset.py
89 90 91 92 |
|
params
¤
Source code in src/liblaf/cherries/paths/_special.py
18 19 20 21 |
|
path
¤
Source code in src/liblaf/cherries/paths/_special.py
24 25 |
|
run
¤
run(
main: Callable[..., run[T]],
*,
profile: ProfileLike | None = None,
) -> run[T]
Source code in src/liblaf/cherries/_entrypoint.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|
src
¤
Source code in src/liblaf/cherries/paths/_special.py
28 29 |
|
start
¤
start(profile: ProfileLike | None = None) -> Run
Source code in src/liblaf/cherries/_entrypoint.py
38 39 40 41 42 43 44 45 46 |
|