Skip to content

Commit

Permalink
feat: add a client for Purdue Analysis Facility (#219)
Browse files Browse the repository at this point in the history
* test Purdue client

* describe in config.py

---------

Co-authored-by: Dmitry Kondratyev <[email protected]>
  • Loading branch information
kondratyevd and Dmitry Kondratyev authored Jul 4, 2024
1 parent dfb3cf7 commit d8b529f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 12 additions & 1 deletion analyses/cms-open-data-ttbar/utils/clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,18 @@ def get_client(af="coffea_casa"):
cluster.scale(50)

client = cluster.get_client()


elif af == "purdue-af":
from dask_gateway import Gateway
gateway = Gateway(
"http://dask-gateway-k8s.geddes.rcac.purdue.edu/",
proxy_address="traefik-dask-gateway-k8s.cms.geddes.rcac.purdue.edu:8786",
)
clusters = gateway.list_clusters()
cluster = gateway.connect(clusters[0].name)
cluster.scale(10)
client = cluster.get_client()

elif af == "local":
from dask.distributed import Client

Expand Down
3 changes: 2 additions & 1 deletion analyses/cms-open-data-ttbar/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"global": {
# ServiceX: ignore cache with repeated queries
"SERVICEX_IGNORE_CACHE": False,
# analysis facility: set to "coffea_casa" for coffea-casa environments, "EAF" for FNAL, "local" for local setups
# analysis facility: set to "coffea_casa" for coffea-casa environments,
# "EAF" for FNAL, "purdue-af" for Purdue Analysis Facility, "local" for local setups
"AF": "coffea_casa",
# number of bins for standard histograms in processor
"NUM_BINS": 25,
Expand Down

0 comments on commit d8b529f

Please sign in to comment.