Created Dynamic KV Overrides (markdown)

leafspark 2024-08-04 18:07:48 -07:00
parent 7f36cc774b
commit 22e2e2f04f
1 changed files with 18 additions and 0 deletions

18
Dynamic-KV-Overrides.md Normal file

@ -0,0 +1,18 @@
Simply use one of these as the text in your `str` override:
```python
dynamic_params = {
{system.time.milliseconds}": lambda: str(int(time.time() * 1000)),
{system.time.seconds}": lambda: str(int(time.time())),
{system.date.iso}": lambda: datetime.now().strftime("%Y-%m-%d"),
{system.datetime.iso}": lambda: datetime.now().isoformat(),
{system.username}": lambda: os.getlogin(),
{system.hostname}": lambda: socket.gethostname(),
{system.platform}": lambda: platform.system(),
{system.python.version}": lambda: platform.python_version(),
{system.time.milliseconds}": lambda: str(int(time.time() * 1000)),
{system.date}": lambda: datetime.now().strftime("%Y-%m-%d"),
{model.name}": lambda: model_name if model_name is not None else "Unknown Model",
{quant.type}": lambda: quant_type if quant_type is not None else "Unknown Quant",
{output.path}": lambda: output_path if output_path is not None else "Unknown Output Path",
}
```