@pulumiverse/scaleway
Version:
A Pulumi package for creating and managing Scaleway cloud resources.
221 lines (220 loc) • 7.97 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* The scaleway.inference.Model resource allows you to upload and manage inference models in the Scaleway Inference ecosystem. Once registered, a model can be used in any scaleway.inference.Deployment resource.
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const test = new scaleway.inference.Model("test", {
* name: "my-awesome-model",
* url: "https://huggingface.co/agentica-org/DeepCoder-14B-Preview",
* secret: "my-secret-token",
* });
* ```
*
* ### Deploy your own model on your managed inference
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scaleway from "@pulumiverse/scaleway";
*
* const myModel = new scaleway.inference.Model("my_model", {
* name: "my-awesome-model",
* url: "https://huggingface.co/agentica-org/DeepCoder-14B-Preview",
* secret: "my-secret-token",
* });
* const myDeployment = new scaleway.inference.Deployment("my_deployment", {
* name: "test-inference-deployment-basic",
* nodeType: "H100",
* modelId: myModel.id,
* publicEndpoint: {
* isEnabled: true,
* },
* acceptEula: true,
* });
* ```
*
* ## Import
*
* Models can be imported using, `{region}/{id}`, as shown below:
*
* bash
*
* ```sh
* $ pulumi import scaleway:inference/model:Model my_model fr-par/11111111-1111-1111-1111-111111111111
* ```
*/
export declare class Model extends pulumi.CustomResource {
/**
* Get an existing Model resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ModelState, opts?: pulumi.CustomResourceOptions): Model;
/**
* Returns true if the given object is an instance of Model. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Model;
/**
* The date and time of the creation of the model
*/
readonly createdAt: pulumi.Output<string>;
/**
* A textual description of the model (if available).
*/
readonly description: pulumi.Output<string>;
/**
* Whether the model requires end-user license agreement acceptance before use.
*/
readonly hasEula: pulumi.Output<boolean>;
/**
* The name of the model. This must be unique within the project.
*/
readonly name: pulumi.Output<string>;
/**
* List of supported node types and their quantization options. Each entry contains:
*/
readonly nodesSupports: pulumi.Output<outputs.inference.ModelNodesSupport[]>;
/**
* Size, in bits, of the model parameters.
*/
readonly parameterSizeBits: pulumi.Output<number>;
/**
* `projectId`) The ID of the project the deployment is associated with.
*/
readonly projectId: pulumi.Output<string>;
/**
* `region`) The region in which the deployment is created.
*/
readonly region: pulumi.Output<string>;
/**
* Authentication token used to pull the model from a private or gated URL (e.g., a Hugging Face access token with read permission).
*/
readonly secret: pulumi.Output<string | undefined>;
/**
* Total size, in bytes, of the model archive.
*/
readonly sizeBytes: pulumi.Output<number>;
/**
* The current status of the model (e.g., ready, error, etc.).
*/
readonly status: pulumi.Output<string>;
/**
* Tags associated with the model.
*/
readonly tags: pulumi.Output<string[]>;
/**
* The date and time of the last update of the model
*/
readonly updatedAt: pulumi.Output<string>;
/**
* The HTTPS source URL from which the model will be downloaded. This is typically a Hugging Face repository URL (e.g., https://huggingface.co/agentica-org/DeepCoder-14B-Preview). The URL must be publicly accessible or require valid credentials via `secret`
*/
readonly url: pulumi.Output<string>;
/**
* Create a Model resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: ModelArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Model resources.
*/
export interface ModelState {
/**
* The date and time of the creation of the model
*/
createdAt?: pulumi.Input<string>;
/**
* A textual description of the model (if available).
*/
description?: pulumi.Input<string>;
/**
* Whether the model requires end-user license agreement acceptance before use.
*/
hasEula?: pulumi.Input<boolean>;
/**
* The name of the model. This must be unique within the project.
*/
name?: pulumi.Input<string>;
/**
* List of supported node types and their quantization options. Each entry contains:
*/
nodesSupports?: pulumi.Input<pulumi.Input<inputs.inference.ModelNodesSupport>[]>;
/**
* Size, in bits, of the model parameters.
*/
parameterSizeBits?: pulumi.Input<number>;
/**
* `projectId`) The ID of the project the deployment is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* `region`) The region in which the deployment is created.
*/
region?: pulumi.Input<string>;
/**
* Authentication token used to pull the model from a private or gated URL (e.g., a Hugging Face access token with read permission).
*/
secret?: pulumi.Input<string>;
/**
* Total size, in bytes, of the model archive.
*/
sizeBytes?: pulumi.Input<number>;
/**
* The current status of the model (e.g., ready, error, etc.).
*/
status?: pulumi.Input<string>;
/**
* Tags associated with the model.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The date and time of the last update of the model
*/
updatedAt?: pulumi.Input<string>;
/**
* The HTTPS source URL from which the model will be downloaded. This is typically a Hugging Face repository URL (e.g., https://huggingface.co/agentica-org/DeepCoder-14B-Preview). The URL must be publicly accessible or require valid credentials via `secret`
*/
url?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Model resource.
*/
export interface ModelArgs {
/**
* The name of the model. This must be unique within the project.
*/
name?: pulumi.Input<string>;
/**
* `projectId`) The ID of the project the deployment is associated with.
*/
projectId?: pulumi.Input<string>;
/**
* `region`) The region in which the deployment is created.
*/
region?: pulumi.Input<string>;
/**
* Authentication token used to pull the model from a private or gated URL (e.g., a Hugging Face access token with read permission).
*/
secret?: pulumi.Input<string>;
/**
* The HTTPS source URL from which the model will be downloaded. This is typically a Hugging Face repository URL (e.g., https://huggingface.co/agentica-org/DeepCoder-14B-Preview). The URL must be publicly accessible or require valid credentials via `secret`
*/
url: pulumi.Input<string>;
}