Skip to content

Commit 82ec519

Browse files
samluryemeta-codesync[bot]
authored andcommitted
Fix type error in test_python_actors.py (#1393)
Summary: Pull Request resolved: #1393 This fixes broken github CI due to `ProcessAllocator` being marked final. ghstack-source-id: 313483343 exported-using-ghexport Reviewed By: benjipelletier Differential Revision: D83671339 fbshipit-source-id: dbccfb3626824200416451d6568ce7f746b079e8
1 parent 7f945af commit 82ec519

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

python/monarch/_rust_bindings/monarch_hyperactor/alloc.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ from datetime import timedelta
1010

1111
from typing import Dict, final, Optional
1212

13-
from monarch._rust_bindings.monarch_hyperactor.alloc import Alloc, AllocSpec
14-
from monarch._rust_bindings.monarch_hyperactor.mailbox import Mailbox
1513
from monarch._rust_bindings.monarch_hyperactor.pytokio import PythonTask
1614

1715
from typing_extensions import Self

python/monarch/_src/actor/allocator.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ def _stream_logs(self) -> bool:
102102
...
103103

104104

105-
@final
106105
class ProcessAllocator(ProcessAllocatorBase, AllocateMixin):
107106
"""
108107
An allocator that allocates by spawning local processes.

python/tests/test_python_actors.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
PythonMessage,
3131
PythonMessageKind,
3232
)
33+
from monarch._rust_bindings.monarch_hyperactor.alloc import Alloc, AllocSpec
3334
from monarch._rust_bindings.monarch_hyperactor.mailbox import (
3435
PortId,
3536
PortRef,
@@ -790,6 +791,11 @@ async def test_stream_logs_case(stream_logs: bool, test_name: str) -> None:
790791
else:
791792

792793
class ProcessAllocatorStreamLogs(ProcessAllocator):
794+
def allocate_nonblocking(
795+
self, spec: AllocSpec
796+
) -> PythonTask[Alloc]:
797+
return super().allocate_nonblocking(spec)
798+
793799
def _stream_logs(self) -> bool:
794800
return stream_logs
795801

0 commit comments

Comments
 (0)