mirror of https://github.com/explosion/spaCy.git
fix wandb logger when calling multiple times from same script
This commit is contained in:
parent
b7faa38960
commit
7677e5c0e2
|
@ -72,7 +72,7 @@ def wandb_logger(project_name: str, remove_config_values: List[str] = []):
|
||||||
for field in remove_config_values:
|
for field in remove_config_values:
|
||||||
del config_dot[field]
|
del config_dot[field]
|
||||||
config = util.dot_to_dict(config_dot)
|
config = util.dot_to_dict(config_dot)
|
||||||
wandb.init(project=project_name, config=config)
|
wandb.init(project=project_name, config=config, reinit=True)
|
||||||
console_log_step, console_finalize = console(nlp)
|
console_log_step, console_finalize = console(nlp)
|
||||||
|
|
||||||
def log_step(info: Dict[str, Any]):
|
def log_step(info: Dict[str, Any]):
|
||||||
|
@ -88,7 +88,7 @@ def wandb_logger(project_name: str, remove_config_values: List[str] = []):
|
||||||
|
|
||||||
def finalize():
|
def finalize():
|
||||||
console_finalize()
|
console_finalize()
|
||||||
pass
|
wandb.join()
|
||||||
|
|
||||||
return log_step, finalize
|
return log_step, finalize
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue