Skip to content

Commit

Permalink
CLI revamp (#184)
Browse files Browse the repository at this point in the history
* Overhaul runner

* Update linting to only happen once

* Fix linting error

* Specify utf-8 encoding

* Specify utf-8 encoding only for default config

* Skip weights tests for now

* Update skipping API test

* Revert accidental max_epochs change

* msg -> reason for pytest.mark.skip

* Wout's suggestions and more tests

* Remove encoding

* Specify device type when weight loading

* Fix lint

* Capture init params and figure out device automagically

* Add runner tests

* Fix bug and limit saved models

* WIP

* Support old weights too

* Remove every_n_train_steps from checkpoint

* Implementation done. Need to update tests

* Update tests

* add -h

* Add auto screenshot generation

* Add screenshots workflow [screenshots]

* Add manual dispatch

* Added image

* Updated instructions [screenshots]

* Update screenshot workflow

* Fix bug and screenshot uploads

* Restirct workflow

* fix ref

* Generate new screengrabs with rich-codex

* increase timeout

* bump changelog and increase timeout

* Generate new screengrabs with rich-codex

* Add more tests

* Add option for calculating precision during training

* Restrict depthcharge version

* Log scalars instead of tensors

* Fix typo

* Fix issue Wout found

* Write to stdout instead of stderr

* Minor refactoring

* Separate logger and model initialization

* Generate new screengrabs with rich-codex

* Generate new screengrabs with rich-codex

* Fix test formatting

* Fix edge case

---------

Co-authored-by: melihyilmaz <yilmazmelih97@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Wout Bittremieux <wout@bittremieux.be>
  • Loading branch information
4 people authored Jul 18, 2023
1 parent 621ebdc commit ad48a09
Show file tree
Hide file tree
Showing 19 changed files with 1,332 additions and 156 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Screenshots with rich-codex
on:
pull_request:
paths:
- "docs/*.md"
- "casanovo/casanovo.py"
workflow_dispatch:

jobs:
rich_codex:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v3

- name: Install your custom tools
run: pip install .

- name: Generate terminal images with rich-codex
uses: ewels/rich-codex@v1
with:
timeout: 10
commit_changes: "true"
clean_img_paths: docs/images/*.svg
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,21 @@ 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.

### 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.
- `accelerator` parameter now controls the accelerator (CPU, GPU, etc) that is used.
- `devices` parameter controls the number of accelerators used.
- `every_n_train_steps` parameter now controls the frequency of both validation epochs and model checkpointing during training.

### Changed
Expand Down
Loading

0 comments on commit ad48a09

Please sign in to comment.