pub struct TrainingManager { /* private fields */ }Expand description
High-level training orchestrator.
Provides a unified API across cloud and local training backends.
Implementations§
Source§impl TrainingManager
impl TrainingManager
Sourcepub fn add_cloud_provider(&mut self, provider: Box<dyn FineTuneProvider>)
pub fn add_cloud_provider(&mut self, provider: Box<dyn FineTuneProvider>)
Register a cloud fine-tuning provider.
Sourcepub fn cloud_providers(&self) -> Vec<&str>
pub fn cloud_providers(&self) -> Vec<&str>
List registered cloud providers.
Sourcepub fn get_cloud_provider(&self, name: &str) -> Option<&dyn FineTuneProvider>
pub fn get_cloud_provider(&self, name: &str) -> Option<&dyn FineTuneProvider>
Get a cloud provider by name.
Sourcepub async fn start_cloud_job(
&self,
provider_name: &str,
config: CloudFineTuneConfig,
) -> Result<TrainingJobId, TrainingError>
pub async fn start_cloud_job( &self, provider_name: &str, config: CloudFineTuneConfig, ) -> Result<TrainingJobId, TrainingError>
Start a cloud fine-tuning job.
Sourcepub async fn wait_for_cloud_job(
&self,
provider_name: &str,
job_id: &TrainingJobId,
) -> Result<TrainingJobStatus, TrainingError>
pub async fn wait_for_cloud_job( &self, provider_name: &str, job_id: &TrainingJobId, ) -> Result<TrainingJobStatus, TrainingError>
Poll a cloud job until completion.
Sourcepub async fn check_cloud_job(
&self,
provider_name: &str,
job_id: &TrainingJobId,
) -> Result<TrainingJobStatus, TrainingError>
pub async fn check_cloud_job( &self, provider_name: &str, job_id: &TrainingJobId, ) -> Result<TrainingJobStatus, TrainingError>
Check status of a cloud job.
Sourcepub async fn cancel_cloud_job(
&self,
provider_name: &str,
job_id: &TrainingJobId,
) -> Result<(), TrainingError>
pub async fn cancel_cloud_job( &self, provider_name: &str, job_id: &TrainingJobId, ) -> Result<(), TrainingError>
Cancel a cloud job.
Sourcepub async fn list_all_cloud_jobs(
&self,
) -> Result<Vec<TrainingJobSummary>, TrainingError>
pub async fn list_all_cloud_jobs( &self, ) -> Result<Vec<TrainingJobSummary>, TrainingError>
List all jobs across all cloud providers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TrainingManager
impl !RefUnwindSafe for TrainingManager
impl Send for TrainingManager
impl Sync for TrainingManager
impl Unpin for TrainingManager
impl UnsafeUnpin for TrainingManager
impl !UnwindSafe for TrainingManager
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