Feature: Add predict command to CLI #281
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
NotImplementedError
.CAREamist.predict_to_disk
is called with optional parameters. Using Typer.Changes Made
careamics/cli/main.py
.CAREamist.predict_to_disk
: fixed bug relating to prediction output directory structure for a single file + some reorganisation.patch_size_callback
withhandle_2D_3D_callback
, moved tocareamics/cli/utils.py
. (Typer can only handle fixed sized inputs so this callback is used for a parameter liketile_size
that can be 2D or 3D).predict_to_disk
tests. Predictions are saved directly to the selected predictions output directory (Not in a second level internal directory).Additional Notes and Examples
Calling the train and predict command (for a N2V config) is as follows
Also, please note that
CAREamist.predict_to_disk
is quite messy but it should be replaced soon when the `PredictionWriterCallback is complete.