Commit 4ce8562 1 parent 27bf22f commit 4ce8562 Copy full SHA for 4ce8562
File tree 1 file changed +5
-17
lines changed
test_opensearchpy/test_server/test_plugins
1 file changed +5
-17
lines changed Original file line number Diff line number Diff line change @@ -79,26 +79,14 @@ def test_knn_model(self) -> None:
79
79
}
80
80
})
81
81
82
- time_out = time .time () + 900 # Waiting for model to train before searching it.
83
-
82
+ time_out = time .time () + 60 # Waiting for model to train before searching it.
83
+
84
84
while time .time () < time_out :
85
-
86
85
# Fetch the model state
87
- try :
88
- response = self .client .plugins .knn .get_model (model_id = 'my-model' )
89
- if response ['state' ] != 'training' :
90
- pass
91
- except Exception as error :
92
- print (f"Error fetching knn model: { error } " )
86
+ response = self .client .plugins .knn .get_model (model_id = 'my-model' )
87
+ if response ['state' ] != 'training' :
93
88
break
94
-
95
- # Sleep for 1 minute before the next attempt
96
- time .sleep (10 )
97
-
98
-
99
-
100
-
101
- #self.client.plugins.knn.get_model(model_id= 'my-model')
89
+ time .sleep (5 )
102
90
103
91
print ("response" , response )
104
92
self .client .plugins .knn .delete_model (model_id = 'my-model' )
You can’t perform that action at this time.
0 commit comments