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 page about Studio REST API #4681

Merged
merged 27 commits into from
Oct 13, 2023
Merged

Add page about Studio REST API #4681

merged 27 commits into from
Oct 13, 2023

Conversation

aguschin
Copy link
Contributor

@aguschin aguschin commented Jul 6, 2023

@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-vcvhyywnu1z July 6, 2023 14:45 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

Link Check Report

There were no links to check!

@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-vcvhyywnu1z July 10, 2023 05:59 Inactive
@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-vcvhyywnu1z July 10, 2023 08:21 Inactive
@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-vcvhyywnu1z July 10, 2023 11:06 Inactive
@dberenbaum
Copy link
Contributor

Looks good @aguschin! Do we have a story to add it to the model registry docs and anywhere else it's needed for higher-level stories? Where do we plan to explain why it's needed (esp. compared to dvc get) and how to use it (model deployment workflow)?

@dberenbaum

This comment was marked as resolved.

@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-vcvhyywnu1z July 12, 2023 09:23 Inactive
@shcheklein shcheklein had a problem deploying to dvc-org-studio-api-vcvhyywnu1z July 12, 2023 09:52 Failure
@shcheklein shcheklein had a problem deploying to dvc-org-studio-api-vcvhyywnu1z July 12, 2023 10:07 Failure
@shcheklein shcheklein had a problem deploying to dvc-org-studio-api-vcvhyywnu1z July 12, 2023 10:16 Failure
Comment on lines 36 to 40
When your model is annotated in non-root `dvc.yaml` file (typical for monorepo
case), model name will be constructed from two parts separated by colon:
`path/to/dvc/yaml:model_name`. For example, take a loot at this
[model from example-get-started-experiments repo](https://studio.iterative.ai/user/aguschin/models/VtQdva13kMSPsN_N8004aQ==/pool-segmentation/v1.0.1).
Its full name that you need to use in API is `results/train:pool-segmentation`.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an example for monorepo. @dberenbaum wdyt?

Copy link
Contributor

@dberenbaum dberenbaum Jul 12, 2023

Choose a reason for hiding this comment

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

Is it required to include results/train in this case?

Edit: okay, I think I know that the answer is yes, since artifact names are specific to the dvc.yaml file, right? If there are no conflicts, can we omit results/train?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. I think we can omit that. We need to implement it on BE side I believe.

@dberenbaum

This comment was marked as resolved.

@dberenbaum
Copy link
Contributor

Reopening per #4809 (comment)

@dberenbaum dberenbaum reopened this Aug 31, 2023
@dberenbaum
Copy link
Contributor

I don't think we should spend time on worrying about the example or making it work publicly. We can add a note not to try the exact command because it will fail due to lack of credentials on studio

How hard would it be to just return the http urls in this case to have a simple working example @amritghimire?

@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-mlahhmcwy72 August 31, 2023 20:28 Inactive
@amritghimire
Copy link
Contributor

I don't think we should spend time on worrying about the example or making it work publicly. We can add a note not to try the exact command because it will fail due to lack of credentials on studio

How hard would it be to just return the http urls in this case to have a simple working example @amritghimire?

Sorry I didn't understand. Do we want to add support for http/https urls?

@dberenbaum
Copy link
Contributor

Do we want to add support for http/https urls?

Yes if it's easy enough. How much effort do you estimate it would take?

@amritghimire
Copy link
Contributor

Do we want to add support for http/https urls?

Yes if it's easy enough. How much effort do you estimate it would take?

Should be probably 2 days effort.

@amritghimire
Copy link
Contributor

Do we want to add support for http/https urls?

Yes if it's easy enough. How much effort do you estimate it would take?

Should be probably 2 days effort.

@dberenbaum Can you create an issue for this?

@dberenbaum dberenbaum added the ⌛ status: wait-core-merge Waiting for related product PR merge/release label Sep 7, 2023
@dberenbaum
Copy link
Contributor

Waiting for https://github.com/iterative/studio/issues/7127 and https://github.com/iterative/studio/issues/7383 before merging

@dberenbaum dberenbaum marked this pull request as ready for review September 7, 2023 20:02
@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-mlahhmcwy72 September 26, 2023 15:24 Inactive
@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-mlahhmcwy72 September 26, 2023 15:35 Inactive
@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-mlahhmcwy72 September 29, 2023 14:47 Inactive
@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-mlahhmcwy72 September 29, 2023 15:25 Inactive
@dberenbaum
Copy link
Contributor

Per #4809 (comment), I added references and reworded the dvc artifacts CLI/API refs. @shcheklein PTAL 🙏.

Studio [access token] and a Studio project configured with your [remote storage
credentials]. It does not require the client to have those credentials. If you
do not have a valid Studio token, or the artifact is not tracked in the model
registry, DVC will fall back to downloading the artifact from the project's
Copy link
Member

Choose a reason for hiding this comment

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

minor: it is in either way is downloaded from the remote. I'm not it will be clear to users what is going on here.

Copy link
Contributor

Choose a reason for hiding this comment

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

How about "DVC will fall back to using the project's default DVC remote config to access remote storage"?

Copy link
Member

Choose a reason for hiding this comment

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

okay, may be I missing something then.

does it go into dvc get mode here? cloning the repo, etc ... it requires access to GH then, etc?

even to take a step back ... can you run dvc artifacts get outside a repository? when the only thing that is set is an env var with a studio token?

Should it be like:

dvc artifacts get:

  • not need for a repo
  • no GH access needed
  • no AWS/GCP/Azure access needed
  • no need to know that path, git hashes, other low level details
  • unfortunately DVC is still needed to be installed (heavy, etc)
  • can be run as simple as: dvc artifacts get model_name

If not studio token or artifact is not tracked in the model registry (what happens if there are not credentials in Studio btw?): it falls back to what exactly, could you clarify please?

  • extracts the path to an artifact from the current repo / current revision? (means it needs a repo for example)
  • fails if it runs outside the repo
  • etc ...

Copy link
Contributor

Choose a reason for hiding this comment

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

does it go into dvc get mode here? cloning the repo, etc ... it requires access to GH then, etc?

Yes.

even to take a step back ... can you run dvc artifacts get outside a repository? when the only thing that is set is an env var with a studio token?

Yes.

There is no need to be in a repo (same is true for dvc get) regardless of the "mode" dvc artifacts get uses.

Another alternative to explain here is to link to dvc get and say something like "DVC will fall back to its typical method to get files (see dvc get)."

Copy link
Member

Choose a reason for hiding this comment

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

If there is no token set, how does it resolve model name into a repo + a path? Or does it expect those to be provided?

Copy link
Contributor

Choose a reason for hiding this comment

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

Should we open a follow-up issue in studio to discuss adding it to the rest api?

Copy link
Member

Choose a reason for hiding this comment

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

why rest API though? would we need it first to be implemented there? ... yes, overall, let's do a follow up on this

Copy link
Contributor

Choose a reason for hiding this comment

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

I think I'm misunderstanding then. Do you mean if I'm already inside a repo, we should default to that repo?

Copy link
Member

Choose a reason for hiding this comment

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

No, I mean no matter if I'm inside or outside, I assume that in a lot of case mode name is unique across many repos, there is no need further clarify that if Studio has a single model with that name. In some cases clarifying it's subdir should be enough (repo is not needed). In some cases repo is needed indeed.

Copy link
Member

Choose a reason for hiding this comment

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

Do you mean if I'm already inside a repo, we should default to that repo?

Can be, I would for simplicity make independent on anything local.

@shcheklein shcheklein temporarily deployed to dvc-org-studio-api-mlahhmcwy72 October 2, 2023 12:01 Inactive
@dberenbaum dberenbaum merged commit 7674295 into main Oct 13, 2023
4 checks passed
@dberenbaum dberenbaum deleted the studio/api branch October 13, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌛ status: wait-core-merge Waiting for related product PR merge/release
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants