@@ -32,6 +32,10 @@ def test_pipeline_fit(self, fit_dictionary, backbone, head):
3232 assert backbone == config .get ('network_backbone:__choice__' , None )
3333 assert head == config .get ('network_head:__choice__' , None )
3434 pipeline .set_hyperparameters (config )
35+
36+ # Need more epochs to make sure validation performance is met
37+ fit_dictionary ['epochs' ] = 100
38+
3539 pipeline .fit (fit_dictionary )
3640
3741 # To make sure we fitted the model, there should be a
@@ -44,9 +48,10 @@ def test_pipeline_fit(self, fit_dictionary, backbone, head):
4448 assert run_summary .total_parameter_count > 0
4549 assert 'accuracy' in run_summary .performance_tracker ['train_metrics' ][1 ]
4650
47- # Commented out the next line as some pipelines are not
48- # achieving this accuracy with default configuration and 10 epochs
49- # To be added once we fix the search space
50- # assert run_summary.performance_tracker['val_metrics'][fit_dictionary['epochs']]['accuracy'] >= 0.8
51+ # Make sure default pipeline achieves a good score for dummy datasets
52+ assert run_summary .performance_tracker [
53+ 'val_metrics'
54+ ][fit_dictionary ['epochs' ]]['accuracy' ] >= 0.8 , run_summary .performance_tracker ['val_metrics' ]
55+
5156 # Make sure a network was fit
5257 assert isinstance (pipeline .named_steps ['network' ].get_network (), torch .nn .Module )
0 commit comments