7
7
from graphdatascience .pipeline .lp_training_pipeline import LPTrainingPipeline
8
8
from graphdatascience .pipeline .nc_training_pipeline import NCTrainingPipeline
9
9
from graphdatascience .query_runner .neo4j_query_runner import Neo4jQueryRunner
10
+ from graphdatascience .server_version .server_version import ServerVersion
10
11
11
12
PIPE_NAME = "pipe"
12
13
@@ -180,6 +181,7 @@ def test_add_logistic_regression_lp_pipeline(lp_pipe: LPTrainingPipeline) -> Non
180
181
assert lr_parameter_space [0 ]["penalty" ] == 42
181
182
182
183
184
+ @pytest .mark .compatible_with (min_inclusive = ServerVersion (2 , 1 , 0 ))
183
185
def test_add_logistic_regression_with_range_lp_pipeline (lp_pipe : LPTrainingPipeline ) -> None :
184
186
res = lp_pipe .addLogisticRegression (penalty = (42 , 1337 ))
185
187
lr_parameter_space = res ["parameterSpace" ]["LogisticRegression" ]
@@ -204,11 +206,13 @@ def test_parameter_space_lp_pipeline(lp_pipe: LPTrainingPipeline) -> None:
204
206
assert "penalty" in parameter_space ["LogisticRegression" ][0 ]
205
207
206
208
209
+ @pytest .mark .compatible_with (min_inclusive = ServerVersion (2 , 1 , 0 ))
207
210
def test_auto_tuning_config_lp_pipeline (lp_pipe : LPTrainingPipeline ) -> None :
208
211
tuning_config = lp_pipe .auto_tuning_config ()
209
212
assert "maxTrials" in tuning_config
210
213
211
214
215
+ @pytest .mark .compatible_with (min_inclusive = ServerVersion (2 , 1 , 0 ))
212
216
def test_configure_auto_tuning_lp_pipeline (lp_pipe : LPTrainingPipeline ) -> None :
213
217
maxTrials = 1337
214
218
result = lp_pipe .configureAutoTuning (maxTrials = maxTrials )
0 commit comments