Create a new training.
(
key: IntegrationTaskKey,
params: {
model_owner: string;
model_name: string;
version_id: string;
} & Parameters<ReplicateClient["trainings"]["create"]>[3]
)
| 25 | |
| 26 | /** Create a new training. */ |
| 27 | create( |
| 28 | key: IntegrationTaskKey, |
| 29 | params: { |
| 30 | model_owner: string; |
| 31 | model_name: string; |
| 32 | version_id: string; |
| 33 | } & Parameters<ReplicateClient["trainings"]["create"]>[3] |
| 34 | ): ReplicateReturnType<Training> { |
| 35 | return this.runTask( |
| 36 | key, |
| 37 | (client) => { |
| 38 | const { model_owner, model_name, version_id, ...options } = params; |
| 39 | |
| 40 | return client.trainings.create(model_owner, model_name, version_id, options); |
| 41 | }, |
| 42 | { |
| 43 | name: "Create Training", |
| 44 | params, |
| 45 | properties: modelProperties(params), |
| 46 | } |
| 47 | ); |
| 48 | } |
| 49 | |
| 50 | /** Create a new training and await the result. */ |
| 51 | createAndAwait( |
nothing calls this directly
no test coverage detected