Skip to content

Commit

Permalink
Merge branch 'dev' into log_warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
bittremieux authored Aug 3, 2023
2 parents 70bcee1 + 8d2593b commit ded14b4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
20 changes: 9 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

### Changed

- The CLI has been overhauled to use subcommands.
- Upgraded to Lightning >=2.0
- Checkpointing is now configured to save the top-k models instead of all.
- Nicely format logged warnings.

### Fixed

- Casanovo now runs on CPU and can passes all tests.

### Added

- Checkpoints now include model parameters, allowing for mismatches with the provided configuration file.
Expand All @@ -26,12 +15,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Changed

- The CLI has been overhauled to use subcommands.
- Upgraded to Lightning >=2.0
- Checkpointing is now configured to save the top-k models instead of all.
- We now log steps rather than epochs as units of progress during training.
- Validation performance metrics are logged (and added to tensorboard) at the validation epoch, and training loss is logged at the end of training epoch, i.e. training and validation metrics are logged asynchronously.
- Irrelevant warning messages on the console output and in the log file are no longer shown.
- Nicely format logged warnings.

### Removed

- Remove config option for a custom Pytorch Lightning logger

### Fixed

- Casanovo now runs on CPU and can passes all tests.
- Upgrade to Depthcharge v0.2.0 to fix sinusoidal encoding.
- Correctly refer to input peak files by their full file path.

Expand Down
4 changes: 1 addition & 3 deletions casanovo/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ residues:
"+43.006-17.027": 25.980265 # Carbamylation and NH3 loss
# Logging frequency in training steps
n_log: 1
# Tensorboard object to keep track of training metrics
# Tensorboard directory to use for keeping track of training metrics
tb_summarywriter:
# Number of warmup iterations for learning rate scheduler
warmup_iters: 100_000
Expand All @@ -103,8 +103,6 @@ predict_batch_size: 1024
n_beams: 1
# Number of PSMs for each spectrum (I)
top_match: 1
# Object for logging training progress
logger:
# Max number of training epochs
max_epochs: 30
# Number of validation steps to run before training begins
Expand Down
4 changes: 0 additions & 4 deletions casanovo/denovo/model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,10 @@ def initialize_trainer(self, train: bool) -> None:
Determines whether to set the trainer up for model training
or evaluation / inference.
"""
logger = (
self.config.logger if self.config.logger is not None else False
)
trainer_cfg = dict(
accelerator=self.config.accelerator,
devices=1,
enable_checkpointing=False,
logger=logger,
)

if train:
Expand Down

0 comments on commit ded14b4

Please sign in to comment.