-
Notifications
You must be signed in to change notification settings - Fork 0
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
Deployment of the Demo DID Finder #15
Comments
@zonca I had a similar issue working with the yt DID finder. In my value.yaml file for the helm chart I have added a section for the yt girder transformer:
So in your case I think you'd replace girder with "demo" and the relevant image name and tags. The deployment.yaml file that you pasted above I have living in its own folder in the servicex helm directory structure: templates/did-finder-girder/deployment.yaml. |
Thanks @Michael-D-Johnson, I want to keep the charts separated, so I edited the ConfigMap
Later I'll find a way to do this cleanly. Next I would like to be able to access the data with Python, so I am trying with: #!/usr/bin/env python
# coding: utf-8
# # A Simple DID Finder
from func_adl_servicex import ServiceXSourceUpROOT
from servicex import ServiceXDataset
sx_dataset = ServiceXDataset("demo://dataset1", backend_name='dev_uproot')
ds = ServiceXSourceUpROOT(sx_dataset, "mini")
data = ds.Select("lambda e: {'JetPT': e['jet_pt']}").AsAwkwardArray().value()
data['JetPT'] But I get the same error above, @BenGalewsky do you know how to fix this? |
@BenGalewsky it seems like for development I can specify no backend and the client will connect to ServiceX directly on localhost:5000. so:
the code runs until
am I missing anything in the deployment? |
This is going to be messy until we get @Michael-D-Johnson 's python-function based code generator. Which CodeGenerator are you deploying with helm? It think it might work with |
yes, @BenGalewsky I have that codegenerator in my configuration https://github.com/pondd-project/ServiceX_DID_Finder_Demo/blob/main/values_minimal.yaml This is the example code from the Demo DID Finder, https://github.com/ssl-hep/ServiceX_DID_Finder_Demo/blob/main/sample/simple_query.ipynb, so it should work. I am worried there is something missing in the deployment. |
Posting some logs. See test files I'm using at: https://github.com/pondd-project/ServiceX_DID_Finder_Demo/tree/main/tests Post request on port 5000If I do a POST request with Codegen
Demo DID finder
Python
Codegen
Demo DID findernothing |
I'm not totally understanding these logs here, I'm afraid - Demo DID Finder and CodeGen appear twice, for example. Are you expecting the bomb in |
I also am a little puzzeled by this line:
It looks like we forgot a |
I have the logs of both of them for 2 different cases:
I would like to understand why:
is not working. I don't understand what is the purpose of Codegen. See https://github.com/pondd-project/ServiceX_DID_Finder_Demo/blob/main/tests/simple_query.py, it is based off your https://github.com/ssl-hep/ServiceX_DID_Finder_Demo/blob/main/sample/simple_query.ipynb |
Ok, @zonca - I deployed my local serviceX and did some snooping around. Consequently, I decided to run your example against the CERN open data DID finder which is supported. I changed the code to match our current libraries. (There is a distressing number of stale examples and incorrect documentation out there)
This is sufficient to trigger the DID finder (and then the transformers will fail due to the files not being in the format this specific request is expecting). My suggestion is to
We are getting to the point that we need to rethink this aspect of the helm chart since this will quickly become unsustainable. |
yes, I do that with In fact if I do What is the Python version doing differently?
I would like to have a working example, if this is not fully working either, I'd like to see if we can make the Demo example working.
As a first step, you could make the list of valid DID finders as a configuration option of the Helm chart, that should be easy to do. |
Ok, thanks. Now I understand a bit better what is going on! As to the differences between the Jupyter notebook and sx_dataset = ServiceXDataset("demo://dataset1", backend_type='dev_uproot') According to the jupyter notebook page, it didn't find the The above errors, etc., are pretty confusing, so I'm not sure what exactly you are looking at - you mentioned two different things you've tried. First one is In your Next, was an error associated with
This will allow us to see the actual You asked what the point of the Finally, there is an intermediate level. Since you aren't using from servicex import ServiceXDataset
query = "<selection text from tests/post.py"
dataset = "demo://dataset1"
ds = ServiceXDataset(dataset, backend_name=`dev_uproot`)
r = ds.get_data_awkward(query)
print(r) I'll watch this thread for more updates. |
thanks @gordonwatts! Here is the output of |
The intermediate level test: import logging
logging.basicConfig(level=logging.DEBUG)
from servicex import ServiceXDataset
query = "(Select (Where (call EventDataset 'mini') (lambda (list e) (or (attr e 'trigE') (attr e 'trigM')))) (lambda (list e) (dict (list 'lep_pt' 'lep_eta' 'lep_phi' 'lep_energy' 'lep_charge' 'lep_ptcone30' 'lep_etcone20' 'lep_type' 'lep_trackd0pvunbiased' 'lep_tracksigd0pvunbiased' 'lep_z0') (list (attr e 'lep_pt') (attr e 'lep_eta') (attr e 'lep_phi') (attr e 'lep_E') (attr e 'lep_charge') (attr e 'lep_ptcone30') (attr e 'lep_etcone20') (attr e 'lep_type') (attr e 'lep_trackd0pvunbiased') (attr e 'lep_tracksigd0pvunbiased') (attr e 'lep_z0')))))",
dataset = "demo://dataset1"
ds = ServiceXDataset(dataset, backend_name="dev_uproot")
r = ds.get_data_awkward(query)
print(r) gives:
|
Check in your .servicex file - there needs to be an entry with |
We are very close to deploying the YT astrophysics ServiceX with a yt-Hub DID Finder, and new python function based selection. Hopefully that will be easier for you to work with and will be directly on the path to our SuperCDMS deployment |
@gordonwatts here is the error when I run
|
where do I find that file? |
See https://github.com/ssl-hep/ServiceX_frontend#configuration Do you have auth enabled for your site? If so, you can download it from the ServiceX dashboard. Otherwise you just construct it with the url to your deployment following the guidance in the README. Mine looks like:
|
ok, thanks @BenGalewsky https://gist.github.com/cbe1d3c59cbdd1edce585c231839f5d3 All my configuration is at: https://github.com/pondd-project/ServiceX_DID_Finder_Demo, mostly |
My deployment with |
also I think |
Your error log shows that ServiceX can't find your Minio login information. I don't see accessKey or secretKey specified for your minio app. For example, in my deployment I have in my values.yaml file:
If that is contained your tls secret you may need to update the env var that is passed to the ServiceX app (https://github.com/ssl-hep/ServiceX/blob/develop/servicex/templates/app/deployment.yaml).
I have a simple deployment running python codegenerator and the yt/girder DID finder and transformer on my laptop using minikube. I use an emptyDir() minio instance so I haven't had to deal with TLS issues with my own deployment of Minio. If interested you can find the setup here: https://github.com/Michael-D-Johnson/servicex-yt-deployment |
thanks @Michael-D-Johnson !
full log: https://gist.github.com/bbe1ad764b375f88214b3fc9aa1f9dfa |
Hmm. I wonder if there is an issue with the TLS. I'm curious if you get the same error if you deploy a minimal Minio instance:
If we can get this bare bones version to work with your deployment then we can work up to deploying with your pondd-minio.zonca.dev Minio instance. |
I plan to use the Demo DID Finder as a starting point for the SuperCDMS DID finder.
So first I am trying to deploy and test it.
I deploy a minimal configuration for ServiceX via Helm https://github.com/pondd-project/pondd-jetstream/blob/main/servicex/values_minimal.yaml
I build the Demo container
I deploy it with this deployment YAML:
Then I try to test using the servicex package like in
simple_query.ipynb
, and I get same error I was getting with the CERN opendata:instead if I try to test with
post.py
from the Girder DID finder I get:How do I tell ServiceX that the demo DID finder is available? @BenGalewsky @Michael-D-Johnson @gordonwatts
The text was updated successfully, but these errors were encountered: