mirror of
				https://github.com/microsoft/autogen.git
				synced 2025-10-30 17:29:47 +00:00 
			
		
		
		
	 ca35fa969f
			
		
	
	
		ca35fa969f
		
			
		
	
	
	
	
		
			
			* refactoring TransformersEstimator to support default and custom_hp * handling starting_points not in search space * addressing starting point more than max_iter * fixing upper < lower bug
		
			
				
	
	
		
			25 lines
		
	
	
		
			602 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			602 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| import sys
 | |
| import pytest
 | |
| from utils import get_toy_data_seqclassification, get_automl_settings
 | |
| 
 | |
| 
 | |
| @pytest.mark.skipif(sys.platform == "darwin", reason="do not run on mac os")
 | |
| def test_cv():
 | |
|     from flaml import AutoML
 | |
|     import requests
 | |
| 
 | |
|     X_train, y_train, X_val, y_val, X_test = get_toy_data_seqclassification()
 | |
|     automl = AutoML()
 | |
| 
 | |
|     automl_settings = get_automl_settings()
 | |
|     automl_settings["n_splits"] = 3
 | |
| 
 | |
|     try:
 | |
|         automl.fit(X_train=X_train, y_train=y_train, **automl_settings)
 | |
|     except requests.exceptions.HTTPError:
 | |
|         return
 | |
| 
 | |
| 
 | |
| if __name__ == "__main__":
 | |
|     test_cv()
 |