General improvements (#88)

* remove unnecessary linters from pre-commit-config

* hook fix

* small improvements

* fix readme

* implement easier access to debug mode

* fix tests

* Update README.md

* Update README.md
This commit is contained in:
Łukasz Zalewski authored and GitHub committed 2021-03-08 15:53:30 +01:00
1 parent 5385a2ec98
commit 3d301977b3
14 files changed
+176 -113

No files matched your search

+1
View File
@@ -4,6 +4,7 @@ model_checkpoint:
save_top_k: 2 # save k best models (determined by above metric)
save_last: True # additionaly always save model from last epoch
mode: "max" # can be "max" or "min"
verbose: False
dirpath: 'checkpoints/'
filename: '{epoch:02d}'
+8 -1
View File
@@ -24,6 +24,12 @@ work_dir: ${hydra:runtime.cwd}
data_dir: ${work_dir}/data/
# use `python train.py debug=true` for easy debugging!
# this will run 1 train, val and test loop with only 1 batch
# (equivalent to running `python train.py trainer.fast_dev_run=True`)
debug: False
# pretty print config at the start of the run using Rich library
print_config: True
@@ -45,8 +51,9 @@ hydra:
subdir: ${hydra.job.num}
job:
# set here your environment variables
env_set:
# currently there are some issues with running sweeps alongside wandb
# https://github.com/wandb/client/issues/1314
# this env variable fixes that
# this env var fixes that
WANDB_START_METHOD: thread
+4 -4
View File
@@ -4,11 +4,11 @@
# python train.py -m --config-name config_optuna.yaml +experiment=exp_example_simple logger=wandb
defaults:
# load everything from main config file
- config.yaml
# load everything from main config file
- config.yaml
# override sweeper to optuna!
- override hydra/sweeper: optuna
# override sweeper to Optuna!
- override hydra/sweeper: optuna
# choose metric which will be optimized by optuna
+36
View File
@@ -0,0 +1,36 @@
# @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: ['*']
+1
View File
@@ -8,3 +8,4 @@ progress_bar_refresh_rate: 10
weights_summary: null
default_root_dir: "lightning_logs/"
fast_dev_run: False
resume_from_checkpoint: null