Skip to content

Commit

Permalink
fixed mnist paths + several small stuff (#48)
Browse files Browse the repository at this point in the history
* fixed mnist paths + several small stuff
  • Loading branch information
MaximilienLC authored Jul 10, 2023
1 parent 0287f9d commit 13d9353
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 26 deletions.
9 changes: 0 additions & 9 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
# Require MaximilienLC to review all pull requests (for now).
# Comment out when things get going.
* @maximilienlc

# Require MaximilienLC to review all changes to .github/ files.
# Probably keep this for a while.
.github/ @maximilienlc

# Require MaximilienLC to review all changes to python test files.
# Probably keep this for a while.
*_test.py @maximilienlc
2 changes: 1 addition & 1 deletion .github/workflows/format-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Runs the pre-commit workflow (formatting & linting)
name: Format & Lint on PR
name: Format & Lint

on:
pull_request:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/typecheck-unittest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ on:
branches: [main]
paths:
- cneuromax/**
- pyreqs/**
- pyproject.toml
- .github/workflows/typecheck-unittest.yaml
push:
branches: [main]
paths:
- cneuromax/**
- pyreqs/**
- pyproject.toml
- .github/workflows/typecheck-unittest.yaml

permissions:
Expand Down
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CNeuroMAX
# CNeuroMax

[![container-build-push](
https://github.com/courtois-neuromod/cneuromax/actions/workflows/container-build-push.yaml/badge.svg)](
Expand Down Expand Up @@ -27,9 +27,16 @@ Full documentation available at [https://courtois-neuromod.github.io/cneuromax](
cneuromax/
├─ .github/ <-- Contains GitHub automation (tests, containers, etc) config files
│ └─ *
├─ cneuromax/ <-- Contains all of the Machine Learning code and config files
├─ cneuromax/ <-- Contains all of the Machine Learning code and config files
│ ├─ application/ <-- Contains the code to create applications (cozmo inference, etc)
│ │ └─ *
│ ├─ common/ <-- Contains the code common to apps, deep learning and neuroevolution
│ │ ├─ launcher <-- Contains the base configs to launch jobs
│ │ | └─ *
| | ├─ sweeper <-- Contains the base configs to run hyperparameter sweeps
│ │ | └─ *
│ │ ├─ fitter.yaml <-- The config common to all fitting jobs
| | └─ *
│ ├─ deeplearning/ <-- Contains the Deep Learning code
│ │ ├─ common/ <-- Contains the code common to more than one DL experiment
│ │ │ ├─ datamodule/ <-- Contains common Lightning DataModules
Expand All @@ -38,17 +45,26 @@ cneuromax/
│ │ │ ├─ litmodule/ <-- Contains common Lightning Modules
│ │ │ │ ├─ base.py <-- The base Lightning Module to build upon
│ │ │ │ └─ *
│ │ │ └─ nnmodule/ <-- Contains common PyTorch Modules
│ │ │ └─ *
│ │ ├─ experiment/ <-- Contains the DL experiments
│ │ │ ├─ my_new_experiment/ <-- ! Your new DL experiment folder
│ │ │ ├─ logger/ <-- Contains common Lightning Logger configs
│ │ │ │ └─ *
│ │ │ ├─ lrscheduler/ <-- Contains common PyTorch Learning Rate Scheduler configs
│ │ │ │ └─ *
│ │ │ ├─ nnmodule/ <-- Contains common PyTorch Modules
│ │ │ │ └─ *
│ │ │ ├─ optimizer/ <-- Contains common PyTorch Optimizer configs
│ │ │ │ └─ *
│ │ │ ├─ trainer/ <-- Contains common Lightning Trainer configs
│ │ │ │ └─ *
| | | └─ *
│ │ ├─ experiment/ <-- Contains the Deep Learning experiments
│ │ │ ├─ my_new_experiment/ <-- ! Your new Deep Learning experiment folder
│ │ │ │ ├─ datamodule.py <-- ! Your Lightning DataModule
│ │ │ │ ├─ litmodule.py <-- ! Your Lightning Module
│ │ │ │ ├─ nnmodule.py <-- ! Your PyTorch Module
│ │ │ │ ├─ config.yaml <-- ! Your Hydra configuration file
│ │ │ │ ├─ test_0.yaml <-- ! One of your Hydra configuration file
│ │ │ │ └─ *
│ │ │ └─ *
│ │ ├─ fitter.py <-- Contains the code to fit (train/val/test) a DL model
│ │ ├─ __main__.py <-- Main file to launch Deep Learning experiments
│ │ └─ *
│ └─ neuroevolution/ <-- Contains the code for Neuroevolution models
│ └─ *
Expand Down
4 changes: 0 additions & 4 deletions cneuromax/common/fitter.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
hydra:
job:
chdir: true

data_dir: ./data
device: cpu
load_path: null
Expand Down
2 changes: 1 addition & 1 deletion cneuromax/deeplearning/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@hydra.main(
version_base=None,
config_name="config",
config_name="dlfitter",
config_path="common",
)
def run(config: DictConfig) -> float:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ defaults:

datamodule:
_target_:
cneuromax.deeplearning.experiment.mnist_classification.modules.MNISTClassificationDataModule
cneuromax.deeplearning.experiment.mnist_classification.MNISTClassificationDataModule
config:
_target_:
cneuromax.deeplearning.experiment.mnist_classification.modules.MNISTClassificationDataModuleConfig
cneuromax.deeplearning.experiment.mnist_classification.MNISTClassificationDataModuleConfig
val_percentage: 0.1

litmodule:
_target_:
cneuromax.deeplearning.experiment.mnist_classification.modules.MNISTClassificationLitModule
cneuromax.deeplearning.experiment.mnist_classification.MNISTClassificationLitModule
nnmodule:
config:
dims: [784, 128, 10]

logger:
name: mlp
project: mnist_classification

save_path: lightning_ckpt

0 comments on commit 13d9353

Please sign in to comment.