Skip to content

Commit

Permalink
Merge pull request #65 from nasa-nccs-hpda/ptc-refactor
Browse files Browse the repository at this point in the history
Ptc refactor
  • Loading branch information
cssprad1 authored Nov 8, 2024
2 parents 91bb882 + 9a7cd6f commit 7fe8753
Show file tree
Hide file tree
Showing 113 changed files with 2,100 additions and 7,970 deletions.
25 changes: 25 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[run]
source = pytorch_caney
omit =
*/site-packages/*
*/dist-packages/*
*/tests/*
setup.py

[report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if __name__ == .__main__.:
raise NotImplementedError
pass
except ImportError:

show_missing = True

[html]
directory = htmlcov

[xml]
output = coverage.xml
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,18 @@ cd pytorch-caney; conda env create -f requirements/environment_gpu.yml;
conda activate pytorch-caney
python -m unittest discover pytorch_caney/tests
```

Another example using the singularity exec command from the Explore system:

```bash
singularity exec --env PYTHONPATH="$NOBACKUP/development/pytorch-caney" --nv -B /path/to/mount /path/to/container/pytorch-caney-container coverage run -m unittest discover pytorch_caney/tests

This command would output the report per file:

```bash
singularity exec --env PYTHONPATH="$NOBACKUP/development/pytorch-caney" --nv -B /path/to/mount /path/to/container/pytorch-caney-container coverage report
```

## References

- [Pytorch Lightning](https://github.com/Lightning-AI/lightning)
Expand Down
32 changes: 32 additions & 0 deletions configs/3dcloudtask_fcn_baseline_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
PIPELINE: '3dcloud'
DATAMODULE: 'abitoa3dcloud'
MODEL:
ENCODER: 'fcn'
DECODER: 'fcn'
NAME: 3dcloud-fcn-baseline
IN_CHANS: 14
DROP_PATH_RATE: 0.1
DATA:
BATCH_SIZE: 32
DATA_PATHS: [/explore/nobackup/projects/ilab/data/satvision-toa/3dcloud.data/abiChipsNew/]
TEST_DATA_PATHS: [/explore/nobackup/projects/ilab/data/satvision-toa/3dcloud.data/abiChipsNew/]
IMG_SIZE: 128
TRAIN:
ACCELERATOR: 'gpu'
STRATEGY: 'auto'
EPOCHS: 50
WARMUP_EPOCHS: 10
BASE_LR: 3e-4
MIN_LR: 2e-4
WARMUP_LR: 1e-4
WEIGHT_DECAY: 0.05
LR_SCHEDULER:
NAME: 'multistep'
GAMMA: 0.1
MULTISTEPS: [700,]
LOSS:
NAME: 'bce'
PRINT_FREQ: 10
SAVE_FREQ: 50
VALIDATION_FREQ: 20
TAG: 3dcloud_task_fcn_baseline_128_scaled_bt_minmax
41 changes: 41 additions & 0 deletions configs/3dcloudtask_swinv2_satvision_giant_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
PIPELINE: '3dcloud'
DATAMODULE: 'abitoa3dcloud'
MODEL:
ENCODER: 'satvision'
DECODER: 'fcn'
PRETRAINED: /panfs/ccds02/nobackup/projects/ilab/projects/3DClouds/models/SV-TOA/3B_2M/mp_rank_00_model_states.pt
TYPE: swinv2
NAME: 3dcloud-svtoa-finetune-giant
IN_CHANS: 14
DROP_PATH_RATE: 0.1
SWINV2:
IN_CHANS: 14
EMBED_DIM: 512
DEPTHS: [ 2, 2, 42, 2 ]
NUM_HEADS: [ 16, 32, 64, 128 ]
WINDOW_SIZE: 8
NORM_PERIOD: 6
DATA:
BATCH_SIZE: 32
DATA_PATHS: [/explore/nobackup/projects/ilab/data/satvision-toa/3dcloud.data/abiChipsNew/]
TEST_DATA_PATHS: [/explore/nobackup/projects/ilab/data/satvision-toa/3dcloud.data/abiChipsNew/]
IMG_SIZE: 128
TRAIN:
USE_CHECKPOINT: True
EPOCHS: 50
WARMUP_EPOCHS: 10
BASE_LR: 3e-4
MIN_LR: 2e-4
WARMUP_LR: 1e-4
WEIGHT_DECAY: 0.05
LR_SCHEDULER:
NAME: 'multistep'
GAMMA: 0.1
MULTISTEPS: [700,]
LOSS:
NAME: 'bce'
PRECISION: 'bf16'
PRINT_FREQ: 10
SAVE_FREQ: 50
VALIDATION_FREQ: 20
TAG: 3dcloud_task_swinv2_g_satvision_128_scaled_bt_minmax
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
PIPELINE: 'satvisiontoapretrain'

MODEL:
TYPE: swinv2
NAME: mim_satvision_pretrain-giant
DROP_PATH_RATE: 0.1
SWINV2:
IN_CHANS: 14
EMBED_DIM: 512
DEPTHS: [ 2, 2, 42, 2 ]
NUM_HEADS: [ 16, 32, 64, 128 ]
WINDOW_SIZE: 8
NORM_PERIOD: 6

DATA:
DATAMODULE: False
BATCH_SIZE: 64
LENGTH: 1_920_000
PIN_MEMORY: True
NUM_WORKERS: 4
DATA_PATHS: [/explore/nobackup/projects/ilab/projects/3DClouds/data/mosaic-v3/webdatasets/shards]
IMG_SIZE: 128
MASK_PATCH_SIZE: 8
MASK_RATIO: 0.6

TRAIN:
ACCELERATOR: 'gpu'
STRATEGY: 'deepspeed'
USE_CHECKPOINT: True
EPOCHS: 50
WARMUP_EPOCHS: 10
BASE_LR: 3e-4
MIN_LR: 2e-4
WARMUP_LR: 1e-4
WEIGHT_DECAY: 0.05
LR_SCHEDULER:
NAME: 'multistep'
GAMMA: 0.1
MULTISTEPS: [700,]

DEEPSPEED:
STAGE: 2

PRECISION: 'bf16'

PRINT_FREQ: 10
SAVE_FREQ: 50
TAG: mim_pretrain_giant_satvision_128_scaled_bt_minmax_50ep
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
PIPELINE: 'satvisiontoapretrain'

MODEL:
TYPE: swinv2
NAME: mim_satvision_pretrain-giant
DROP_PATH_RATE: 0.1
PRETRAINED: /panfs/ccds02/nobackup/projects/ilab/projects/3DClouds/models/SV-TOA/3B_2M/mp_rank_00_model_states.pt
SWINV2:
IN_CHANS: 14
EMBED_DIM: 512
DEPTHS: [ 2, 2, 42, 2 ]
NUM_HEADS: [ 16, 32, 64, 128 ]
WINDOW_SIZE: 8
NORM_PERIOD: 6

DATA:
DATAMODULE: False
BATCH_SIZE: 64
LENGTH: 1_920_000
PIN_MEMORY: True
NUM_WORKERS: 4
DATA_PATHS: [/explore/nobackup/projects/ilab/projects/3DClouds/data/mosaic-v3/webdatasets/shards]
IMG_SIZE: 128
MASK_PATCH_SIZE: 8
MASK_RATIO: 0.6

TRAIN:
ACCELERATOR: 'gpu'
STRATEGY: 'deepspeed'
USE_CHECKPOINT: True
EPOCHS: 50
WARMUP_EPOCHS: 10
BASE_LR: 3e-4
MIN_LR: 2e-4
WARMUP_LR: 1e-4
WEIGHT_DECAY: 0.05
LR_SCHEDULER:
NAME: 'multistep'
GAMMA: 0.1
MULTISTEPS: [700,]

DEEPSPEED:
STAGE: 2

PRECISION: 'bf16'

PRINT_FREQ: 10
SAVE_FREQ: 50
TAG: mim_pretrain_giant_satvision_128_scaled_bt_minmax_50ep_resume
3 changes: 0 additions & 3 deletions examples/satvision-giant/README.md

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions examples/satvision-giant/run_satvision_pretrain.sh

This file was deleted.

3 changes: 0 additions & 3 deletions examples/satvision-huge/README.md

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions examples/satvision-huge/run_satvision_pretrain.sh

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7fe8753

Please sign in to comment.