mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
prevent overwriting score_weights
This commit is contained in:
parent
62eec33bc4
commit
711166a75a
|
@ -243,7 +243,8 @@ class Language:
|
|||
self._config["nlp"]["pipeline"] = list(self.component_names)
|
||||
self._config["nlp"]["disabled"] = list(self.disabled)
|
||||
self._config["components"] = pipeline
|
||||
self._config["training"]["score_weights"] = combine_score_weights(score_weights)
|
||||
if not self._config["training"].get("score_weights"):
|
||||
self._config["training"]["score_weights"] = combine_score_weights(score_weights)
|
||||
if not srsly.is_json_serializable(self._config):
|
||||
raise ValueError(Errors.E961.format(config=self._config))
|
||||
return self._config
|
||||
|
|
Loading…
Reference in New Issue
Block a user