Skip to content

Globus Compute executor #689

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Globus Compute executor #689

wants to merge 1 commit into from

Conversation

tomwhite
Copy link
Member

@tomwhite tomwhite commented Feb 4, 2025

This is a proof-of-concept for #467. It takes advantage of the fact that Globus Compute has an implementation of Python's concurrent.futures.Executor.

I tested it by running a Globus Compute endpoint locally, by following https://globus-compute.readthedocs.io/en/latest/endpoints/endpoints.html.

To set up the execution environment, I created a globus-compute-worker conda env, and ran pip install cubed globus-compute-endpoint in it.

Here's the config.yaml for the endpoint (stored in ~/.globus_compute/<endpoint-name>/):

display_name: null
engine:
  max_workers_per_node: 1
  provider:
    init_blocks: 1
    max_blocks: 1
    min_blocks: 0
    type: LocalProvider
    worker_init: |
      conda activate globus-compute-worker
      conda env list
  type: GlobusComputeEngine

Here's my cubed.yaml (stored in $(pwd)/globus-compute):

spec:
  allowed_mem: "2GB"
  executor_name: "globus-compute"
  executor_options:
    endpoint_id: '1345cf05-8762-4c24-8def-a131252cf2de'

Then I was successfully able to run

CUBED_CONFIG=$(pwd)/globus-compute python add-asarray.py

@tomwhite
Copy link
Member Author

tomwhite commented Feb 6, 2025

I'd like to write a CI workflow to run this but I'm not sure if it's possible to run a local endpoint without having to register it. (We could do that and store the credentials in GH Actions secrets, but that's more involved.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant