Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.0.6 #27

Merged
merged 104 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
8f7d06a
Ignore Shell files
Eve-ning Nov 24, 2023
6cdee0c
Add check for GPU availability
Eve-ning Nov 24, 2023
7e36868
Re-cache venv/ and force lightning to use gpu
Eve-ning Nov 24, 2023
a8fb690
Fix bad shell cmd
Eve-ning Nov 24, 2023
36836e8
Add sleep for debugging
Eve-ning Nov 24, 2023
64c9877
Debug session
Eve-ning Nov 24, 2023
9aa4f78
Fix GPU not mounted
Eve-ning Nov 24, 2023
d4c9979
Merge pull request #20 from FR-DC/frml-67
Eve-ning Nov 24, 2023
a42a7f2
Rename FaceNet to InceptionV3
Eve-ning Nov 27, 2023
da24bc6
Fix import path
Eve-ning Nov 27, 2023
991cc22
Merge pull request #21 from FR-DC/rename-facenet-incep
Eve-ning Nov 27, 2023
bfbb8be
Update signature of Module to be more flexible
Eve-ning Nov 28, 2023
76a786e
Add dvc as dev dep
Eve-ning Nov 28, 2023
275b51b
Add dvc[gs] as dev dep and init
Eve-ning Nov 28, 2023
2875118
Update DVC Upstream
Eve-ning Nov 28, 2023
5c2c8eb
stop tracking DEBUG/0/scratch.py
Eve-ning Nov 28, 2023
88279b9
Add DEBUG dataset
Eve-ning Nov 28, 2023
8043531
Add DEBUG dataset
Eve-ning Nov 28, 2023
e22227a
Update signature of Module to be more flexible
Eve-ning Nov 28, 2023
136abf1
Add mixmatch_module.py
Eve-ning Nov 28, 2023
6b2fe30
Add DVC for all files
Eve-ning Nov 28, 2023
8de279b
Add jpg variants
Eve-ning Nov 28, 2023
1b3b5b3
Add Script for generating jpeg variants
Eve-ning Nov 28, 2023
89a2ad8
Merge branch 'frml-64-ssl' into frml-56-dvc
Eve-ning Nov 28, 2023
3017d62
Merge pull request #22 from FR-DC/frml-56-dvc
Eve-ning Nov 28, 2023
68a444a
Make Model CI run on PR main
Eve-ning Nov 28, 2023
f7b4635
Update signature
Eve-ning Nov 28, 2023
772ad34
Implement more flexible DM
Eve-ning Nov 29, 2023
a2fe88e
Implement FRDCDataset to inherit torch's Dataset
Eve-ning Nov 29, 2023
b988e35
Fix issue with y compatibility
Eve-ning Nov 29, 2023
222673a
Update test to use new DM
Eve-ning Nov 29, 2023
9f8a629
Make transforms apply on dataset level
Eve-ning Nov 29, 2023
b0c68b8
Ignore unpicklable objs
Eve-ning Nov 29, 2023
80e3e6a
Update script to run with new dm
Eve-ning Nov 29, 2023
620b6e2
Remove unused util func
Eve-ning Nov 29, 2023
7f6c5cd
Lint
Eve-ning Nov 29, 2023
7e6a306
Remove unused modules
Eve-ning Nov 29, 2023
c2d2c4e
Allow DM to be sampled for adjustable iters
Eve-ning Nov 29, 2023
f278ff1
FRML-46 Integrate LE into model
Eve-ning Nov 29, 2023
9e6ad97
FRML-46 Remove le
Eve-ning Nov 29, 2023
b8bc0ad
FRML-46 Remove le saving
Eve-ning Nov 29, 2023
6d7ea35
Update main test to use new DM
Eve-ning Nov 29, 2023
2c16290
Fix issue with predicting
Eve-ning Nov 29, 2023
5c02a88
Move instantiation to module
Eve-ning Nov 29, 2023
d4bd0fa
Allow for separate ds on module
Eve-ning Nov 29, 2023
2a52b58
Add latest seaborn
Eve-ning Nov 30, 2023
03ef804
Move transforms to per item
Eve-ning Nov 30, 2023
a9cc20d
Make InceptionV3 inherit from FRDCMod
Eve-ning Nov 30, 2023
5ca216a
Remove transform logic from dm into mod
Eve-ning Nov 30, 2023
92cc4a9
Simplify FRDCMod to be easily inheritable
Eve-ning Nov 30, 2023
0ace1de
Reformat train for new architecture
Eve-ning Nov 30, 2023
80b8b5d
Update eval to new architecture
Eve-ning Nov 30, 2023
e93523f
Slightly optimize loading of image
Eve-ning Nov 30, 2023
359f293
Update confusion_matrix.png
Eve-ning Nov 30, 2023
c552b26
Add new model
Eve-ning Nov 30, 2023
35c8836
Ignore checkpoints
Eve-ning Nov 30, 2023
0f96d5d
Make VFlip v2
Eve-ning Nov 30, 2023
7840af6
Mover on before transfer to lowest level
Eve-ning Nov 30, 2023
c39bb01
Fix Debug Dataset to use consistent size
Eve-ning Nov 30, 2023
cba4c72
Remove unused attrs
Eve-ning Nov 30, 2023
2cde297
Fix issue with initializing inception
Eve-ning Nov 30, 2023
ab8212e
Fix pipeline run
Eve-ning Nov 30, 2023
ba57c23
Change name of test
Eve-ning Nov 30, 2023
93781e1
Lint code
Eve-ning Nov 30, 2023
46d7862
Replace old DM
Eve-ning Nov 30, 2023
23f2e6c
Lint and update broken refs
Eve-ning Nov 30, 2023
caf2777
Merge pull request #23 from FR-DC/frml-64-ssl
Eve-ning Nov 30, 2023
d422cc3
Merge pull request #24 from FR-DC/frml-64-ssl
Eve-ning Nov 30, 2023
f5741d4
Ignore wandb outputs
Eve-ning Dec 1, 2023
a80144a
Remove DVC and resolve poetry env
Eve-ning Dec 4, 2023
67dd4f0
Remove flaky torch dependency
Eve-ning Dec 4, 2023
ff92fc2
Inherit FRDCModule for MixMatch
Eve-ning Dec 5, 2023
226bf68
Implement a rough "Unlabelled" Dataset
Eve-ning Dec 5, 2023
ec1c39e
Add a new datamodule for SSL
Eve-ning Dec 5, 2023
755107d
Add missing casts for test
Eve-ning Dec 5, 2023
9792537
Add EMA
Eve-ning Dec 5, 2023
f3c105b
Add MixMatch Support
Eve-ning Dec 5, 2023
c39ba8f
Remove old InceptionV3 expose
Eve-ning Dec 5, 2023
a5abd51
Implement custom aug step
Eve-ning Dec 5, 2023
e8c8de8
Add custom predict step
Eve-ning Dec 5, 2023
78897e8
Update evaluate to fit new predict signature
Eve-ning Dec 5, 2023
02b44cb
Update confusion_matrix.png
Eve-ning Dec 5, 2023
7bd9b5f
Simulate "unlabelled" Dataset
Eve-ning Dec 5, 2023
cd5da10
Delete unused FRDCModule
Eve-ning Dec 5, 2023
6dc3ffb
Remove unused dummy train
Eve-ning Dec 5, 2023
ef5a619
Enforce EMA to be properly defined
Eve-ning Dec 5, 2023
2591efc
Rename EMA
Eve-ning Dec 5, 2023
5ed96e2
Add comment on flaky SSLDM
Eve-ning Dec 5, 2023
24bde34
Remove deprecated modules
Eve-ning Dec 5, 2023
3ce4178
Add comments on non optimal DS definition
Eve-ning Dec 5, 2023
4724cfa
Simplify logic to support Supervised Learning
Eve-ning Dec 6, 2023
f362fc8
Deprecate and replace old FRDC DM
Eve-ning Dec 6, 2023
6dcd453
Fix issue with y_lbl being long
Eve-ning Dec 6, 2023
823bfa7
Update train to use supervised
Eve-ning Dec 6, 2023
f61518d
Fix missing torch req
Eve-ning Dec 6, 2023
4284c67
Update tests for new signatuires
Eve-ning Dec 6, 2023
dd707db
Update to use mixmatch
Eve-ning Dec 6, 2023
5906bb3
Fix missing dep and rename workflow file names
Eve-ning Dec 6, 2023
a26cd07
Merge pull request #29 from FR-DC/frml-64-mixmatch-integrate
Eve-ning Dec 6, 2023
76ce99d
Merge branch '0.0.6' into frml-64-ssl-integrate
Eve-ning Dec 6, 2023
352b1a0
Merge pull request #28 from FR-DC/frml-64-ssl-integrate
Eve-ning Dec 6, 2023
f05728e
Fix incorrect model path specification
Eve-ning Dec 6, 2023
1e2f916
Move evaluate scripts to train
Eve-ning Dec 6, 2023
296d0a6
Migrate script to train
Eve-ning Dec 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dvc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/config.local
/tmp
/cache
6 changes: 6 additions & 0 deletions .dvc/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[core]
remote = frdc-ds
autostage = true
['remote "frdc-ds"']
url = gs://frdc-ds/
version_aware = true
3 changes: 3 additions & 0 deletions .dvcignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add patterns of files dvc should ignore, which could improve
# the performance. Learn more at
# https://dvc.org/doc/user-guide/dvcignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
python -m pip install flake8 pytest poetry
poetry export --with dev --without-hashes -o requirements.txt
pip install -r requirements.txt
pip install torch torchaudio torchvision lightning

- name: Lint with flake8
run: |
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/model.yml → .github/workflows/model-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: Model Training

on:
pull_request:
branches: ['main']
workflow_dispatch:


jobs:
build:
Expand All @@ -12,7 +15,9 @@ jobs:
volumes:
- /home/runner/work/frdc-ml/_github_home:/root
env:
# This is where setup-python will install and cache the venv
AGENT_TOOLSDIRECTORY: "/root/venv"
options: --gpus all

steps:
- uses: actions/checkout@v3
Expand All @@ -34,7 +39,10 @@ jobs:
pip3 install -r requirements.txt
pip3 install torch torchvision torchaudio

- name: Set up gcloud
- name: Check CUDA is available
run: nvidia-smi

- name: Auth gcloud
id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand All @@ -47,13 +55,15 @@ jobs:
run: |
echo "WANDB_API_KEY=${{ secrets.WANDB_API_KEY }}" >> $GITHUB_ENV

# Our project has src as a source path, explicitly add that in.
- name: Add src as PYTHONPATH
run: |
echo "PYTHONPATH=src" >> $GITHUB_ENV

# Do not do cd as it'll break PYTHONPATH.
- name: Run Model Training
run: |
python3 -m tests.model_tests.chestnut_dec_may.main
python3 -m tests.model_tests.chestnut_dec_may.train

- name: Comment results via CML
run: |
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,8 @@ cython_debug/
rsc/**/*.tif

**/*/lightning_logs
*.zip
*.zip
*.sh
*.ckpt
/rsc
**/wandb/
1,416 changes: 311 additions & 1,105 deletions poetry.lock

Large diffs are not rendered by default.

18 changes: 7 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,27 @@ python = ">=3.9,<3.12"
numpy = "^1.25.2"
scikit-image = "0.22.0"
scikit-learn = "^1.3.0"
seaborn = "^0.12.2"
seaborn = "^0.13.0"
matplotlib = "^3.7.3"
google-cloud-storage = "^2.10.0"
tqdm = "^4.66.1"
xxhash = "^3.4.1"


[[tool.poetry.source]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu121"
priority = "explicit"

#torch = {version="^2.1.0", source="pytorch"}
#torchvision = {version="^0.16.0", source="pytorch"}
#torchaudio = {version="^2.1.0", source="pytorch"}
#lightning = "^2.0.9.post0"

[tool.poetry.group.dev.dependencies]
torch = "^2.1.0"
torchvision = "^0.16.0"
torchaudio = "^2.1.0"
lightning = "^2.0.9.post0"
pytest = "^7.4.2"
pre-commit = "^3.5.0"
black = "^23.10.0"
flake8 = "^6.1.0"
wandb = "^0.16.0"




[tool.poetry.group.glcm.dependencies]
glcm-cupy = "0.2.1"
cupy-cuda12x = "^12.2.0"
Expand Down
Loading