EveryVoiceTTS / EveryVoiceTTS/EveryVoice

Factor out more shared configuration from the different interence commands

Open
#699 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
45
Forks
4
Avg merge
1d 2h
Merged PRs (30d)
14

Description

### Description & Motivation

#697 will bring in the first bit of factored out code among the inference command parameter handling: `--config-args` to override the config at inference time. There are a number of other parameters that could be similarly factored out.

With #697, we're also renaming this `apply_inference_shared_parameters` since it doesn't do the actual base command, unlike preprocess_base_command or train_base_command, but the intent remains factoring out code that can be shared effectively.

### Additional context

This was the original interface, which was not used or implemented yet, but which we would like to use:

```python
def inference_base_command_interface(
config_file: Path = typer.Argument(
...,
exists=True,
dir_okay=False,
file_okay=True,
help="The path to your model configuration file.",
shell_complete=complete_path,
),
config_args: List[str] = typer.Option(None, "--config", "-c"),
accelerator: str = typer.Option(
"auto",
"--accelerator",
"-a",
help="Uses PyTorch Lightning Accelerators: https://pytorch-lightning.readthedocs.io/en/stable/extensions/accelerator.html",
),
devices: str = typer.Option(
"auto", "--devices", "-d", help="The number of GPUs on each node"
),
nodes: int = typer.Option(
1, "--nodes", "-n", help="The number of nodes on your machine"
),
strategy: str = typer.Option(
"ddp",
"--strategy",
"-s",
help="The strategy for data parallelization: https://pytorch-lightning.readthedocs.io/en/stable/accelerators/gpu_intermediate.html",
),
):
pass
```

With #697, `config_args` is actually implemented.
This issue is to document the other ones and track implementing them

### Subtasks

- [ ] `config_file` (TBD: might not make sense since the config is embedded in the model)
- [ ] `accelerator`
- [ ] `devices`
- [ ] `nodes`
- [ ] `strategy`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.