pub struct AdaptiveClient { /* private fields */ }Implementations§
Source§impl AdaptiveClient
impl AdaptiveClient
pub fn new(api_base_url: Url, auth_token: String) -> Self
pub async fn list_recipes( &self, usecase: &str, ) -> Result<Vec<GetCustomRecipesCustomRecipes>, AdaptiveError>
pub async fn get_job(&self, job_id: Uuid) -> Result<GetJobJob, AdaptiveError>
pub async fn upload_dataset<P: AsRef<Path>>( &self, usecase: &str, name: &str, dataset: P, ) -> Result<UploadDatasetCreateDataset, AdaptiveError>
pub async fn publish_recipe<P: AsRef<Path>>( &self, usecase: &str, name: &str, key: &str, recipe: P, ) -> Result<PublishCustomRecipeCreateCustomRecipe, AdaptiveError>
pub async fn run_recipe( &self, usecase: &str, recipe_id: &str, parameters: Map<String, Value>, name: Option<String>, compute_pool: Option<String>, num_gpus: u32, ) -> Result<RunCustomRecipeCreateJob, AdaptiveError>
pub async fn list_jobs( &self, usecase: Option<String>, ) -> Result<Vec<ListJobsJobsNodes>, AdaptiveError>
pub async fn cancel_job( &self, job_id: Uuid, ) -> Result<CancelJobCancelJob, AdaptiveError>
pub async fn list_models( &self, usecase: String, ) -> Result<Vec<ListModelsUseCaseModelServices>, AdaptiveError>
pub async fn list_all_models( &self, ) -> Result<Vec<ListAllModelsModels>, AdaptiveError>
pub async fn list_usecases( &self, ) -> Result<Vec<ListUseCasesUseCases>, AdaptiveError>
pub async fn list_pools( &self, ) -> Result<Vec<ListComputePoolsComputePools>, AdaptiveError>
pub async fn get_recipe( &self, usecase: String, id_or_key: String, ) -> Result<Option<GetRecipeCustomRecipe>, AdaptiveError>
pub async fn get_grader( &self, id_or_key: &str, use_case: &str, ) -> Result<GetGraderGrader, AdaptiveError>
pub async fn get_dataset( &self, id_or_key: &str, use_case: &str, ) -> Result<Option<GetDatasetDataset>, AdaptiveError>
pub async fn get_model_config( &self, id_or_key: &str, ) -> Result<Option<GetModelConfigModel>, AdaptiveError>
pub fn base_url(&self) -> &Url
pub fn chunked_upload_dataset<'a, P: AsRef<Path> + Send + 'a>( &'a self, usecase: &'a str, name: &'a str, key: &'a str, dataset: P, ) -> Result<BoxStream<'a, Result<UploadEvent, AdaptiveError>>, AdaptiveError>
Trait Implementations§
Source§impl Clone for AdaptiveClient
impl Clone for AdaptiveClient
Source§fn clone(&self) -> AdaptiveClient
fn clone(&self) -> AdaptiveClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AdaptiveClient
impl !RefUnwindSafe for AdaptiveClient
impl Send for AdaptiveClient
impl Sync for AdaptiveClient
impl Unpin for AdaptiveClient
impl !UnwindSafe for AdaptiveClient
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