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:
-
_plugin_parent
(Self | None
, default:None
) –
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:
-
_plugin_parent
(Self | None
, default:None
) –
Methods:
-
delegate
– -
end
– -
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
) – -
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
79 80 |
|
get_url
¤
get_url() -> str
Source code in src/liblaf/cherries/core/_run.py
82 83 |
|
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
85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
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
100 101 102 103 104 105 106 107 108 |
|
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
110 111 112 113 114 115 116 117 118 119 |
|
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
121 122 123 124 125 126 127 128 129 130 |
|
log_other
¤
Source code in src/liblaf/cherries/core/_run.py
132 133 |
|
log_others
¤
Source code in src/liblaf/cherries/core/_run.py
135 136 |
|
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
138 139 140 141 142 143 144 145 146 |
|
log_parameter
¤
Source code in src/liblaf/cherries/core/_run.py
148 149 150 151 |
|
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
153 154 155 156 157 158 159 160 161 |
|
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
163 164 165 166 |
|
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
88 89 90 91 |
|
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[..., T],
*,
profile: ProfileLike | None = None,
) -> 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 |
|