Skip to content

Commit

Permalink
do not run for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonalaird committed Apr 30, 2024
1 parent 982bbff commit 96ce209
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions vision_agent/agent/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ def time_limit(seconds: float) -> Generator[None, None, None]:
def signal_handler(signum, frame): # type: ignore
raise TimeoutError("Timed out!")

if platform.uname().system == "Windows":
raise NotImplementedError("Timeouts are not supported on Windows.")

signal.setitimer(signal.ITIMER_REAL, seconds)
signal.signal(signal.SIGALRM, signal_handler)
try:
Expand All @@ -211,6 +214,11 @@ def reliability_guard(maximum_memory_bytes: Optional[int] = None) -> None:
if maximum_memory_bytes is not None:
import resource

if platform.uname().system == "Windows":
raise NotImplementedError(
"Memory limits are not supported on Windows."
)

resource.setrlimit(
resource.RLIMIT_AS, (maximum_memory_bytes, maximum_memory_bytes)
)
Expand Down

0 comments on commit 96ce209

Please sign in to comment.