Init Config from Python: typer.Option default value not working #10727
Labels
bug
Bugs and behaviour differing from documentation
feat / cli
Feature: Command-line interface
feat / config
Feature: Training config
Goal
Create the config.cfg from Python and not from the command line.
From the source:
https://github.com/explosion/spaCy/blob/master/spacy/cli/init_config.py#L28
How to reproduce the behaviour
Preparation
This should work, ...
..., however:
The problem
The problem is related to
typer.Option
: fastapi/typer#106, which does not set the correct default value forgpu
andpretraining
:E.g.: if you print the params
gpu
andpretraining
, you get<typer.models.OptionInfo object at 0x7f7eb4592430>
<typer.models.OptionInfo object at 0x7f7eb4592f10>
instead of their similar default value
False
.Workaround
As a workaround, I force the value of
gpu
andpretraining
:Your Environment
The text was updated successfully, but these errors were encountered: