@@ -91,14 +91,14 @@ def test_artificial_big(model):
9191 yaml_i ["spec" ]["target_category_columns" ] = [TARGET_CATEGORY_COLUMN ]
9292 yaml_i ["spec" ]["datetime_column" ]["name" ] = DATETIME_COLUMN
9393
94- run (yaml_i , backend = "operator.local" , debug = False )
95-
96- # with open(anomaly_yaml_filename, "w") as f:
97- # f.write(yaml.dump(yaml_i))
98- # sleep(0.1)
99- # subprocess.run(
100- # f"ads operator run -f {anomaly_yaml_filename} --debug", shell=True
101- # )
94+ # run(yaml_i, backend="operator.local", debug=False)
95+
96+ with open (anomaly_yaml_filename , "w" ) as f :
97+ f .write (yaml .dump (yaml_i ))
98+ sleep (0.1 )
99+ subprocess .run (
100+ f"ads operator run -f { anomaly_yaml_filename } --debug" , shell = True
101+ )
102102 sleep (0.1 )
103103 subprocess .run (f"ls -a { output_dirname } /" , shell = True )
104104 assert os .path .exists (f"{ output_dirname } /report.html" ), "Report not generated."
@@ -131,15 +131,15 @@ def test_artificial_small(model):
131131 yaml_i ["spec" ]["output_directory" ]["url" ] = output_dirname
132132 yaml_i ["spec" ]["contamination" ] = 0.3
133133
134- run (yaml_i , backend = "operator.local" , debug = False )
134+ # run(yaml_i, backend="operator.local", debug=False)
135135
136- # with open(anomaly_yaml_filename, "w") as f:
137- # f.write(yaml.dump(yaml_i))
138- # sleep(0.1)
139- # subprocess.run(
140- # f"ads operator run -f {anomaly_yaml_filename} --debug", shell=True
141- # )
142- # sleep(0.1)
136+ with open (anomaly_yaml_filename , "w" ) as f :
137+ f .write (yaml .dump (yaml_i ))
138+ sleep (0.1 )
139+ subprocess .run (
140+ f"ads operator run -f { anomaly_yaml_filename } --debug" , shell = True
141+ )
142+ sleep (0.1 )
143143 subprocess .run (f"ls -a { output_dirname } /" , shell = True )
144144 assert os .path .exists (f"{ output_dirname } /report.html" ), "Report not generated."
145145
@@ -185,14 +185,14 @@ def test_validation(model):
185185 yaml_i ["spec" ]["output_directory" ]["url" ] = output_dirname
186186 yaml_i ["spec" ]["contamination" ] = 0.05
187187
188- run (yaml_i , backend = "operator.local" , debug = False )
189- # with open(anomaly_yaml_filename, "w") as f:
190- # f.write(yaml.dump(yaml_i))
191- # sleep(0.1)
192- # subprocess.run(
193- # f"ads operator run -f {anomaly_yaml_filename} --debug", shell=True
194- # )
195- # sleep(0.1)
188+ # run(yaml_i, backend="operator.local", debug=False)
189+ with open (anomaly_yaml_filename , "w" ) as f :
190+ f .write (yaml .dump (yaml_i ))
191+ sleep (0.1 )
192+ subprocess .run (
193+ f"ads operator run -f { anomaly_yaml_filename } --debug" , shell = True
194+ )
195+ sleep (0.1 )
196196 subprocess .run (f"ls -a { output_dirname } /" , shell = True )
197197 assert os .path .exists (f"{ output_dirname } /report.html" ), "Report not generated."
198198
@@ -209,15 +209,15 @@ def test_load_datasets(model, data_dict):
209209 yaml_i ["spec" ]["datetime_column" ]["name" ] = data_dict ["dt_col" ]
210210 yaml_i ["spec" ]["output_directory" ]["url" ] = output_dirname
211211
212- run (yaml_i , backend = "operator.local" , debug = False )
212+ # run(yaml_i, backend="operator.local", debug=False)
213213
214- # with open(f"{tmpdirname}/anomaly.yaml", "w") as f:
215- # f.write(yaml.dump(yaml_i))
216- # sleep(0.5)
217- # subprocess.run(
218- # f"ads operator run -f {anomaly_yaml_filename} --debug", shell=True
219- # )
220- # sleep(0.1)
214+ with open (f"{ tmpdirname } /anomaly.yaml" , "w" ) as f :
215+ f .write (yaml .dump (yaml_i ))
216+ sleep (0.5 )
217+ subprocess .run (
218+ f"ads operator run -f { anomaly_yaml_filename } --debug" , shell = True
219+ )
220+ sleep (0.1 )
221221 subprocess .run (f"ls -a { output_dirname } /" , shell = True )
222222
223223 # train_metrics = pd.read_csv(f"{output_dirname}/metrics.csv")
0 commit comments