pub struct CreateTrainingPayload {
pub destination: String,
pub input: HashMap<String, String>,
pub webhook: String,
}
Expand description
Data to be sent to the API when creating a training.
Fields§
§destination: String
A string representing the desired model to push to in the format {destination_model_owner}/{destination_model_name}. This should be an existing model owned by the user or organization making the API request. If the destination is invalid, the server returns an appropriate 4XX response.
input: HashMap<String, String>
An object containing inputs to the Cog model’s train() function.
webhook: String
An HTTPS URL for receiving a webhook when the training completes. The webhook will be a POST request where the request body is the same as the response body of the get training operation. If there are network problems, we will retry the webhook a few times, so make sure it can be safely called more than once.
Trait Implementations§
Source§impl Debug for CreateTrainingPayload
impl Debug for CreateTrainingPayload
Source§impl<'de> Deserialize<'de> for CreateTrainingPayload
impl<'de> Deserialize<'de> for CreateTrainingPayload
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CreateTrainingPayload
impl RefUnwindSafe for CreateTrainingPayload
impl Send for CreateTrainingPayload
impl Sync for CreateTrainingPayload
impl Unpin for CreateTrainingPayload
impl UnwindSafe for CreateTrainingPayload
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