Hi I am running train-search script as described here for the WandB integration https://github.com/explosion/projects/tree/v3/integrations/wandb
import typer
from pathlib import Path
from spacy.cli.train import train
def main(config_dir: Path, default_config: str, results_dir: Path):
"""Run all config files instead of the default one.
Ideally, these runs are parellellized instead of run in sequence."""
for config_file in config_dir.iterdir():
if config_file.name != default_config:
output_path = results_dir / config_file.stem
if not output_path.exists():
output_path.mkdir()
train(config_path=config_file, output_path=output_path)
if __name__ == "__main__":
typer.run(main)
I am getting the following error:
TypeError: train() got an unexpected keyword argument 'config_path'
I suspect that the error is due to the fact that there is no train function in spacy.cli.train. So I changed this line
from spacy.cli.train import train
to
from spacy.cli.train import train_cli and changed the train() to train_cli in the script.
which now gives the following error:
TypeError: train_cli() missing 1 required positional argument: 'ctx'
Any idea how to make train-search work?
Thank you!
Thanks for the report. While we're testing the release candidates and getting feedback, we're sometimes still slightly changing the API's and it could very well be that some of the projects have gone a bit outdated. I'll have a look!
Thank you for the response. Please let me know once you find a way to fix it.
This should be fixed by https://github.com/explosion/projects/pull/24!
Nice!!! Thank you for the update!
Most helpful comment
This should be fixed by https://github.com/explosion/projects/pull/24!