-
Notifications
You must be signed in to change notification settings - Fork 14
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
Broken Science Tutorial Fixes #218
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Does the Limit really cause the token error (the old CMR info should be the issue). Can you try adding that back to the
searchGranule
- For the NISAR tutorial we should probably use the "best practices" and have a user download to a
data
directory that they make before downloading. See https://docs.maap-project.org/en/latest/technical_tutorials/access/accessing_data.html (Cell 4)
Sorry, definitely meant GEDI_L2B tutorial in the commit above |
a657262
to
c92ddd8
Compare
@wildintellect I created a new data directory for the .h5 file that downloads. Should the HH files also go into that new directory? I wasn't quite sure on how to change the path for those if so, so they still just download into the NISAR file |
View / edit / reply to this conversation on ReviewNB wildintellect commented on 2023-06-07T19:55:13Z Use the same block fro the NISAR example # set data directory dataDir = './data' then the |
Tutorials updated so far: NISAR, GEDI_L2B and GEDI_L4B. |
I think this PR is fully ready for review. I'll probably put GEDI_L2A in it's own PR since I'll have to use a new collection |
Thanks @smk0033 |
@@ -2,15 +2,15 @@ | |||
"cells": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #7. maap = MAAP(maap_host="api.ops.maap-project.org")
Please check if the host should be api.ops.maap-project.org
or api.maap-project.org
.
Reply via ReviewNB
View / edit / reply to this conversation on ReviewNB omshinde commented on 2023-06-20T20:08:51Z
Is PS: I checked both and both work as of now. smk0033 commented on 2023-06-20T20:16:37Z I'll test it with api.maap-project.org again, it may have originally not worked due to that bug (or maybe I had gotten it confused by accident) so I'll update it if it runs using api.maap-project.org |
View / edit / reply to this conversation on ReviewNB omshinde commented on 2023-06-20T20:08:52Z Check typo Shenadoah -> Shenandoah national park (https://www.nps.gov/shen/index.htm) smk0033 commented on 2023-06-20T20:14:09Z Good catch, I definitely didn't notice that. Thanks!! |
View / edit / reply to this conversation on ReviewNB omshinde commented on 2023-06-20T20:13:24Z
Should the host be api.ops.maap-project.org or api.maap-project.org? jjfrench commented on 2023-06-20T20:33:07Z For maap.profile.account_info()["username"]: api.maap-project.org for ade.maap-project.org, api.ops.maap-project.org for ade.ops.maap-project.org
They don't have job submissions setup for api.maap-project.org yet though, you'll only get 500's smk0033 commented on 2023-06-20T20:40:58Z Yeah, sometimes it works and sometimes it doesn't, at least with the .ops in it |
View / edit / reply to this conversation on ReviewNB omshinde commented on 2023-06-20T20:13:25Z --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) Cell In[12], line 14 1 inputs = dict( 2 aoi=aoi, 3 doi="L4A", (...) 11 output="gedi_subset.gpkg" 12 ) ---> 14 result = maap.submitJob( 15 identifier="gedi-subset", 16 algo_id="gedi-subset_ubuntu", 17 version="0.6.0", 18 queue="maap-dps-worker-32gb", 19 username=username, 20 **inputs, 21 ) 23 job_id = result["job_id"] 24 job_id or result File /maap-py/maap/maap.py:331, in MAAP.submitJob(self, **kwargs) 329 job = DPSJob() 330 job.set_submitted_job_result(response) --> 331 job.retrieve_attributes() 332 return job File /maap-py/maap/dps/dps_job.py:116, in DPSJob.retrieve_attributes(self) 115 def retrieve_attributes(self): --> 116 self.retrieve_status() 117 if self.status.lower() in ["succeeded", "failed"]: 118 try: File /maap-py/maap/dps/dps_job.py:76, in DPSJob.retrieve_status(self) 70 logger.debug(headers) 71 response = requests.get( 72 url=url, 73 verify=self.__not_self_signed, 74 headers=headers 75 ) ---> 76 self.set_job_status_result(RequestsUtils.check_response(response)) 77 return self.status File /maap-py/maap/utils/requests_utils.py:25, in RequestsUtils.check_response(dps_response) 22 @staticmethod 23 def check_response(dps_response): 24 if dps_response.status_code not in [200, 201]: ---> 25 raise RuntimeError('response is not 200 or 201. code: {}. details: {}'.format(dps_response.status_code, 26 dps_response.content)) 27 return dps_response.content.decode('UTF-8') RuntimeError: response is not 200 or 201. code: 500. details: b'<ows:ExceptionReport xmlns:wps="http://www.opengis.net/wps/2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:schemaLocation="http://schemas.opengis.net/wps/2.0/wps.xsd" xmlns:ows="http://www.opengis.net/ows/2.0"><ows:Exception exceptionCode="FailedGetResult" locator="GetResult"><ows:ExceptionText>Failed to get job result of job with id: status. Aborting retrieving information of job because status is None. If you don\'t see expected results, please contact administrator of DPS</ows:ExceptionText></ows:Exception></ows:ExceptionReport>' I am getting above output for this config!
However, it works after changing |
View / edit / reply to this conversation on ReviewNB omshinde commented on 2023-06-20T20:13:27Z Line #23. job_id = result["job_id"]
It seems the DPS object is not subscriptable. Issue: --------------------------------------------------------------------------- Although printing `{'job_id': '32701077-4c49-4a52-aa92-ecf07ea39e38', 'status': 'Accepted', 'machine_type': None, 'architecture': None, 'machine_memory_size': None, 'directory_size': None, 'operating_system': None, 'job_start_time': None, 'job_end_time': None, 'job_duration_seconds': None, 'cpu_usage': None, 'cache_usage': None, 'mem_usage': None, 'max_mem_usage': None, 'swap_usage': None, 'read_io_stats': None, 'write_io_stats': None, 'sync_io_stats': None, 'async_io_stats': None, 'total_io_stats': None, 'error_details': None, 'response_code': 200, 'outputs': []}
Workaround:
wildintellect commented on 2023-06-22T17:40:13Z Is this officially documented in the system reference section, we should be consistent across examples. |
View / edit / reply to this conversation on ReviewNB omshinde commented on 2023-06-20T20:13:28Z Line #7. response.raise_for_status()
Getting the following output: --------------------------------------------------------------------------- It seems the return type of response = maap.getJobStatus(job_id)
|
Good catch, I definitely didn't notice that. Thanks!! View entire conversation on ReviewNB |
I'll test it with api.maap-project.org again, it may have originally not worked due to that bug (or maybe I had gotten it confused by accident) so I'll update it if it runs using api.maap-project.org View entire conversation on ReviewNB |
For maap.profile.account_info()["username"]: api.maap-project.org for ade.maap-project.org, api.ops.maap-project.org for ade.ops.maap-project.org View entire conversation on ReviewNB |
Yeah, sometimes it works and sometimes it doesn't, at least with the .ops in it View entire conversation on ReviewNB |
Re-requesting reviews to see if this looks good to have approved and merged |
Is this officially documented in the system reference section, we should be consistent across examples. View entire conversation on ReviewNB |
@@ -2,15 +2,15 @@ | |||
"cells": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous code showed how to find the collection shortname. We should either drop this section (and link to an example of How to find a Collection name), or revert back.
Reply via ReviewNB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous way didn't work for some reason, not really sure why but it wouldn't pull that collection even though the short name was correct. There was also something wrong with pprint and it wouldn't print it, so that's why we reverted to this way of pulling with the short name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good!
Updating science tutorials that are broken. Reference ticket: https://github.com/orgs/NASA-IMPACT/projects/29?pane=issue&itemId=27480247 (issues are under each individual ticket). Wanted to go through and fix errors to make sure notebooks were fully functional before going in and updating per new guidelines.
Fixes so far:
Will commit other science tutorials as they get fixed, and will create a separate PR for technical tutorial fixes after.