Skip to content

Commit

Permalink
Remove user_ep_config and resource_specification kwargs from GlobusCo…
Browse files Browse the repository at this point in the history
…mputeExecutor

* GlobusComputeExecutor need not explicitly handle options that are already required by the underlying Executor.
  • Loading branch information
yadudoc committed Jan 15, 2025
1 parent 6d27c40 commit 2a7f270
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
17 changes: 2 additions & 15 deletions parsl/executors/globus_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def __init__(
self,
executor: Executor,
label: str = 'GlobusComputeExecutor',
resource_specification: Optional[dict] = None,
user_endpoint_config: Optional[dict] = None,
):
"""
Parameters
Expand All @@ -54,17 +52,6 @@ def __init__(
label:
a label to name the executor
resource_specification:
Specify resource requirements for individual task execution.
user_endpoint_config:
User endpoint configuration values as described
and allowed by endpoint administrators. Must be a JSON-serializable dict
or None. Refer docs from `globus-compute
<https://globus-compute.readthedocs.io/en/latest/endpoints/endpoints.html#templating-endpoint-configuration>`_
for more info.
"""
if not _globus_compute_enabled:
raise OptionalModuleMissing(
Expand All @@ -74,8 +61,8 @@ def __init__(

super().__init__()
self.executor: Executor = executor
self.resource_specification = resource_specification
self.user_endpoint_config = user_endpoint_config
self.resource_specification = self.executor.resource_specification
self.user_endpoint_config = self.executor.user_endpoint_config
self.label = label

def start(self) -> None:
Expand Down
4 changes: 3 additions & 1 deletion parsl/tests/unit/test_globus_compute_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def test_gc_executor_label(mock_ex, randomstring):
def test_gc_executor_resets_spec_after_submit(mock_ex, randomstring):
submit_res = {randomstring(): "some submit res"}
res = {"some": randomstring(), "spec": randomstring()}
gce = GlobusComputeExecutor(mock_ex, resource_specification=res)
mock_ex.resource_specification = res
mock_ex.user_endpoint_config = None
gce = GlobusComputeExecutor(mock_ex)

fn = mock.Mock()
orig_res = mock_ex.resource_specification
Expand Down

0 comments on commit 2a7f270

Please sign in to comment.