Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@ name = "pypi"

[packages]
absl-py = "==2.1.0"
dm-reverb = "==0.14.0"
gin-config = "==0.5.0"
psutil = "==6.1.0"
tf-agents = "==0.19.0"
setuptools = {version = "75.8.0", markers="python_version >= '3.12'"}
tensorflow = "==2.15.0"
dm-reverb = "==0.14.0"
tf-agents = "==0.19.0"

[dev-packages]
pylint = "==3.3.2"
pytest = "==8.3.4"
pytype = "==2024.10.11"
ruff = "==0.9.6"
yapf = "==0.43.0"
ruff = "==0.9.3"

[ci]
joblib = "==1.4.2"
Expand Down
7 changes: 7 additions & 0 deletions compiler_opt/rl/compilation_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import shlex
import signal
import subprocess
import sys
import tempfile
import threading
from typing import Callable, Dict, List, Optional, Tuple
Expand Down Expand Up @@ -80,6 +81,12 @@ def __exit__(self, exc, value, tb):
pass


if sys.version_info >= (3, 12):
from functools import partial

NonTemporaryDirectory = partial(tempfile.TemporaryDirectory, delete=False)


def get_workdir_context(explicit_temps_dir: Optional[str] = None):
"""Return a context which manages how the temperory directories are handled.

Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ filterwarnings = [
"ignore:Using or importing the ABCs from 'collections':DeprecationWarning",
# Issue #119
"ignore:Encoding a StructuredValue with type tfp.distributions.Deterministic_ACTTypeSpec:UserWarning",
# This warning stems from tensorflow and tf-agents and will presumably
# be fixed by them before v3.12
"ignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives:DeprecationWarning",
# Also an issue internal to tensorflow
# An issue internal to tensorflow
"ignore:Call to deprecated create function .*Descriptor.*:DeprecationWarning",
# Also internal to tensorflow
"ignore:non-integer arguments to randrange.*:DeprecationWarning",
Expand Down