diff --git a/.mypy.ini b/.mypy.ini index a75af6c5722..08ccb974155 100644 --- a/.mypy.ini +++ b/.mypy.ini @@ -11,3 +11,9 @@ ignore_missing_imports = True [mypy-hydra.grammar.gen.*] ignore_missing_imports = True ignore_errors = True + +[mypy-nevergrad.*] +ignore_missing_imports = True + +[mypy-rq.*] +ignore_missing_imports = True diff --git a/plugins/hydra_ax_sweeper/setup.py b/plugins/hydra_ax_sweeper/setup.py index b49ffff8f71..3f668c5c3f9 100644 --- a/plugins/hydra_ax_sweeper/setup.py +++ b/plugins/hydra_ax_sweeper/setup.py @@ -30,6 +30,8 @@ "ax-platform>=0.1.20,<0.2.1", # https://github.com/facebookresearch/hydra/issues/1767 "torch", "gpytorch<=1.8.1", # avoid deprecation warnings. This can probably be removed when ax-platform is unpinned. + "pandas<1.5.0", # https://github.com/facebook/Ax/issues/1153, unpin when upgrading ax to >=0.2.8 + "numpy<1.25.0", # same as above, silences deprecation from np.find_common_type for pandas <1.5 ], include_package_data=True, ) diff --git a/plugins/hydra_nevergrad_sweeper/hydra_plugins/hydra_nevergrad_sweeper/_impl.py b/plugins/hydra_nevergrad_sweeper/hydra_plugins/hydra_nevergrad_sweeper/_impl.py index 6424e4c7f95..37329424a1f 100644 --- a/plugins/hydra_nevergrad_sweeper/hydra_plugins/hydra_nevergrad_sweeper/_impl.py +++ b/plugins/hydra_nevergrad_sweeper/hydra_plugins/hydra_nevergrad_sweeper/_impl.py @@ -76,7 +76,7 @@ def create_nevergrad_parameter_from_override(override: Override) -> Any: if "log" in val.tags: scalar = ng.p.Log(lower=val.start, upper=val.end) else: - scalar = ng.p.Scalar(lower=val.start, upper=val.end) # type: ignore + scalar = ng.p.Scalar(lower=val.start, upper=val.end) if isinstance(val.start, int): scalar.set_integer_casting() return scalar diff --git a/plugins/hydra_optuna_sweeper/setup.py b/plugins/hydra_optuna_sweeper/setup.py index 23a5a5435c5..4d735c99446 100644 --- a/plugins/hydra_optuna_sweeper/setup.py +++ b/plugins/hydra_optuna_sweeper/setup.py @@ -29,6 +29,7 @@ install_requires=[ "hydra-core>=1.1.0.dev7", "optuna>=2.10.0,<3.0.0", + "sqlalchemy~=1.3.0", # TODO: Unpin when upgrading to optuna v3.0 ], include_package_data=True, ) diff --git a/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_config.py b/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_config.py index 01432b0bfbe..e4e1ac09eb8 100644 --- a/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_config.py +++ b/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_config.py @@ -3,11 +3,11 @@ from dataclasses import dataclass, field from enum import Enum, IntEnum from importlib import import_module +from importlib.metadata import version from typing import Any, Dict, List, Optional from hydra.core.config_store import ConfigStore from omegaconf import OmegaConf -from pkg_resources import get_distribution @dataclass @@ -178,11 +178,11 @@ def _pip_pkgs_default_factory() -> Dict[str, str]: "hydra_core": "${ray_pkg_version:hydra}", "ray": "${ray_pkg_version:ray}", "cloudpickle": "${ray_pkg_version:cloudpickle}", - "hydra_ray_launcher": get_distribution("hydra_ray_launcher").version, + "hydra_ray_launcher": version("hydra_ray_launcher"), } if sys.version_info < (3, 8): - d["pickle5"] = get_distribution("pickle5").version + d["pickle5"] = version("pickle5") return d diff --git a/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_core.py b/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_core.py index 9819f7dcd3f..35da61802d6 100644 --- a/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_core.py +++ b/plugins/hydra_ray_launcher/hydra_plugins/hydra_ray_launcher/_core.py @@ -32,6 +32,8 @@ def launch( f"sweep output dir: {sweep_dir}" ) + # Avoid allocating too little memory in CI https://github.com/ray-project/ray/issues/11966#issuecomment-1318100747 + launcher.ray_cfg.init.setdefault("object_store_memory", 78643200) start_ray(launcher.ray_cfg.init) runs = [] diff --git a/plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/_core.py b/plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/_core.py index 36a2bf551dc..fde4fcb03bf 100644 --- a/plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/_core.py +++ b/plugins/hydra_rq_launcher/hydra_plugins/hydra_rq_launcher/_core.py @@ -19,7 +19,7 @@ from hydra.types import HydraContext, TaskFunction from omegaconf import DictConfig, OmegaConf, open_dict from redis import Redis -from rq import Queue # type: ignore +from rq import Queue from .rq_launcher import RQLauncher diff --git a/plugins/hydra_rq_launcher/setup.py b/plugins/hydra_rq_launcher/setup.py index eb41695ae81..b3881755914 100644 --- a/plugins/hydra_rq_launcher/setup.py +++ b/plugins/hydra_rq_launcher/setup.py @@ -29,7 +29,7 @@ "cloudpickle", "fakeredis<1.7.4", # https://github.com/dsoftwareinc/fakeredis-py/issues/3 "hydra-core>=1.1.0.dev7", - "rq>=1.5.1", + "rq>=1.5.1,<1.12", ], include_package_data=True, ) diff --git a/plugins/hydra_submitit_launcher/tests/test_submitit_launcher.py b/plugins/hydra_submitit_launcher/tests/test_submitit_launcher.py index d59000efd2b..65f7a0e6a4c 100644 --- a/plugins/hydra_submitit_launcher/tests/test_submitit_launcher.py +++ b/plugins/hydra_submitit_launcher/tests/test_submitit_launcher.py @@ -58,5 +58,6 @@ def test_example(tmpdir: Path) -> None: "-m", f"hydra.sweep.dir={tmpdir}", "hydra/launcher=submitit_local", - ] + ], + allow_warnings=True, ) diff --git a/pytest.ini b/pytest.ini index bfbef0b9979..3b72ada2972 100644 --- a/pytest.ini +++ b/pytest.ini @@ -15,4 +15,6 @@ filterwarnings = ; Remove when default changes ignore:.*Future Hydra versions will no longer change working directory at job runtime by default.*:UserWarning ; Jupyter notebook test on Windows yield warnings - ignore:.*Proactor event loop does not implement add_reader family of methods required for zmq.*:RuntimeWarning \ No newline at end of file + ignore:.*Proactor event loop does not implement add_reader family of methods required for zmq.*:RuntimeWarning + ; Ignore deprecation warning related to pkg_resources + ignore:.*pkg_resources is deprecated* diff --git a/requirements/dev.txt b/requirements/dev.txt index c43ca403a20..d93d0295e9a 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -5,6 +5,7 @@ build coverage flake8<6 # pinned due to https://github.com/savoirfairelinux/flake8-copyright/issues/19 flake8-copyright +importlib-metadata<5.0; python_version <= '3.7' isort==5.5.2 mypy nox