Skip to content

Commit

Permalink
Fix CI failures (facebookresearch#2842)
Browse files Browse the repository at this point in the history
  • Loading branch information
shchur authored Jan 22, 2024
1 parent 5c21e65 commit 6ff79b1
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions plugins/hydra_ax_sweeper/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions plugins/hydra_optuna_sweeper/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion plugins/hydra_rq_launcher/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,6 @@ def test_example(tmpdir: Path) -> None:
"-m",
f"hydra.sweep.dir={tmpdir}",
"hydra/launcher=submitit_local",
]
],
allow_warnings=True,
)
4 changes: 3 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
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*
1 change: 1 addition & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ff79b1

Please sign in to comment.