Expand description
The scheme-plus-path grammar shared by the artifact specs (dataset source, libtorch, training source). Grammar only — the resolvers have no common shape worth abstracting. The scheme-plus-path grammar the artifact specs share.
Everything a box needs before it can train answers one question, and the answers differ only in size, mutability and public availability: the dataset source root, libtorch, the training source. That makes the grammar real shared structure while the resolvers stay genuinely separate — mounting a tree, unpacking an archive and fetching a checkout have no common shape worth abstracting. This module is the shared half and nothing else.
Errors here carry only the reason. The caller names the field and
spells out its accepted forms, because both differ per artifact and a
message that says data_source when the operator mistyped source
sends them to the wrong line.
Structs§
- SshTarget
- An ssh endpoint, in the spelling
sshfsandrsyncboth take on the command line — and the one/proc/mountsreports back, which is what lets the already-mounted check be a string compare.
Functions§
- parse_
ssh_ target - Parse
[user@]host[:port]/abs/path, and the scp spelling[user@]host:/abs/pathfor the same thing — both sshfs and rsync take the second, so refusing it would be a gratuitous trap. - split_
scheme - Split
<scheme>://<rest>. A value with no://carries no transport, which each field answers for itself: fordata_patha bare value is a path already mounted, for a source spec it is an error naming the transports.