File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -3313,7 +3313,7 @@ def _graph_to_futures(
3313
3313
retries = None ,
3314
3314
fifo_timeout = 0 ,
3315
3315
actors = None ,
3316
- annotations_by_type = None ,
3316
+ task_resources = None ,
3317
3317
):
3318
3318
with self ._refcount_lock :
3319
3319
if actors is not None and actors is not True and actors is not False :
@@ -3381,7 +3381,7 @@ def _graph_to_futures(
3381
3381
"actors" : actors ,
3382
3382
"code" : ToPickle (computations ),
3383
3383
"annotations" : ToPickle (annotations ),
3384
- "annotations_by_type " : ToPickle (annotations_by_type or {} ),
3384
+ "task_resources " : ToPickle (task_resources ),
3385
3385
"span_metadata" : ToPickle (span_metadata ),
3386
3386
}
3387
3387
)
@@ -3471,7 +3471,7 @@ def get(
3471
3471
user_priority = priority ,
3472
3472
actors = actors ,
3473
3473
span_metadata = SpanMetadata (collections = [{"type" : "low-level-graph" }]),
3474
- annotations_by_type = kwargs .get ("annotations_by_type" , None ),
3474
+ task_resources = kwargs .get ("task_resources" ),
3475
3475
)
3476
3476
packed = pack_data (keys , futures )
3477
3477
if sync :
Original file line number Diff line number Diff line change @@ -4753,7 +4753,7 @@ async def update_graph(
4753
4753
fifo_timeout : float = 0.0 ,
4754
4754
code : tuple [SourceCode , ...] = (),
4755
4755
annotations : dict | None = None ,
4756
- annotations_by_type : dict | None = None ,
4756
+ task_resources : dict | None = None ,
4757
4757
stimulus_id : str | None = None ,
4758
4758
) -> None :
4759
4759
start = time ()
@@ -4772,15 +4772,17 @@ async def update_graph(
4772
4772
(
4773
4773
dsk ,
4774
4774
dependencies ,
4775
- _annotations_by_type ,
4775
+ annotations_by_type ,
4776
4776
) = await offload (
4777
4777
_materialize_graph ,
4778
4778
graph = graph ,
4779
4779
global_annotations = annotations or {},
4780
4780
)
4781
4781
del graph
4782
- annotations_by_type = _annotations_by_type .update (annotations_by_type or {})
4783
- del _annotations_by_type
4782
+
4783
+ if task_resources :
4784
+ annotations_by_type ["resources" ].update (task_resources )
4785
+
4784
4786
if not internal_priority :
4785
4787
# Removing all non-local keys before calling order()
4786
4788
dsk_keys = set (
You can’t perform that action at this time.
0 commit comments