|
31 | 31 | import sys |
32 | 32 | from typing import List, Optional |
33 | 33 |
|
34 | | -import yaml |
35 | | - |
36 | 34 | from common import benchmark_utils |
37 | 35 | from common import fuzzer_utils |
38 | 36 | from common import filesystem |
39 | 37 | from common import logs |
40 | | -from common import yaml_utils |
41 | | -from service import automatic_run_experiment |
42 | 38 | from src_analysis import change_utils |
43 | 39 | from src_analysis import diff_utils |
44 | 40 |
|
@@ -258,31 +254,6 @@ def yapf(paths: List[Path], validate: bool = True) -> bool: |
258 | 254 | return success |
259 | 255 |
|
260 | 256 |
|
261 | | -def validate_experiment_requests(paths: List[Path]): |
262 | | - """Returns False if service/experiment-requests.yaml it is in |paths| and is |
263 | | - not valid.""" |
264 | | - if Path(automatic_run_experiment.REQUESTED_EXPERIMENTS_PATH) not in paths: |
265 | | - return True |
266 | | - |
267 | | - try: |
268 | | - experiment_requests = yaml_utils.read( |
269 | | - automatic_run_experiment.REQUESTED_EXPERIMENTS_PATH) |
270 | | - except yaml.parser.ParserError: |
271 | | - print('Error parsing ' |
272 | | - f'{automatic_run_experiment.REQUESTED_EXPERIMENTS_PATH}.') |
273 | | - return False |
274 | | - |
275 | | - # Only validate the latest request. |
276 | | - result = automatic_run_experiment.validate_experiment_requests( |
277 | | - experiment_requests[:1]) |
278 | | - |
279 | | - if not result: |
280 | | - print(f'{automatic_run_experiment.REQUESTED_EXPERIMENTS_PATH}' |
281 | | - 'is not valid.') |
282 | | - |
283 | | - return result |
284 | | - |
285 | | - |
286 | 257 | def is_path_ignored(path: Path) -> bool: |
287 | 258 | """Returns True if |path| is a subpath of an ignored directory or is a |
288 | 259 | third_party directory.""" |
@@ -441,7 +412,6 @@ def main() -> int: |
441 | 412 | ('typecheck', pytype), |
442 | 413 | ('test', pytest), |
443 | 414 | ('validate_fuzzers_and_benchmarks', validate_fuzzers_and_benchmarks), |
444 | | - ('validate_experiment_requests', validate_experiment_requests), |
445 | 415 | ('test_changed_integrations', test_changed_integrations), |
446 | 416 | ] |
447 | 417 |
|
|
0 commit comments