Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#834)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.1 → v0.5.2](astral-sh/ruff-pre-commit@v0.5.1...v0.5.2)
- [github.com/macisamuele/language-formatters-pre-commit-hooks: v2.13.0 → v2.14.0](macisamuele/language-formatters-pre-commit-hooks@v2.13.0...v2.14.0)

* lint fabric.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ivan Shcheklein <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and shcheklein authored Jul 16, 2024
1 parent 3ae4806 commit e493463
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ repos:
.*\.ipynb
)$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.5.1"
rev: "v0.5.2"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
rev: v2.14.0
hooks:
- id: pretty-format-toml
args: [--autofix, --no-sort]
Expand Down
4 changes: 3 additions & 1 deletion src/dvclive/fabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ def _sanitize_params(params: Dict[str, Any]) -> Dict[str, Any]:
}

# logging of argparse.Namespace is not supported, sanitize as string
params = {k: str(v) if type(v) == Namespace else v for k, v in params.items()}
params = {
k: str(v) if isinstance(v, Namespace) else v for k, v in params.items()
}

return params # noqa: RET504

Expand Down

0 comments on commit e493463

Please sign in to comment.