Skip to content
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

Job group names or batch names #270

Open
scottyhq opened this issue Apr 12, 2024 · 2 comments
Open

Job group names or batch names #270

scottyhq opened this issue Apr 12, 2024 · 2 comments
Labels
enhancement New feature or request Jira Story Create a Jira Story for this issue

Comments

@scottyhq
Copy link

scottyhq commented Apr 12, 2024

Jira: https://asfdaac.atlassian.net/browse/TOOL-2900

Note: The above link is accessible only to members of ASF.


Is your feature request related to a problem? Please describe.
With burst processing, a common approach is to submit a batch of jobs in one go with jobs = hyp3.submit_prepared_jobs(jobs) where a single job might look like this:

{'name': '115_245676_IW2_20190108_20190120_5rlks',
 'job_type': 'INSAR_ISCE_BURST',
 'job_parameters': {'granules': ['S1_245676_IW2_20190108T141423_VV_D96D-BURST',
   'S1_245676_IW2_20190120T141423_VV_D8A3-BURST'],
  'apply_water_mask': False,
  'looks': '5x1'}}

Describe the solution you'd like
I think it would be nice to have a group or batch or project name in the metadata for such a group of jobs to make locating these logically-grouped sets of jobs easier in the future. For example the unique burst ID from the example above group:'115_245676_IW2'. This could then be an easy way to revisit groups of jobs in the future:

batch_jobs = hyp3.find_jobs(group='115_245676_IW2')

Describe alternatives you've considered
I realize I could instead just use a generic job name 115_245677_IW2 and each job gets automatically assigned a unique ID but I prefer job names that are unique and human-readable

I currently find myself doing custom filtering on job names to extract the jobs I want to work with:

batch_jobs = [j for j in jobs if j.name != None and j.name.startswith('115_245677_IW2')]
@scottyhq scottyhq added the enhancement New feature or request label Apr 12, 2024
@jhkennedy
Copy link
Contributor

Hi @scottyhq Sorry I missed this when it was opened.

It's generally been our intention that the name field for jobs is for grouping jobs, and we typically refer to this as a "project name" in our documentation. Each job when submitted to HyP3 gets a unique UUID assigned as the job_id (job.job_id in the SDK), but I agree they aren't human readable and I can see a use case for a human readable ID.

When we started in on developing the production version of HyP3, we to have a free form "description" field that allowed users to attach additional data to jobs and could have been used like this, but we removed it early in the development and I'm not sure ever really made it to users (I can't remember exactly why). Would a field like this work for you?

@jhkennedy
Copy link
Contributor

🤔 another option would be to allow globs/regexs or do fuzzy-matching of the name field, so you could do something like:

jobs = hyp3.find_jobs(name='115_245676_IW2*')

to get all the jobs with a name starting with 115_245676_IW2.

@jhkennedy jhkennedy added the Jira Story Create a Jira Story for this issue label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Jira Story Create a Jira Story for this issue
Projects
None yet
Development

No branches or pull requests

2 participants