Skip to content

Commit

Permalink
more fixes to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobronzi committed Oct 2, 2024
1 parent 4a9f10a commit 1f0daec
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
5 changes: 2 additions & 3 deletions amlrt_project/models/model_loader.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import logging
from typing import Any, Dict, Optional, Type, Union

from amlrt_project.models.factory import (AdamFactory, OptimFactory,
PlateauFactory, SchedulerFactory,
SGDFactory, WarmupDecayFactory)
from amlrt_project.models.factory import SGDFactory, AdamFactory, PlateauFactory, \
WarmupDecayFactory, OptimFactory, SchedulerFactory
from amlrt_project.models.my_model import SimpleMLP

logger = logging.getLogger(__name__)
Expand Down
5 changes: 2 additions & 3 deletions amlrt_project/models/my_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import pytorch_lightning as pl
from torch import FloatTensor, LongTensor, nn

from amlrt_project.models.factory import (OptimFactory,
OptimizerConfigurationFactory,
SchedulerFactory)
from amlrt_project.models.factory import OptimFactory, OptimizerConfigurationFactory, \
SchedulerFactory
from amlrt_project.models.optim import load_loss
from amlrt_project.utils.hp_utils import check_and_log_hp

Expand Down
5 changes: 2 additions & 3 deletions amlrt_project/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
add_config_file_params_to_argparser, load_configs, save_hparams)
from amlrt_project.utils.file_utils import rsync_folder
from amlrt_project.utils.hp_utils import check_and_log_hp
from amlrt_project.utils.logging_utils import (load_experiment_loggers,
log_exp_details,
log_hyper_parameters)
from amlrt_project.utils.logging_utils import load_experiment_loggers, log_exp_details, \
log_hyper_parameters
from amlrt_project.utils.reproducibility_utils import set_seed

logger = logging.getLogger(__name__)
Expand Down
1 change: 0 additions & 1 deletion hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ set -e
# linting
flake8 --ignore D . # Check everything but docstrings
flake8 --select D --exclude tests/ # Check only the docstrings
isort --check . # Check imports

# Raise error if any staged notebooks contain outputs
GITDIR=$(git rev-parse --show-toplevel) # Full path to git working directory
Expand Down

0 comments on commit 1f0daec

Please sign in to comment.