Skip to content

Commit

Permalink
chore: bump ci versions, fixed linting
Browse files Browse the repository at this point in the history
  • Loading branch information
sehoffmann committed Mar 28, 2024
1 parent e142bd3 commit 19e45c9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer

- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py37-plus]

- repo: https://github.com/omnilib/ufmt
rev: v2.0.1
rev: v2.5.1
hooks:
- id: ufmt
additional_dependencies:
- black == 23.1.0
- usort == 1.1.0b2

- repo: https://github.com/pycqa/flake8
rev: 4.0.1
rev: 7.0.0
hooks:
- id: flake8
4 changes: 2 additions & 2 deletions dmlcloud/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def register_model(

if verbose:
msg = f'Model "{name}":\n'
msg += f' - Parameters: {sum(p.numel() for p in model.parameters())/1e6:.1f} kk\n'
msg += f' - Parameters: {sum(p.numel() for p in model.parameters()) / 1e6:.1f} kk\n'
msg += f' - DDP: {use_ddp}\n'
msg += f' - {model}'
self.logger.info(msg)
Expand Down Expand Up @@ -231,7 +231,7 @@ def _pre_run(self):
self._resume_run()

diagnostics = general_diagnostics()
diagnostics += '\n* CONFIG:\n'
diagnostics += '\n* CONFIG:\n'
diagnostics += '\n'.join(f' {line}' for line in OmegaConf.to_yaml(self.config, resolve=True).splitlines())
self.logger.info(diagnostics)

Expand Down
4 changes: 2 additions & 2 deletions dmlcloud/util/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def sharded_xr_dataset(
start = chunk_idx * chunk_size
end = start + chunk_size
chunk = ds.isel({dim: slice(start, end)})

if load:
kwargs = load_kwargs or {}
chunk.load(**kwargs)
Expand Down Expand Up @@ -123,7 +123,7 @@ def interleave_batches(
"""
if num_batches < 1:
raise ValueError('num_batches must be greater than 0')

if num_batches == 1:
yield from iterable

Expand Down

0 comments on commit 19e45c9

Please sign in to comment.