@@ -27,11 +27,7 @@ class FixedSizeSlotSupplier:
2727
2828@dataclass (frozen = True )
2929class ResourceBasedTunerConfig :
30- """Options for a :py:class:`ResourceBasedTuner` or a :py:class:`ResourceBasedSlotSupplier`.
31-
32- .. warning::
33- The resource based tuner is currently experimental.
34- """
30+ """Options for a :py:class:`ResourceBasedTuner` or a :py:class:`ResourceBasedSlotSupplier`."""
3531
3632 target_memory_usage : float
3733 """A value between 0 and 1 that represents the target (system) memory usage. It's not recommended
@@ -44,11 +40,7 @@ class ResourceBasedTunerConfig:
4440
4541@dataclass (frozen = True )
4642class ResourceBasedSlotConfig :
47- """Options for a specific slot type being used with a :py:class:`ResourceBasedSlotSupplier`.
48-
49- .. warning::
50- The resource based tuner is currently experimental.
51- """
43+ """Options for a specific slot type being used with a :py:class:`ResourceBasedSlotSupplier`."""
5244
5345 minimum_slots : Optional [int ] = None
5446 """Amount of slots that will be issued regardless of any other checks. Defaults to 5 for workflows and 1 for
@@ -65,11 +57,7 @@ class ResourceBasedSlotConfig:
6557
6658@dataclass (frozen = True )
6759class ResourceBasedSlotSupplier :
68- """A slot supplier that will dynamically adjust the number of slots based on resource usage.
69-
70- .. warning::
71- The resource based tuner is currently experimental.
72- """
60+ """A slot supplier that will dynamically adjust the number of slots based on resource usage."""
7361
7462 slot_config : ResourceBasedSlotConfig
7563 tuner_config : ResourceBasedTunerConfig
@@ -81,21 +69,14 @@ class SlotPermit:
8169 """A permit to use a slot for a workflow/activity/local activity task.
8270
8371 You can inherit from this class to add your own data to the permit.
84-
85- .. warning::
86- Custom slot suppliers are currently experimental.
8772 """
8873
8974 pass
9075
9176
9277# WARNING: This must match Rust worker::SlotReserveCtx
9378class SlotReserveContext (Protocol ):
94- """Context for reserving a slot from a :py:class:`CustomSlotSupplier`.
95-
96- .. warning::
97- Custom slot suppliers are currently experimental.
98- """
79+ """Context for reserving a slot from a :py:class:`CustomSlotSupplier`."""
9980
10081 slot_type : Literal ["workflow" , "activity" , "local-activity" ]
10182 """The type of slot trying to be reserved. Always one of "workflow", "activity", or "local-activity"."""
@@ -118,11 +99,7 @@ class SlotReserveContext(Protocol):
11899# WARNING: This must match Rust worker::WorkflowSlotInfo
119100@runtime_checkable
120101class WorkflowSlotInfo (Protocol ):
121- """Info about a workflow task slot usage.
122-
123- .. warning::
124- Custom slot suppliers are currently experimental.
125- """
102+ """Info about a workflow task slot usage."""
126103
127104 workflow_type : str
128105 is_sticky : bool
@@ -131,35 +108,23 @@ class WorkflowSlotInfo(Protocol):
131108# WARNING: This must match Rust worker::ActivitySlotInfo
132109@runtime_checkable
133110class ActivitySlotInfo (Protocol ):
134- """Info about an activity task slot usage.
135-
136- .. warning::
137- Custom slot suppliers are currently experimental.
138- """
111+ """Info about an activity task slot usage."""
139112
140113 activity_type : str
141114
142115
143116# WARNING: This must match Rust worker::LocalActivitySlotInfo
144117@runtime_checkable
145118class LocalActivitySlotInfo (Protocol ):
146- """Info about a local activity task slot usage.
147-
148- .. warning::
149- Custom slot suppliers are currently experimental.
150- """
119+ """Info about a local activity task slot usage."""
151120
152121 activity_type : str
153122
154123
155124# WARNING: This must match Rust worker::NexusSlotInfo
156125@runtime_checkable
157126class NexusSlotInfo (Protocol ):
158- """Info about a nexus task slot usage.
159-
160- .. warning::
161- Custom slot suppliers are currently experimental.
162- """
127+ """Info about a nexus task slot usage."""
163128
164129 service : str
165130 operation : str
@@ -173,11 +138,7 @@ class NexusSlotInfo(Protocol):
173138# WARNING: This must match Rust worker::SlotMarkUsedCtx
174139@dataclass (frozen = True )
175140class SlotMarkUsedContext (Protocol ):
176- """Context for marking a slot used from a :py:class:`CustomSlotSupplier`.
177-
178- .. warning::
179- Custom slot suppliers are currently experimental.
180- """
141+ """Context for marking a slot used from a :py:class:`CustomSlotSupplier`."""
181142
182143 slot_info : SlotInfo
183144 """Info about the task that will be using the slot."""
@@ -188,11 +149,7 @@ class SlotMarkUsedContext(Protocol):
188149# WARNING: This must match Rust worker::SlotReleaseCtx
189150@dataclass (frozen = True )
190151class SlotReleaseContext :
191- """Context for releasing a slot from a :py:class:`CustomSlotSupplier`.
192-
193- .. warning::
194- Custom slot suppliers are currently experimental.
195- """
152+ """Context for releasing a slot from a :py:class:`CustomSlotSupplier`."""
196153
197154 slot_info : Optional [SlotInfo ]
198155 """Info about the task that will be using the slot. May be None if the slot was never used."""
@@ -201,11 +158,7 @@ class SlotReleaseContext:
201158
202159
203160class CustomSlotSupplier (ABC ):
204- """This class can be implemented to provide custom slot supplier behavior.
205-
206- .. warning::
207- Custom slot suppliers are currently experimental.
208- """
161+ """This class can be implemented to provide custom slot supplier behavior."""
209162
210163 @abstractmethod
211164 async def reserve_slot (self , ctx : SlotReserveContext ) -> SlotPermit :
0 commit comments