Skip to main content

Module spec

Module spec 

Source
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 sshfs and rsync both take on the command line — and the one /proc/mounts reports 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/path for 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: for data_path a bare value is a path already mounted, for a source spec it is an error naming the transports.