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 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>
Auto 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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more