From eaa87611502af12e101c8d878c94f51ba3d2e5f7 Mon Sep 17 00:00:00 2001 From: Dave Berenbaum Date: Tue, 28 May 2024 15:12:53 -0400 Subject: [PATCH] ref: artifacts get --show-url (#5245) * ref: artifacts get --show-url * Update content/docs/command-reference/artifacts/get.md --- content/docs/command-reference/artifacts/get.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/content/docs/command-reference/artifacts/get.md b/content/docs/command-reference/artifacts/get.md index 4e85c53ede..a6ca199ac3 100644 --- a/content/docs/command-reference/artifacts/get.md +++ b/content/docs/command-reference/artifacts/get.md @@ -10,7 +10,7 @@ into the current working directory (with optional DVC Studio support). ```usage usage: dvc artifacts get [-h] [-q | -v] [--rev []] [--stage []] - [-o []] [-j ] [-f] + [-o []] [--show-url] [-j ] [-f] [--config CONFIG] [--remote REMOTE] [--remote-config [REMOTE_CONFIG ...]] url name @@ -59,6 +59,9 @@ files (see `dvc get`). current working directory). Directories specified in the path will be created by this command. +- `--show-url` - instead of downloading the file or directory, just print the + storage location (URL) of the target data. + - `-j `, `--jobs ` - parallelism level for DVC to download data from the remote. The default value is `4 * cpu_count()`. Using more jobs may speed up the operation. Note that the default value can be set in the source @@ -122,6 +125,17 @@ to the `dvc.yaml` file when addressing the artifact. Since we do not specify `--rev` or `--stage`, `dvc artifacts get` will download the latest version of the artifact by default. +## Example: Getting the storage URL of an artifact + +We can use `dvc artifacts get --show-url` to get the actual location where the +model is stored: + +```cli +$ dvc artifacts get https://github.com/iterative/example-get-started.git \ + text-classification --rev=v1.0.0 --show-url +https://remote.dvc.org/get-started/files/md5/cf/a72ff6e2575c44f78f423cada5b783 +``` + [rest api]: /doc/studio/rest-api [client access token]: /doc/studio/user-guide/account-management#client-access-tokens