Skip to content

Commit

Permalink
Fix automatic_run_experiment:
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanmetzman committed Jun 21, 2024
1 parent 2ba282f commit 6354d93
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 617 deletions.
50 changes: 0 additions & 50 deletions docs/internal-documentation/service.md

This file was deleted.

26 changes: 0 additions & 26 deletions presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from common import filesystem
from common import logs
from common import yaml_utils
from service import automatic_run_experiment
from src_analysis import change_utils
from src_analysis import diff_utils

Expand Down Expand Up @@ -258,31 +257,6 @@ def yapf(paths: List[Path], validate: bool = True) -> bool:
return success


def validate_experiment_requests(paths: List[Path]):
"""Returns False if service/experiment-requests.yaml it is in |paths| and is
not valid."""
if Path(automatic_run_experiment.REQUESTED_EXPERIMENTS_PATH) not in paths:
return True

try:
experiment_requests = yaml_utils.read(
automatic_run_experiment.REQUESTED_EXPERIMENTS_PATH)
except yaml.parser.ParserError:
print('Error parsing '
f'{automatic_run_experiment.REQUESTED_EXPERIMENTS_PATH}.')
return False

# Only validate the latest request.
result = automatic_run_experiment.validate_experiment_requests(
experiment_requests[:1])

if not result:
print(f'{automatic_run_experiment.REQUESTED_EXPERIMENTS_PATH}'
'is not valid.')

return result


def is_path_ignored(path: Path) -> bool:
"""Returns True if |path| is a subpath of an ignored directory or is a
third_party directory."""
Expand Down
301 changes: 0 additions & 301 deletions service/automatic_run_experiment.py

This file was deleted.

Loading

0 comments on commit 6354d93

Please sign in to comment.