Skip to content

add endpoint to return prompts#1379

Closed
rogthefrog wants to merge 1 commit into
mainfrom
sugar-223-ports
Closed

add endpoint to return prompts#1379
rogthefrog wants to merge 1 commit into
mainfrom
sugar-223-ports

Conversation

@rogthefrog
Copy link
Copy Markdown
Contributor

BaaS --get prompts--> modelrunner --get prompts--> modelbench job <-- this part

@rogthefrog rogthefrog requested a review from a team as a code owner November 10, 2025 22:50
@github-actions
Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@bkorycki
Copy link
Copy Markdown
Contributor

Isn't this the requests endpoint in the indirect sut? I'm actually not even sure that IndirectSUTServer.prompts gets used. I think that should be deleted.

@wpietri
Copy link
Copy Markdown
Contributor

wpietri commented Nov 11, 2025

Isn't this the requests endpoint in the indirect sut? I'm actually not even sure that IndirectSUTServer.prompts gets used. I think that should be deleted.

That's my understanding too.

@rogthefrog
Copy link
Copy Markdown
Contributor Author

I added prompts because it wasn't clear to me what requests did (it returns list(self.outstanding_requests.values())) since the word "prompt" doesn't appear anywhere in that code. So we should tidy up / standardize our domain language and clarify what the difference is between a "prompt" and an "outstanding request."

Are they the same thing? If so, then we should change some names and/or add comments explaining what's what, because it's confusing.

@bkorycki @wpietri do you have the answers?

@wpietri
Copy link
Copy Markdown
Contributor

wpietri commented Nov 12, 2025

I added prompts because it wasn't clear to me what requests did (it returns list(self.outstanding_requests.values())) since the word "prompt" doesn't appear anywhere in that code. So we should tidy up / standardize our domain language and clarify what the difference is between a "prompt" and an "outstanding request."

Are they the same thing? If so, then we should change some names and/or add comments explaining what's what, because it's confusing.

@bkorycki @wpietri do you have the answers?

From the IndirectSUT's pespective, requests have a prompt and a request id (which is not our notion of a prompt id). Responses have a request id and a response. Each request comes from an IndirectSUTRequest and each response gets turned into an IndirectSUTResponse.

These in turn derive from our core notions of SUT requests and responses. So the terms align with our usual domain language. I think the modelbench code should stay consistent with that. It should be the BaaS server's job to translate between the BaaS user's domain model and our internal one.

@rogthefrog
Copy link
Copy Markdown
Contributor Author

Are we using the request ID as the key to reconcile a prompt we sent the customer and the response to that prompt they send back to us? @wpietri

@rogthefrog rogthefrog marked this pull request as draft November 12, 2025 23:47
@bkorycki
Copy link
Copy Markdown
Contributor

@rogthefrog that's right

@rogthefrog
Copy link
Copy Markdown
Contributor Author

Do we want to call it "request ID" in the response BaaS sends? I think that'd be fine.

I.e. the customer would receive this:

[
{ "request_id": "12345", "prompt": "why did the chicken cross the road?" }, # (etc)
]

Is everyone good with this?

@bkorycki @wpietri

@bkorycki
Copy link
Copy Markdown
Contributor

Yes that makes sense since the request should contain more than just the prompt (e.g. max_tokens, temperature..).

@rogthefrog
Copy link
Copy Markdown
Contributor Author

Great, thank you.

@rogthefrog rogthefrog closed this Nov 13, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 13, 2025
@wpietri
Copy link
Copy Markdown
Contributor

wpietri commented Nov 13, 2025

Yes, that's also good by me.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants