[Q] Is there any `direct_url` to existing artifact files?
See original GitHub issueAs of the File System, we can easily retrieve the direct_url of a file uploaded to a wandb run, pointing to the Google Storage URL as follows:
import wandb
api = wandb.Api()
file = api.run(f"{entity}/{project}/{run_id}").file(name=file_path)
file.direct_url
Is there any way to actually retrieve the URL to the Google Storage for the Artifact Store files? If not, can it be implemented?
import wandb
api = wandb.Api()
artifact = api.artifact(name=f"{entity}/{project}/{artifact_name}:{artifact_version}", type=artifact_type)
file = artifact.get_path(name=file_path)
file.direct_url
Thanks in advance! 😄
Issue Analytics
- State:
- Created a year ago
- Comments:10
Top Results From Across the Web
Job artifacts - GitLab Docs
Jobs can output an archive of files and directories. This output is known as a job artifact. You can download job artifacts by...
Read more >How can I download a specific Maven artifact in one command ...
Use the command mvn dependency:get to download the specific artifact and use the command mvn dependency:copy to copy the downloaded artifact to the...
Read more >Upstream sources overview - Azure Artifacts - Microsoft Learn
Upstream sources enable you to use a single feed to store packages from different sources: the ones you publish and the ones you...
Read more >[RTFACT-26432] URL to File no longer a direct link to file - Jira
Navigate to Artifact in UI. Click link provided next to "URL to file". Artifactory redirects to an index page for the file before...
Read more >Creating links to artifacts | E-Portfolio_Mechanics
Select Web address on the left and paste the copied URL into the space marked: Link to this URL. If you want the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Excellent! Thanks for posting this solution @alvarobartt. I also post an alternative option for future reference. Please let me know if that wouldn’t work for you.
Hi @alvarobartt thanks for the additional context. Since you’re interested only to specific filename you could then replace your last two lines with something like the following:
You can have multiple filenames in there and access their attributes from the created list. The artifact.files is an iterator of File objects (which are the ones with the url method).
Regarding the issue with artifact._files this should be fixed if you upgrade to the most recent version according to this commit. Hope this helps!