fix(runspec): support art://name/file URIs without version specifier#301
Open
andrewwhitecdw wants to merge 1 commit into
Open
fix(runspec): support art://name/file URIs without version specifier#301andrewwhitecdw wants to merge 1 commit into
andrewwhitecdw wants to merge 1 commit into
Conversation
The documented 'art://name/path/to/file (implies latest)' form was parsed with the entire path (including the file part) as the artifact name, so a local artifact like art://my-dataset/train.json was routed to the W&B full-path resolver and failed. In the no-version branch, split the first segment off as the artifact name when it exists in the local registry; otherwise keep the whole path as the artifact reference (e.g. W&B entity/project/name).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ArtifactFileSystemdocuments this URI form:But when no
:versionspecifier is present,_parse_uritreats the entire path (including the file part) as the artifact name:Since the resulting name contains
/,_resolve()routes it to the W&B full-path resolver, so opening a file from a local registry artifact fails (e.g.UsageError: No API key configured).Fix
In the no-version branch, split the first segment off as the artifact name when it exists in the local registry; otherwise keep the whole path as the artifact reference (preserving W&B
entity/project/namepaths without a version).Testing
fs._open("art://my-dataset/train.json")against a local fsspec registrypytest tests/nemo_runspec -k "filesystem or artifact or registry"— 34 passedtests/nemo_runspec— 186 passed, 3 pre-existing failures onmain(unrelated data_mover/lepton tests)