Skip to content

Commit

Permalink
Remove max_workers rename in GCEngine
Browse files Browse the repository at this point in the history
The Parsl HTEX supports both `max_workers` and `max_workers_per_node` as
initialization arguments starting in version `2024.03.04`. The former
is deprecated and will be removed in a future release.
  • Loading branch information
rjmello committed Mar 8, 2024
1 parent 441968d commit e15cd4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ def __init__(
self.container_uri = container_uri
self.container_cmd_options = container_cmd_options

# We can remove this code once we rename the max_workers attribute on
# the Parsl HTEX to max_workers_per_node, which is more explicit.
max_workers_per_node = kwargs.pop("max_workers_per_node", None)
max_workers = max_workers_per_node or kwargs.get("max_workers", float("inf"))
kwargs["max_workers"] = max_workers
self.max_workers_per_node = max_workers

if executor is None:
executor = HighThroughputExecutor( # type: ignore
*args,
Expand All @@ -101,6 +94,11 @@ def __init__(
)
self.executor = executor

@property
def max_workers_per_node(self):
# Needed for strategies (e.g., SimpleStrategy)
return self.executor.max_workers_per_node

@property
def encrypted(self):
return self.executor.encrypted
Expand Down Expand Up @@ -380,7 +378,7 @@ def get_status_report(self) -> EPStatusReport:
"prefetch_capacity": self.executor.prefetch_capacity,
"max_blocks": self.executor.provider.max_blocks,
"min_blocks": self.executor.provider.min_blocks,
"max_workers_per_node": self.executor.max_workers,
"max_workers_per_node": self.executor.max_workers_per_node,
"nodes_per_block": self.executor.provider.nodes_per_block,
"heartbeat_period": self.executor.heartbeat_period,
},
Expand Down

0 comments on commit e15cd4c

Please sign in to comment.