mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-30 15:37:29 +03:00 
			
		
		
		
	add reenabled pipe names back to the meta before serializing (#6219)
This commit is contained in:
		
							parent
							
								
									2998131416
								
							
						
					
					
						commit
						241cd112f5
					
				|  | @ -204,7 +204,7 @@ def train( | |||
|                     "positive_label": textcat_positive_label, | ||||
|                 } | ||||
|             if pipe not in nlp.pipe_names: | ||||
|                 msg.text("Adding component to base model '{}'".format(pipe)) | ||||
|                 msg.text("Adding component to base model: '{}'".format(pipe)) | ||||
|                 nlp.add_pipe(nlp.create_pipe(pipe, config=pipe_cfg)) | ||||
|                 pipes_added = True | ||||
|             elif replace_components: | ||||
|  | @ -574,6 +574,7 @@ def train( | |||
|         best_pipes = nlp.pipe_names | ||||
|         if disabled_pipes: | ||||
|             disabled_pipes.restore() | ||||
|             meta["pipeline"] = nlp.pipe_names | ||||
|         with nlp.use_params(optimizer.averages): | ||||
|             final_model_path = output_path / "model-final" | ||||
|             nlp.to_disk(final_model_path) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user