Introductory Tasks for CyberGIS Compute#2
Conversation
alexandermichels
left a comment
There was a problem hiding this comment.
Great work so far!
I can see how me hard-coding some settings was confusing and I apologize. I did that just to get the basic idea demoed, but hopefully these comments give you a better idea of what we are trying to accomplish. Please feel free to reach out with any issues you run into!
| return ( | ||
| <Box | ||
| height="100vh" | ||
| width="100vw" |
There was a problem hiding this comment.
I believe changing these to 100% instead of vh/vw should make the loading screen fit correctly. Try that out and lmk.
| supply_id: "", | ||
| supply_lat: "", | ||
| supply_lon: "" | ||
| }); |
There was a problem hiding this comment.
I originally hard-coded some parameters to get the basics working, but that's not actually how CyberGIS-Compute works. Every model has its own set of parameters.
If you visit https://cgjobsup-test.cigi.illinois.edu/v2/git you can see the list of models and the details under "param_rules" so you need to get the list of parameters dynamically based on the job that is selected in the dropdown.
| const [slurmParams, setSlurmParams] = React.useState({ | ||
| time: "", | ||
| memory: "", | ||
| }); |
There was a problem hiding this comment.
Similarly, the slurm input parameters is specified for each job under slurm_input_rules.
| "cybergis-abm": ["anvil_community"], | ||
| "Customized_Resilience_Inference_Measurement_Framework": ["aces_community", "keeling_community"], | ||
| "CUAHSI_Subsetter_Connector": ["anvil_community"], | ||
| "covid-access": ["keeling_community", "expanse_community", "anvil_community"], |
There was a problem hiding this comment.
This is one solution to the problem, but this would require that we manually update the list every time. Instead, we should get this from the https://cgjobsup-test.cigi.illinois.edu/v2/git data.
| {/* Add content for Input Parameters here */} | ||
| </AccordionPanel> | ||
| <Box mb={3}> | ||
| <Text mb={1}>Mobility Mode:</Text> |
There was a problem hiding this comment.
Because we are rendering the parameters dynamically, we will have to re-thinking how to update this based on the job.
Additionally, note that not all jobs are text box inputs. The param_rules and slurm_rules have a few different ways that data can be input including Integer Slider (max, min, default value, step) and String Option (a dropdown of options). This section of the SDK code shows the basic logic used: https://github.com/cybergis/cybergis-compute-python-sdk/blob/v2/cybergis_compute_client/UI.py#L381
For the SLURM parameters this gives the types: https://github.com/cybergis/cybergis-compute-python-sdk/blob/v2/cybergis_compute_client/UI.py#L59
Created a slider input for SLURM parameters and added dropdown, slider, and string inputs for parameters.
|
Great work so far! The UI is really starting to look good. Testing out the UI, there are a few more tasks to complete to better match the Python UI:
|
I added the loading page, fixed the HPC dropdown, added parameters, made the tabs clickable.