mirror of
				https://github.com/hiyouga/LLaMA-Factory.git
				synced 2025-11-04 18:02:19 +08:00 
			
		
		
		
	fix dataset
Former-commit-id: a7ce244a6d83d62f5bbecc588f1978e3791fd3b3
This commit is contained in:
		
							parent
							
								
									e4a424cb6a
								
							
						
					
					
						commit
						b7df920860
					
				@ -1 +1 @@
 | 
			
		||||
0fe460c57c1a1dae70cdd72b185129c2aaae4e24
 | 
			
		||||
4748dff00d1dc42768a5b6cc772143c313017812
 | 
			
		||||
@ -60,7 +60,7 @@ def convert_sharegpt(examples: Dict[str, List[Any]], dataset_attr: "DatasetAttr"
 | 
			
		||||
                accept_tags = [dataset_attr.assistant_tag, dataset_attr.function_tag]
 | 
			
		||||
 | 
			
		||||
            if message[dataset_attr.role_tag] not in accept_tags:
 | 
			
		||||
                raise ValueError("Invalid role tag.")
 | 
			
		||||
                raise ValueError("Invalid role tag in {}.".format(messages))
 | 
			
		||||
 | 
			
		||||
            prompt.append({"role": tag_mapping[message[dataset_attr.role_tag]], "content": message[dataset_attr.content_tag]})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user