@@ -91,14 +91,14 @@ def test_artificial_big(model):
91
91
yaml_i ["spec" ]["target_category_columns" ] = [TARGET_CATEGORY_COLUMN ]
92
92
yaml_i ["spec" ]["datetime_column" ]["name" ] = DATETIME_COLUMN
93
93
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
+ )
102
102
sleep (0.1 )
103
103
subprocess .run (f"ls -a { output_dirname } /" , shell = True )
104
104
assert os .path .exists (f"{ output_dirname } /report.html" ), "Report not generated."
@@ -131,15 +131,15 @@ def test_artificial_small(model):
131
131
yaml_i ["spec" ]["output_directory" ]["url" ] = output_dirname
132
132
yaml_i ["spec" ]["contamination" ] = 0.3
133
133
134
- run (yaml_i , backend = "operator.local" , debug = False )
134
+ # run(yaml_i, backend="operator.local", debug=False)
135
135
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 )
143
143
subprocess .run (f"ls -a { output_dirname } /" , shell = True )
144
144
assert os .path .exists (f"{ output_dirname } /report.html" ), "Report not generated."
145
145
@@ -185,14 +185,14 @@ def test_validation(model):
185
185
yaml_i ["spec" ]["output_directory" ]["url" ] = output_dirname
186
186
yaml_i ["spec" ]["contamination" ] = 0.05
187
187
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 )
196
196
subprocess .run (f"ls -a { output_dirname } /" , shell = True )
197
197
assert os .path .exists (f"{ output_dirname } /report.html" ), "Report not generated."
198
198
@@ -209,15 +209,15 @@ def test_load_datasets(model, data_dict):
209
209
yaml_i ["spec" ]["datetime_column" ]["name" ] = data_dict ["dt_col" ]
210
210
yaml_i ["spec" ]["output_directory" ]["url" ] = output_dirname
211
211
212
- run (yaml_i , backend = "operator.local" , debug = False )
212
+ # run(yaml_i, backend="operator.local", debug=False)
213
213
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 )
221
221
subprocess .run (f"ls -a { output_dirname } /" , shell = True )
222
222
223
223
# train_metrics = pd.read_csv(f"{output_dirname}/metrics.csv")
0 commit comments