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

add command line jobspec #371

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vsoch
Copy link
Member

@vsoch vsoch commented Mar 21, 2023

Problem: we cannot define a shape on the command line to map into a job specification resources section. Solution: first add a command line jobspec that defines this shape.

I've never written one of these before - let me know what I should expand / contract or fix!

@vsoch vsoch force-pushed the command-line-jobspec branch 2 times, most recently from dca34c4 to bf614d0 Compare March 21, 2023 22:52
Problem: we cannot define a shape on the command line
to map into a job specification resources section.
Solution: first add a command line jobspec that defines
this shape.

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
@garlick
Copy link
Member

garlick commented Mar 22, 2023

Slightly concerned about muddying the terminology here since we already have a jobspec and it contains a different set of information. Maybe we could call this a "short form resource request" or maybe a "job shape specification"? Also, the fact that it fits conveniently on the command line could just be one item in the goals section rather than in the title.

One thing I thought turned out well in some of our other RFCs is to have a Test Vectors section at the end that specifies a table of inputs and outputs. If this is a strict translation from "new thing" to the jobspec v1 Reources section, then maybe that would be applicable here?

Finally just wanted again to mention OAR as I think their --resources option is similar and their choice of characters like using resource=count instead of resource[count] seems like it might be a little easier for users to work with. I do like their use of / to denote hierarchy also.

@vsoch
Copy link
Member Author

vsoch commented Mar 22, 2023

Okay I’ll ping - @trws - he suggested the command line job spec (which makes sense to be different I think) and we talked about the design of the shape in slack today.

And I did see oar - very subjectively I don’t think it’s very nice looking / pretty. We could also have count just be an attribute so it would have that format and not put it in the brackets.

@garlick
Copy link
Member

garlick commented Mar 22, 2023

OK! Those were just my off the cuff first impressions, so take them with appropriate grains of salt etc

@vsoch
Copy link
Member Author

vsoch commented Mar 22, 2023

yeah totally! Here is count as an attribute:

# If it's allowed to go first (and then later)
Node[4]:Slot[count=1+label=default]:Core[count=2]
Node[4]:Slot[label=default+count=1]:Core[count=2]

If I had to guess, the rationale for just using the number is that it's common enough that we shouldn't have to write out count= every time. It's a single number (either present or not) at the beginning of the declaration.

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