Skip to content

Commit

Permalink
Merge pull request #53 from narumiruna/fix-ruff-workflow
Browse files Browse the repository at this point in the history
fix ruff workflow
  • Loading branch information
narumiruna authored May 18, 2024
2 parents 2f7e088 + 3d27049 commit 001b604
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,15 @@ select = [
"I", # isort
# "UP", # pyupgrade
"W", # pycodestyle warnings

]

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]

[tool.ruff.lint.isort]
force-single-line = true
# https://github.com/astral-sh/ruff/issues/10519
known-third-party = ["wandb"]

[tool.pytest.ini_options]
filterwarnings = ["ignore::DeprecationWarning"]
3 changes: 1 addition & 2 deletions template/cli.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import click
import wandb
from mlconfig import instantiate
from mlconfig import load

import wandb


@click.command()
@click.option("-c", "--config-file", type=click.STRING, default="configs/mnist.yaml")
Expand Down
4 changes: 1 addition & 3 deletions template/datasets/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ def __init__(self, root: str, train: bool, batch_size: int, **kwargs):

dataset = datasets.MNIST(root, train=train, transform=transform, download=True)

super(MNISTDataLoader, self).__init__(
dataset=dataset, batch_size=batch_size, shuffle=train, **kwargs
)
super(MNISTDataLoader, self).__init__(dataset=dataset, batch_size=batch_size, shuffle=train, **kwargs)
3 changes: 1 addition & 2 deletions template/trainers/mnist.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
import torch.nn.functional as F
import wandb
from mlconfig import register
from torch.nn import Module
from torch.optim import Optimizer
Expand All @@ -10,8 +11,6 @@
from tqdm import tqdm
from tqdm import trange

import wandb

from .trainer import Trainer


Expand Down

0 comments on commit 001b604

Please sign in to comment.