Skip to content

Migrate to fastai v2 and modernise project tooling - #15

Merged
mnpinto merged 53 commits into
masterfrom
v0.7
May 5, 2026
Merged

mnpinto merged 53 commits into
masterfrom
v0.7

Conversation

@mnpinto

@mnpinto mnpinto commented May 5, 2026

Copy link
Copy Markdown
Owner

Breaking changes

  • FRP preprocessing: log1p is now applied to FRP values at dataset creation time (via ActiveFiresLog) rather than at load time. Datasets created with the old pipeline (ActiveFires) are not compatible — they must be regenerated with the new banet_create_dataset command.
  • Data format: predictions and masks are now stored as .nc (NetCDF4) instead of .mat. Existing .mat datasets cannot be used directly with this version.

Major changes

Core

  • Migrated all modules (data.py, predict.py, nrt.py, train.py, cli.py, etc.) from fastai v1 to fastai v2
  • Data format updated from .mat to .nc (NetCDF4); active fires now preprocessed with log1p via ActiveFiresLog before saving
  • VIIRS 750m support with updated download and preprocessing pipeline

Training (new)

  • Added full banet/train.py with SampleEpisode, CustomLoader, ImageSequence, CutoutCombined, BCE, and train_model()
  • Added banet_train_model CLI command

Tooling

  • Replaced setup.py + settings.ini with pyproject.toml
  • Removed nbdev dependency; source notebooks deleted (.py files are now the source of truth)
  • Simplified Makefile: make sets up the venv, make test runs pytest
  • CI updated to Python 3.11 and actions/setup-python@v5
  • Replaced fastscript with fastcore.script

Cleanup

  • Removed all AUTOGENERATED headers and unused nbdev imports from source files
  • Deleted banet/_nbdev.py
  • Updated CONTRIBUTING.md and README.md

Contributors

mnpinto and others added 23 commits September 15, 2022 22:37
The train.py module was changed from v1 to v2 of fastai.
Updated train.py to fastai v2
Changed the learning rate insted of the BCE function, in case the model is trained with a sequence_len different than 64.
All other changes were recommended by PR14
Forgot a change in the save_to name.
Corrected learning rate and f-string, deleted debugs and deleted datasource from sampler since it is not used.
@mnpinto mnpinto changed the title Migrate to fastai v2, add training pipeline, and modernise project tooling Migrate to fastai v2 and modernise project tooling May 5, 2026
@mnpinto
mnpinto merged commit 462c2e5 into master May 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants