pub struct WorkerSource {
pub from: String,
pub cwd: Option<String>,
pub build: Option<String>,
pub bin: Option<String>,
}Expand description
join.source: — build the training binary on this box.
A tree always lands on LOCAL disk before it is built, whatever the transport: cargo fingerprints by stat’ing every source file on every invocation, so compiling over a network mount pays that latency thousands of times, and the attribute caching that would hide the latency makes cargo serve a stale binary. The fetch preserves mtimes, which is what keeps the loop incremental rather than a cold rebuild wearing an incremental costume.
Fields§
§from: StringTransport plus location. Three ship:
file:///abs/path a directory on this box (a mount, a disk)
rsync://[user@]host[:port]:/abs/path a working tree over ssh
git+https://host/owner/repo#<ref> a pinned checkout (also git+ssh://)rsync is the one that carries UNCOMMITTED work, which is what a
training crate living in no repo at all needs. git+ wants a ref
(#<tag|branch|sha>) because a default branch floats, and a
floating ref is not a pin.
cwd: Option<String>Project directory inside the fetched tree (default: its root). Governs the build and the run both, so it answers “where is the project in this tree” exactly once. A path dep pointing outside this directory still resolves, which is why the fetched tree has to be the dep root and not just the crate.
build: Option<String>Build recipe, run as a shell line in cwd. Default: cargo build --release, which is right whenever the crate carries its own
Cargo.toml, lockfile and rust-toolchain.toml — the usual case
for a crate that builds on the operator’s own box.
It can be a script committed beside the code (./ci/node-build.sh),
so the recipe travels with the source while its invocation stays
here. fdl exports what it resolved: LIBTORCH_PATH,
FDL_GPU_FEATURE (say --features "$FDL_GPU_FEATURE" rather than
naming a vendor) and LD_LIBRARY_PATH.
It re-runs on every dial, so it must be cheap when nothing changed. cargo is; a recipe that rebuilds unconditionally is not.
bin: Option<String>Built artifact, relative to cwd (e.g. target/release/train).
Not guessed: cargo build in a workspace member writes to the
WORKSPACE target/, not the member’s, so any rule fdl invented
would be wrong for someone.
Optional because a published tree carries a run manifest that names it, and that manifest is the authority when present. Declare it here for a box the operator drives by hand.
Trait Implementations§
Source§impl Clone for WorkerSource
impl Clone for WorkerSource
Source§fn clone(&self) -> WorkerSource
fn clone(&self) -> WorkerSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkerSource
impl Debug for WorkerSource
Source§impl Default for WorkerSource
impl Default for WorkerSource
Source§fn default() -> WorkerSource
fn default() -> WorkerSource
Source§impl<'de> Deserialize<'de> for WorkerSource
impl<'de> Deserialize<'de> for WorkerSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WorkerSource
Source§impl PartialEq for WorkerSource
impl PartialEq for WorkerSource
impl StructuralPartialEq for WorkerSource
Auto Trait Implementations§
impl Freeze for WorkerSource
impl RefUnwindSafe for WorkerSource
impl Send for WorkerSource
impl Sync for WorkerSource
impl Unpin for WorkerSource
impl UnsafeUnpin for WorkerSource
impl UnwindSafe for WorkerSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.