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

DATA-3467: Cloud Inference CLI #4748

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

vpandiarajan20
Copy link
Member

@vpandiarajan20 vpandiarajan20 commented Jan 27, 2025

Adds CLI command for running cloud inference.

Use with commands of the following form

viam inference infer --org-id=0fbe951e-d4c6-427f-985f-784b7b85842c --file-org-id=0fbe951e-d4c6-427f-985f-784b7b85842c --file-id=p5jysh0TSjQgSAHBJ2R0A9iZ9EuHT6fZE03TCDZChcitjsU25b2OZTeW9V0hLi4S --file-location-id=nihu6z0k8c --model-id=0fbe951e-d4c6-427f-985f-784b7b85842c:vig-dense-ret --model-version=2025-01-27T15-28-38

Tested manually with sample data:
image

@vpandiarajan20 vpandiarajan20 requested a review from a team as a code owner January 27, 2025 20:39
@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Jan 27, 2025
@vpandiarajan20 vpandiarajan20 marked this pull request as draft January 27, 2025 20:41
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 28, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 28, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 30, 2025
@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Jan 31, 2025
@vpandiarajan20 vpandiarajan20 marked this pull request as ready for review January 31, 2025 16:36

// printInferenceResponse prints a neat representation of the GetInferenceResponse.
func (c *viamClient) printInferenceResponse(resp *mlinferencepb.GetInferenceResponse) {
printf(c.c.App.Writer, "Inference Response:")
Copy link
Member

Choose a reason for hiding this comment

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

You would know better than I would but is this the kind of format that you would want? Meaning, normally from a CLI I would expect JSON or something configurable that I can do programmatically. But I also know absolutely nothing about ML and this could be the way ML people want the response.

Copy link
Member Author

Choose a reason for hiding this comment

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

Honestly, this format isn't very good for most usecases, but it's readable. I think the primary use case of this command will be to debug / easily check if the service is functioning.

Copy link
Member

@etai-shuchatowitz etai-shuchatowitz left a comment

Choose a reason for hiding this comment

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

This LGTM! I'm going to approve but I would recommend waiting for @tahiyasalam to give a review as she almost certainly will have more insight than I about the response type and just wanna make sure we're matching what is expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants