-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feature: CLI work in progress #130
base: main
Are you sure you want to change the base?
Conversation
feat(alg config): add model & loss
…bine with pydantic models
…`--use-in-memory`
… pass -1 to last value. - docs(commands): add help & docstrings - docs(conf): add comment TODO for model kwargs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few notes!
I can't wait to try it!!
We should also reproduce create examples in the documentation (once the CLI is fully ready) following some of the example notebooks.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #130 +/- ##
==========================================
+ Coverage 91.30% 91.36% +0.06%
==========================================
Files 104 108 +4
Lines 2633 2698 +65
==========================================
+ Hits 2404 2465 +61
- Misses 229 233 +4 ☔ View full report in Codecov by Sentry. |
Description
Adding a CAREamics CLI !
Full functionality will include training, prediction and configuration building from the command line. Currently the prediction command is not implemented.
train
command creates aCAREamist
object from a given config file and then runs theCAREamist.train
method on given training and optional validation files.conf
subcommands (care
,n2n
,n2v
) are wrappers for the existing configuration building convenience functions in src/careamics/config/configuration_factory.py. The conf subcommands have the additional functionality of saving the created configuration to a .yaml file.Changes Made
Added:
typer.Typer
object and a function to run it.train
andpredict
commands.conf
subtyper.Typer
object.care
,n2n
andn2v
.Modified:
Additional Notes and Examples
The --help flag can be run on all commands and subcommands. This is helpfully managed by Typer.
As you can see from the help output above, I have decided on the design choice, for the
train
command, the the config file is an argument and everything else is passed as an option. So to train with a<CONFIG FILE>
and<TRAIN SOURCE>
the syntax would be:careamics train <CONFIG FILE> -ts <TRAIN SOURCE>