Skip to content

Introductory Tasks for CyberGIS Compute#2

Open
vai67 wants to merge 3 commits into
cybergis:mainfrom
vai67:main
Open

Introductory Tasks for CyberGIS Compute#2
vai67 wants to merge 3 commits into
cybergis:mainfrom
vai67:main

Conversation

@vai67
Copy link
Copy Markdown

@vai67 vai67 commented Jun 23, 2025

I added the loading page, fixed the HPC dropdown, added parameters, made the tabs clickable.

Copy link
Copy Markdown
Contributor

@alexandermichels alexandermichels left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Comment thread src/Loading.tsx Outdated
return (
<Box
height="100vh"
width="100vw"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe changing these to 100% instead of vh/vw should make the loading screen fit correctly. Try that out and lmk.

Comment thread src/App.tsx Outdated
supply_id: "",
supply_lat: "",
supply_lon: ""
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/App.tsx Outdated
const [slurmParams, setSlurmParams] = React.useState({
time: "",
memory: "",
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, the slurm input parameters is specified for each job under slurm_input_rules.

Comment thread src/App.tsx Outdated
"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"],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/App.tsx Outdated
{/* Add content for Input Parameters here */}
</AccordionPanel>
<Box mb={3}>
<Text mb={1}>Mobility Mode:</Text>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

vai67 added 2 commits June 25, 2025 13:35
Created a slider input for SLURM parameters and added dropdown, slider, and string inputs for parameters.
@alexandermichels
Copy link
Copy Markdown
Contributor

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:

  • Alphabetize the lists of jobs (and all dropdowns) to make them easier to read
  • When the user clicks "Submit" can we automatically switch to the "Your Job Status" tab?
  • When the user clicks "Submit" can we grey out/disable the button so they don't accidentally submit the same job multiple times? We can also have a "Submit New Job" button that resets everything (or just refreshes the page). The Python UI has a similar functionality.
  • Many of the jobs have default values for the HPC, parameters, etc. Let's make sure those defaults are being set in the UI and in the variables passed to the API. For example, if you submit the hello_world job without touching the parameters, it sets those parameters to an empty string rather than using the default values (e.g., https://github.com/cybergis/cybergis-compute-hello-world/blob/main/manifest.json#L29)
  • If the model selected in the dropdown does not have Parameters or does not request data upload (e.g., https://github.com/cybergis/cybergis-compute-hello-world/blob/main/manifest.json#L22), do no render those accordion sections.
  • Better format the results on the Job Status tab to make it more readable. One example is from the Python UI, but the main goal is a readable and nice layout, doesn't have to be exactly the same.
  • Add tooltips in a few places to help explain elements of the UI.
  • We are open to any ideas that will make the UI/layout more aesthetically pleasing, so any styling/UI optimization you can think of is welcome!
  • Add an "About" tab that provides a quick overview of what CyberGIS-Compute is and refers to our documentation website: https://cybergis.github.io/cybergis-compute-python-sdk/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants