Update CLI command name, args

This commit is contained in:
shadeMe 2023-08-14 13:03:02 +02:00
parent ca14547803
commit 979b723993
No known key found for this signature in database
GPG Key ID: 6FCA9FC635B2A402
2 changed files with 17 additions and 13 deletions

View File

@ -492,7 +492,7 @@ When loading the model
[from the Hugging Face Hub](/api/curated-transformer#hf_trfencoder_loader), the
model config's parameters must be same as the hyperparameters used by the
pre-trained model. The
[`init fill-config-transformer`](/api/cli#init-fill-config-transformer) CLI
[`init fill-curated-transformer`](/api/cli#init-fill-curated-transformer) CLI
command can be used to automatically fill in these values.
### spacy-curated-transformers.AlbertTransformer.v1

View File

@ -185,25 +185,29 @@ $ python -m spacy init fill-config [base_path] [output_file] [--diff]
| `--help`, `-h` | Show help message and available arguments. ~~bool (flag)~~ |
| **CREATES** | Complete and auto-filled config file for training. |
### init fill-config-transformer {id="init-fill-config-transformer",version="3.7",tag="command"}
### init fill-curated-transformer {id="init-fill-curated-transformer",version="3.7",tag="command"}
Auto-fill the Hugging Face model hyperpameters of a
Auto-fill the Hugging Face model hyperpameters and loader parameters of a
[Curated Transformer](/api/curated-transformer) pipeline component in a
[.cfg file](/usage/training#config). The name and revision of the Hugging Face
is read from the `initialize.components.transformer.encoder_loader` config
section.
can either be passed as command-line arguments or read from the
`initialize.components.transformer.encoder_loader` config section.
```bash
$ python -m spacy init fill-config-transformer [base_path] [output_file] [--code] [--name]
$ python -m spacy init fill-curated-transformer [base_path] [output_file] [--model-name] [--model-revision] [--pipe-name] [--code]
```
| Name | Description |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `base_path` | Path to base config to fill, e.g. generated by the [quickstart widget](/usage/training#quickstart). ~~Path (positional)~~ |
| `output_file` | Path to output `.cfg` file or "-" to write to stdout so you can pipe it to a file. Defaults to "-" (stdout). ~~Path (positional)~~ |
| `--code`, `-c` | Path to Python file with additional code to be imported. Allows [registering custom functions](/usage/training#custom-functions) for new architectures. ~~Optional[Path] \(option)~~ |
| `--name`, `-n` | Name of the curated transformer pipe whose config is to be filled. Defaults to the first transformer pipe. ~~Optional[str] (option)~~ |
| **CREATES** | Complete and auto-filled config file for training. |
TODO: update
| Name | Description |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `base_path` | Path to base config to fill, e.g. generated by the [quickstart widget](/usage/training#quickstart). ~~Path (positional)~~ |
| `output_file` | Path to output `.cfg` file or "-" to write to stdout so you can pipe it to a file. Defaults to "-" (stdout). ~~Path (positional)~~ |
| `--model-name`, `-m` | Name of the Hugging Face model. Defaults to the model name in from the encoder loader config. ~~Optional[str] (option)~~ |
| `--model-revision`, `-r` | Revision of the Hugging Face model. Defaults to `main`. ~~Optional[str] (option)~~ |
| `--pipe-name`, `-n` | Name of the curated transformer pipe whose config is to be filled. Defaults to the first transformer pipe. ~~Optional[str] (option)~~ |
| `--code`, `-c` | Path to Python file with additional code to be imported. Allows [registering custom functions](/usage/training#custom-functions) for new architectures. ~~Optional[Path] \(option)~~ |
| **CREATES** | Complete and auto-filled config file for training. |
### init vectors {id="init-vectors",version="3",tag="command"}