Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ruff. Fix PLE & LOG lints #3050

Merged
merged 3 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ default_language_version:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.282
rev: v0.2.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion composer/cli/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def main():
args = _parse_args()

logging.basicConfig()
log.setLevel(logging.INFO if args.verbose else logging.WARN)
log.setLevel(logging.INFO if args.verbose else logging.WARNING)

processes = {}

Expand Down
2 changes: 1 addition & 1 deletion composer/profiler/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ def export_memory_timeline_html(prof: TorchProfile,

with open(path, 'w') as f:
f.write(html)
log.debug('Memory timeline exported to', path, '.')
log.debug('Memory timeline exported to %s.', path)
Skylion007 marked this conversation as resolved.
Show resolved Hide resolved
remove(tmpfile.name)
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@ line_length = 120
skip = [ "env", "wandb", "runs", "build", "node_modules" ]
known_third_party = ["wandb"]

[tool.ruff]
[tool.ruff.lint]
select = [
"C4",
# TODO port pydocstyle
# "D", # pydocstyle
"LOG",
"PERF",
"PLE",
]

ignore = [
"C408",
"PERF2",
"PERF4",
]
[tool.ruff]
exclude = [
"build/**",
"docs/**",
Expand Down
Loading