diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index db1bef2b7..24e31a40f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - name: Install build dependencies uses: ./.github/actions/install-build-dependencies @@ -47,7 +47,7 @@ jobs: - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - name: Install build dependencies uses: ./.github/actions/install-cmake-build-dependencies @@ -119,7 +119,7 @@ jobs: - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - name: Install build dependencies uses: ./.github/actions/install-cmake-build-dependencies @@ -171,7 +171,7 @@ jobs: - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - name: Install build dependencies uses: ./.github/actions/install-build-dependencies @@ -197,7 +197,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.6, 3.7, 3.8, 3.9] + python: [3.6, 3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v2 @@ -234,7 +234,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.9] + python: ['3.10'] steps: - uses: actions/checkout@v2 @@ -294,7 +294,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.6, 3.7, 3.8, 3.9] + python: [3.6, 3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v2 @@ -326,7 +326,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.8, 3.9] + python: [3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v2 @@ -363,7 +363,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.6, 3.7, 3.8, 3.9] + python: [3.6, 3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v2 @@ -397,7 +397,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.9] + python: ['3.10'] steps: - uses: actions/checkout@v2 @@ -431,7 +431,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.9] + python: ['3.10'] steps: - uses: actions/checkout@v2 @@ -472,7 +472,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - uses: actions/checkout@v2 @@ -505,7 +505,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - name: Download Python wheel uses: actions/download-artifact@v2 @@ -534,7 +534,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - uses: actions/checkout@v2 @@ -567,7 +567,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - name: Download Python wheel uses: actions/download-artifact@v2 @@ -595,7 +595,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.6, 3.7, 3.8, 3.9] + python: [3.6, 3.7, 3.8, 3.9, '3.10'] steps: - uses: actions/checkout@v2 @@ -630,7 +630,7 @@ jobs: strategy: fail-fast: false matrix: - python: [3.9] + python: ['3.10'] steps: - uses: actions/checkout@v2 @@ -667,7 +667,7 @@ jobs: - name: Setup python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - name: Install build dependencies uses: ./.github/actions/install-build-dependencies @@ -700,7 +700,7 @@ jobs: - name: Setup python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - name: Download Python wheel uses: actions/download-artifact@v2 @@ -753,7 +753,7 @@ jobs: - uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: '3.10' - uses: actions/setup-node@v2 with: diff --git a/compiler_gym/envs/gcc/gcc.py b/compiler_gym/envs/gcc/gcc.py index 7f00c7f6e..577db45f8 100755 --- a/compiler_gym/envs/gcc/gcc.py +++ b/compiler_gym/envs/gcc/gcc.py @@ -22,6 +22,7 @@ import pickle import re import subprocess +import warnings from functools import lru_cache from pathlib import Path from typing import Dict, List, NamedTuple, Optional, Union @@ -222,15 +223,18 @@ def __repr__(self) -> str: @lru_cache(maxsize=2) def get_docker_client(): """Fetch the docker client singleton.""" - try: - return docker.from_env() - except docker.errors.DockerException as e: - raise EnvironmentNotSupported( - f"Failed to initialize docker client needed by GCC environment: {e}.\n" - "Have you installed the runtime dependencies?\n See " - " " - "for details." - ) from e + # Ignore deprecation warnings from docker.from_env(). + with warnings.catch_warnings(): + warnings.filterwarnings("ignore", category=DeprecationWarning) + try: + return docker.from_env() + except docker.errors.DockerException as e: + raise EnvironmentNotSupported( + f"Failed to initialize docker client needed by GCC environment: {e}.\n" + "Have you installed the runtime dependencies?\n See " + " " + "for details." + ) from e # We only need to run this function once per image. diff --git a/examples/requirements.txt b/examples/requirements.txt index 30c2af1c3..472d37d31 100644 --- a/examples/requirements.txt +++ b/examples/requirements.txt @@ -1,8 +1,9 @@ aioredis<2.0.0 # Pin version for ray. -dgl==0.6.1 +dgl==0.9.0 geneticalgorithm>=1.0.2 hydra-core==1.1.0 -keras==2.6.0 +keras==2.6.0;python_version<"3.7" +keras==2.8.0;python_version>="3.7" matplotlib>=3.3.4 nevergrad>=0.4.3 # NOTE(github.com/facebookresearch/CompilerGym/issues/750) Pin numpy version back @@ -10,9 +11,10 @@ nevergrad>=0.4.3 numpy>=1.19.3,<1.20.0 opentuner>=0.8.5 pandas>=1.1.5 -ray[default,rllib]==1.9.0 +ray[default,rllib]==1.13.0 submitit>=1.2.0 submitit>=1.2.0 -tensorflow==2.6.1 +tensorflow==2.6.2;python_version<"3.7" +tensorflow==2.8.0;python_version>="3.7" torch>=1.6.0 typer[all]>=0.3.2 diff --git a/tests/mlir/rllib_ppo_smoke_test.py b/tests/mlir/rllib_ppo_smoke_test.py index acfc762c9..af70048a2 100644 --- a/tests/mlir/rllib_ppo_smoke_test.py +++ b/tests/mlir/rllib_ppo_smoke_test.py @@ -54,7 +54,10 @@ def test_rllib_ppo_smoke(): "rollout_fragment_length": 2, } trainer = PPOTrainer(config=config) - trainer.train() + with warnings.catch_warnings(): + # Ignore deprecation warnings from internal rllib implementation. + warnings.filterwarnings("ignore", category=DeprecationWarning) + trainer.train() ray.shutdown()