pub struct ArtifactLoader<T: BundleDecode> { /* private fields */ }Expand description
Artifact loader for loading artifacts from Burn Central. It allow to fecth for instance other experiment endpoint to be able to restart from a certain point your experiment.
You can build it yourself by using the ArtifactLoader::new function with your namespace (in slug format (e.g. “my-team”)), project name and a burn_central_core::BurnCentral. However, it is also possible to request it directly in your routine by using declaring the param like so:
ⓘ
#[derive(Deserialize, Serialize, Default)]
pub struct LaunchArgs {
pub experiment_num: Option<i32>,
}
#[register(training, name = "mnist")]
pub fn training<B: AutodiffBackend>(
config: Args<LaunchArgs>,
MultiDevice(devices): MultiDevice<B>,
loader: ArtifactLoader<ModelArtifact<B>>,
) -> Result<Model<ModelArtifact<B::InnerBackend>>, String> {
// Load a pretrained model if an experiment number is provided.
if let Some(experiment_num) = config.experiment_num {
let pretrained_model = loader
.load(experiment_num, "train_artifacts")
.expect("To be able to fetch artifacts");
}
}As you can see in the example above, you can use the loader to dynamically request experiment artifacts when requested through your routine configuration.
Implementations§
Source§impl<T: BundleDecode> ArtifactLoader<T>
impl<T: BundleDecode> ArtifactLoader<T>
Auto Trait Implementations§
impl<T> Freeze for ArtifactLoader<T>
impl<T> !RefUnwindSafe for ArtifactLoader<T>
impl<T> Send for ArtifactLoader<T>where
T: Send,
impl<T> Sync for ArtifactLoader<T>where
T: Sync,
impl<T> Unpin for ArtifactLoader<T>where
T: Unpin,
impl<T> !UnwindSafe for ArtifactLoader<T>
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more