fluxloop-cli 0.2.9__tar.gz → 0.2.10__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.
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/PKG-INFO +1 -1
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/__init__.py +1 -1
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/arg_binder.py +34 -1
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli.egg-info/PKG-INFO +1 -1
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/pyproject.toml +1 -1
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/README.md +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/commands/__init__.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/commands/config.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/commands/generate.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/commands/init.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/commands/parse.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/commands/record.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/commands/run.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/commands/status.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/config_loader.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/config_schema.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/constants.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/input_generator.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/llm_generator.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/main.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/project_paths.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/runner.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/target_loader.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/templates.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli/validators.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli.egg-info/SOURCES.txt +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli.egg-info/dependency_links.txt +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli.egg-info/entry_points.txt +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli.egg-info/requires.txt +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/fluxloop_cli.egg-info/top_level.txt +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/setup.cfg +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/tests/test_arg_binder.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/tests/test_config_command.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/tests/test_input_generator.py +0 -0
- {fluxloop_cli-0.2.9 → fluxloop_cli-0.2.10}/tests/test_target_loader.py +0 -0
|
@@ -7,6 +7,25 @@ import json
|
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
from typing import Any, Callable, Dict, Optional
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
class _AttrDict(dict):
|
|
12
|
+
"""Dictionary that also supports attribute access for keys."""
|
|
13
|
+
|
|
14
|
+
def __getattr__(self, item: str) -> Any: # type: ignore[override]
|
|
15
|
+
try:
|
|
16
|
+
return self[item]
|
|
17
|
+
except KeyError as exc: # pragma: no cover
|
|
18
|
+
raise AttributeError(item) from exc
|
|
19
|
+
|
|
20
|
+
def __setattr__(self, key: str, value: Any) -> None: # type: ignore[override]
|
|
21
|
+
self[key] = value
|
|
22
|
+
|
|
23
|
+
def __delattr__(self, item: str) -> None: # type: ignore[override]
|
|
24
|
+
try:
|
|
25
|
+
del self[item]
|
|
26
|
+
except KeyError as exc: # pragma: no cover
|
|
27
|
+
raise AttributeError(item) from exc
|
|
28
|
+
|
|
10
29
|
from fluxloop.schemas import ExperimentConfig, ReplayArgsConfig
|
|
11
30
|
|
|
12
31
|
|
|
@@ -97,7 +116,7 @@ class ArgBinder:
|
|
|
97
116
|
|
|
98
117
|
self._restore_callables(kwargs, replay)
|
|
99
118
|
self._ensure_no_unmapped_callables(kwargs, replay)
|
|
100
|
-
return kwargs
|
|
119
|
+
return self._hydrate_structures(kwargs)
|
|
101
120
|
|
|
102
121
|
return self._bind_by_signature(func, runtime_input)
|
|
103
122
|
|
|
@@ -157,6 +176,20 @@ class ArgBinder:
|
|
|
157
176
|
f"{', '.join(missing)}. Configure them under replay_args.callable_providers."
|
|
158
177
|
)
|
|
159
178
|
|
|
179
|
+
def _hydrate_structures(self, payload: Dict[str, Any]) -> Dict[str, Any]:
|
|
180
|
+
return {key: self._hydrate_value(value) for key, value in payload.items()}
|
|
181
|
+
|
|
182
|
+
def _hydrate_value(self, value: Any) -> Any:
|
|
183
|
+
if callable(value):
|
|
184
|
+
return value
|
|
185
|
+
if isinstance(value, _AttrDict):
|
|
186
|
+
return value
|
|
187
|
+
if isinstance(value, dict):
|
|
188
|
+
return _AttrDict({k: self._hydrate_value(v) for k, v in value.items()})
|
|
189
|
+
if isinstance(value, list):
|
|
190
|
+
return [self._hydrate_value(item) for item in value]
|
|
191
|
+
return value
|
|
192
|
+
|
|
160
193
|
def _resolve_builtin_callable(self, provider: str, marker: str) -> Callable:
|
|
161
194
|
is_async = marker.endswith(":async>")
|
|
162
195
|
|
|
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
|