diff --git a/ax/service/scheduler.py b/ax/service/scheduler.py index c76d7a59f57..7bf156b0044 100644 --- a/ax/service/scheduler.py +++ b/ax/service/scheduler.py @@ -15,7 +15,7 @@ from enum import Enum from logging import LoggerAdapter from time import sleep -from typing import Any, Callable, cast, List, NamedTuple, Optional +from typing import Any, Callable, cast, NamedTuple, Optional import ax.service.utils.early_stopping as early_stopping_utils from ax.core.base_trial import BaseTrial, TrialStatus @@ -1739,7 +1739,7 @@ def generate_candidates( self, num_trials: int = 1, reduce_state_generator_runs: bool = False, - ) -> List[BaseTrial]: + ) -> list[BaseTrial]: """Fetch the latest data and generate new candidate trials. Args: diff --git a/ax/storage/sqa_store/save.py b/ax/storage/sqa_store/save.py index 534a2cd508e..9dbf5ddadf6 100644 --- a/ax/storage/sqa_store/save.py +++ b/ax/storage/sqa_store/save.py @@ -7,10 +7,11 @@ # pyre-strict import os +from collections.abc import Sequence from datetime import datetime from logging import Logger -from typing import Any, Callable, cast, Optional, Sequence, Union +from typing import Any, Callable, cast, Optional, Union from ax.analysis.analysis import AnalysisCard diff --git a/scripts/validate_sphinx.py b/scripts/validate_sphinx.py index 411d610d2ba..28587460404 100755 --- a/scripts/validate_sphinx.py +++ b/scripts/validate_sphinx.py @@ -8,7 +8,6 @@ import os import pkgutil import re -from typing import Set # Paths are relative to top-level Ax directory (which is passed into fxn below) @@ -29,7 +28,7 @@ } -def parse_rst(rst_filename: str) -> Set[str]: +def parse_rst(rst_filename: str) -> set[str]: """Extract automodule directives from rst.""" ret = set() with open(rst_filename, "r") as f: