WandB integration: from spacy.cli.train import train doesn't work
See original GitHub issueThere is no train function in spacy.cli.train module.
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!
Environment
- spaCy version: 3.0.0rc2
- Platform: Darwin-20.1.0-x86_64-i386-64bit
- Python version: 3.7.9
- Pipelines: en_core_web_trf (3.0.0a0)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
spaCy - Documentation - Weights & Biases - Wandb
spaCy config files are used to specify all aspects of training, not just logging -- GPU allocation, optimizer choice, dataset paths, and more....
Read more >Projects · spaCy Usage Documentation
spaCy projects let you manage and share end-to-end spaCy workflows for different use cases and domains, and orchestrate training, packaging and serving your ......
Read more >Logging results and uploading models to Weights & Biases
It assumes you're logged in into Wandb via an API key or wandb login . from ray.train.xgboost import XGBoostTrainer def train_model_xgboost ...
Read more >Introducing spaCy v3.0
You can then run spacy ray train for parallel training. Parallel training with Ray pip install spacy-ray --pre # Check that the CLI...
Read more >attributeerror: module 'wandb' has no attribute 'run'
I already create new environment ,but it doesn't work. ... from train import parseopt, train from utils.callbacks import Callbacks from utils.general import ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should be fixed by https://github.com/explosion/projects/pull/24!
Nice!!! Thank you for the update!