- Understand the file structure:
- architectures in
discriminator.py
generator.py
classifier.py
- data loading in
data.py
- data transformation
transforms.py
- optimizers in
optim.py
- utilities in
utils.py
- training procedure in
trainer.py
- architectures in
- Write tests in
tests/
- your file should match
test_*.py
- update existing tests when adding functionalities
- run tests regularly to check you haven't broken anything
python tests/run.py
- your file should match
- Add WIP in your PR's title when not ready to merge
- Open an Issue if something's odd, or to assign yourself a todo
- Format your code with black
- Only update
trainer/defaults.yaml
with values that should be shared across runs and users- use
config/trainer/local_tests.yaml
or any other to setup your particular config overridingtrainer/defaults.yaml
- use
Running tests
As per 7.
you should set your particular config in config/local_tests.yaml
. Mine looks like:
output_path: /Users/victor/Documents/ccai/github/climategan/example_data
# -------------------
# ----- Tasks -----
# -------------------
#tasks: [a, d, h, s, t, w]
tasks: [a, d, s, t] # for now no h or w
# ----------------
# ----- Data -----
# ----------------
data:
files: # if one is not none it will override the dirs location
base: /Users/victor/Documents/ccai/github/climategan/example_data
transforms:
- name: hflip
ignore: false
p: 0.5
- name: resize
ignore: false
new_size: 256
- name: crop
ignore: false
height: 64
width: 64
gen:
encoder:
n_res: 1
default:
n_res: 1
train:
log_level: 1
Setting n_res
to 1 is important to run tests faster and with less memory