remove unnecessary linters from pre-commit-config
This commit is contained in:
1 parent
3d301977b3
commit
67d531ab67
6 files changed
+24
-58
No files matched your search
@@ -14,7 +14,7 @@ repos:
|
|||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
|
|
||||||
|
|
||||||
# Black - code formatting
|
# Black (code formatting)
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 20.8b1
|
rev: 20.8b1
|
||||||
hooks:
|
hooks:
|
||||||
@@ -22,7 +22,7 @@ repos:
|
|||||||
args: [--force-exclude, train.py]
|
args: [--force-exclude, train.py]
|
||||||
|
|
||||||
|
|
||||||
# Isort - import sorting
|
# Isort (import sorting)
|
||||||
# - repo: https://github.com/PyCQA/isort
|
# - repo: https://github.com/PyCQA/isort
|
||||||
# rev: 5.7.0
|
# rev: 5.7.0
|
||||||
# hooks:
|
# hooks:
|
||||||
@@ -30,9 +30,10 @@ repos:
|
|||||||
# # profiles: https://pycqa.github.io/isort/docs/configuration/profiles/
|
# # profiles: https://pycqa.github.io/isort/docs/configuration/profiles/
|
||||||
# # other flags: https://pycqa.github.io/isort/docs/configuration/options/
|
# # other flags: https://pycqa.github.io/isort/docs/configuration/options/
|
||||||
# args: [--profile, black]
|
# args: [--profile, black]
|
||||||
|
# files: "src/.*"
|
||||||
|
|
||||||
|
|
||||||
# MyPy - static type checking
|
# MyPy (static type checking)
|
||||||
# - repo: https://github.com/pre-commit/mirrors-mypy
|
# - repo: https://github.com/pre-commit/mirrors-mypy
|
||||||
# rev: v0.790
|
# rev: v0.790
|
||||||
# hooks:
|
# hooks:
|
||||||
|
|||||||
+3
-2
@@ -42,8 +42,9 @@ disable_warnings: True
|
|||||||
disable_lightning_logs: False
|
disable_lightning_logs: False
|
||||||
|
|
||||||
|
|
||||||
# output paths for hydra logs
|
# # hydra configuration
|
||||||
hydra:
|
hydra:
|
||||||
|
# output paths for hydra logs
|
||||||
run:
|
run:
|
||||||
dir: logs/runs/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
dir: logs/runs/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
||||||
sweep:
|
sweep:
|
||||||
@@ -51,7 +52,7 @@ hydra:
|
|||||||
subdir: ${hydra.job.num}
|
subdir: ${hydra.job.num}
|
||||||
|
|
||||||
job:
|
job:
|
||||||
# set here your environment variables
|
# set your environment variables here
|
||||||
env_set:
|
env_set:
|
||||||
# currently there are some issues with running sweeps alongside wandb
|
# currently there are some issues with running sweeps alongside wandb
|
||||||
# https://github.com/wandb/client/issues/1314
|
# https://github.com/wandb/client/issues/1314
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
# @package _global_
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
# load everything from main config file
|
|
||||||
- config.yaml
|
|
||||||
|
|
||||||
# override sweeper to Ray!
|
|
||||||
- override hydra/launcher: ray
|
|
||||||
# - override hydra/launcher: ray_aws
|
|
||||||
|
|
||||||
|
|
||||||
hydra:
|
|
||||||
launcher:
|
|
||||||
ray:
|
|
||||||
remote:
|
|
||||||
max_retries: 4
|
|
||||||
# InstanceType: p2.8xlarge
|
|
||||||
# asd
|
|
||||||
|
|
||||||
# sync_up:
|
|
||||||
# # source dir is relative in this case, assuming you are running from
|
|
||||||
# # <project_root>/hydra/plugins/hydra_ray_launcher/example
|
|
||||||
# # absolute path is also supported.
|
|
||||||
# source_dir: '.'
|
|
||||||
# # we leave target_dir to be null
|
|
||||||
# # as a result the files will be synced to a temp dir on remote cluster.
|
|
||||||
# # the temp dir will be cleaned up after the jobs are done.
|
|
||||||
# # recommend to leave target_dir to be null if you are syncing code/artifacts to remote cluster so you don't need
|
|
||||||
# # configure $PYTHONPATH on remote cluster
|
|
||||||
# include: ['model', '*.py']
|
|
||||||
# # No need to sync up config files.
|
|
||||||
# exclude: ['*']
|
|
||||||
# sync_down:
|
|
||||||
# include: ['*.pt', '*/']
|
|
||||||
# # No need to sync down config files.
|
|
||||||
# exclude: ['*']
|
|
||||||
+5
-5
@@ -1,14 +1,14 @@
|
|||||||
# --------- pytorch --------- #
|
# --------- pytorch --------- #
|
||||||
torch>=1.7.1
|
torch>=1.8.0
|
||||||
torchvision>=0.8.2
|
torchvision>=0.9.0
|
||||||
torchaudio>=0.7.2
|
torchaudio>=0.8.0
|
||||||
pytorch-lightning>=1.2.1
|
pytorch-lightning>=1.2.2
|
||||||
|
|
||||||
# --------- hydra --------- #
|
# --------- hydra --------- #
|
||||||
hydra-core==1.1.0.dev3
|
hydra-core==1.1.0.dev3
|
||||||
hydra_colorlog>=1.0.0
|
hydra_colorlog>=1.0.0
|
||||||
hydra-optuna-sweeper>=0.9.0rc2
|
hydra-optuna-sweeper>=0.9.0rc2
|
||||||
hydra-ray-launcher==0.1.2
|
# hydra-ray-launcher>=0.1.2
|
||||||
|
|
||||||
# --------- loggers --------- #
|
# --------- loggers --------- #
|
||||||
wandb>=0.10.20
|
wandb>=0.10.20
|
||||||
|
|||||||
+10
-10
@@ -39,6 +39,16 @@ def extras(config: DictConfig):
|
|||||||
# make it possible to add new keys to config
|
# make it possible to add new keys to config
|
||||||
OmegaConf.set_struct(config, False)
|
OmegaConf.set_struct(config, False)
|
||||||
|
|
||||||
|
# [OPTIONAL] Disable python warnings if <config.disable_warnings=True>
|
||||||
|
if config.get("disable_warnings"):
|
||||||
|
log.info(f"Disabling python warnings! <{config.disable_warnings=}>")
|
||||||
|
warnings.filterwarnings("ignore")
|
||||||
|
|
||||||
|
# [OPTIONAL] Disable Lightning logs if <config.disable_lightning_logs=True>
|
||||||
|
if config.get("disable_lightning_logs"):
|
||||||
|
log.info(f"Disabling lightning logs! {config.disable_lightning_logs=}>")
|
||||||
|
logging.getLogger("lightning").setLevel(logging.ERROR)
|
||||||
|
|
||||||
# [OPTIONAL] Set <config.trainer.fast_dev_run=True> if <config.debug=True>
|
# [OPTIONAL] Set <config.trainer.fast_dev_run=True> if <config.debug=True>
|
||||||
if config.get("debug"):
|
if config.get("debug"):
|
||||||
log.info(f"Running in debug mode! <{config.debug=}>")
|
log.info(f"Running in debug mode! <{config.debug=}>")
|
||||||
@@ -56,16 +66,6 @@ def extras(config: DictConfig):
|
|||||||
if config.datamodule.get("num_workers"):
|
if config.datamodule.get("num_workers"):
|
||||||
config.datamodule.num_workers = 0
|
config.datamodule.num_workers = 0
|
||||||
|
|
||||||
# [OPTIONAL] Disable python warnings if <config.disable_warnings=True>
|
|
||||||
if config.get("disable_warnings"):
|
|
||||||
log.info(f"Disabling python warnings! <{config.disable_warnings=}>")
|
|
||||||
warnings.filterwarnings("ignore")
|
|
||||||
|
|
||||||
# [OPTIONAL] Disable Lightning logs if <config.disable_lightning_logs=True>
|
|
||||||
if config.get("disable_lightning_logs"):
|
|
||||||
log.info(f"Disabling lightning logs! {config.disable_lightning_logs=}>")
|
|
||||||
logging.getLogger("lightning").setLevel(logging.ERROR)
|
|
||||||
|
|
||||||
# disable adding new keys to config
|
# disable adding new keys to config
|
||||||
OmegaConf.set_struct(config, True)
|
OmegaConf.set_struct(config, True)
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ def train(config: DictConfig):
|
|||||||
log.info(f"Instantiating datamodule <{config.datamodule._target_}>")
|
log.info(f"Instantiating datamodule <{config.datamodule._target_}>")
|
||||||
datamodule: LightningDataModule = hydra.utils.instantiate(config.datamodule)
|
datamodule: LightningDataModule = hydra.utils.instantiate(config.datamodule)
|
||||||
|
|
||||||
# Init Lightning callbacks
|
# Init Lightning callbacks ⚡
|
||||||
callbacks: List[Callback] = []
|
callbacks: List[Callback] = []
|
||||||
if "callbacks" in config:
|
if "callbacks" in config:
|
||||||
for _, cb_conf in config["callbacks"].items():
|
for _, cb_conf in config["callbacks"].items():
|
||||||
@@ -50,7 +50,7 @@ def train(config: DictConfig):
|
|||||||
log.info(f"Instantiating callback <{cb_conf._target_}>")
|
log.info(f"Instantiating callback <{cb_conf._target_}>")
|
||||||
callbacks.append(hydra.utils.instantiate(cb_conf))
|
callbacks.append(hydra.utils.instantiate(cb_conf))
|
||||||
|
|
||||||
# Init Lightning loggers
|
# Init Lightning loggers ⚡
|
||||||
logger: List[LightningLoggerBase] = []
|
logger: List[LightningLoggerBase] = []
|
||||||
if "logger" in config:
|
if "logger" in config:
|
||||||
for _, lg_conf in config["logger"].items():
|
for _, lg_conf in config["logger"].items():
|
||||||
|
|||||||
Reference in new issue
Block a user