You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Supplying `--model-path` archives the directory into a `.tar.gz` file, starts a multipart upload, transfers the artifact using the pre-signed URLs, and finalizes the upload automatically.
161
-
162
-
You can still pass `--create-upload` on its own to inspect the multipart session details without uploading any files.
Copy file name to clipboardExpand all lines: cmd/model/addModelToRepo.go
+25-16Lines changed: 25 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -79,13 +79,11 @@ type modelFile struct {
79
79
// TODO: replace the manual completion call with github.com/aws/aws-sdk-go-v2/service/s3's
80
80
// CompleteMultipartUpload to rely on the SDK for payload formatting and signing logic.
81
81
82
-
// AddModelToRepoCmd uploads a model to the RunPod model repository.
83
-
// Hidden while the model repository feature is in development and not ready for general use.
84
82
varAddModelToRepoCmd=&cobra.Command{
85
83
Use: "model",
86
84
Args: cobra.ExactArgs(0),
87
-
Short: "upload a model",
88
-
Long: "upload a model to the RunPod model repository",
85
+
Short: "internal command",
86
+
Long: "",
89
87
Hidden: true,
90
88
Run: func(cmd*cobra.Command, args []string) {
91
89
setModelGraphQLTimeout(cmd)
@@ -189,18 +187,18 @@ var AddModelToRepoCmd = &cobra.Command{
189
187
}
190
188
191
189
funcinit() {
192
-
AddModelToRepoCmd.Flags().StringVar(&addModelName, "name", "", "model name within your namespace")
193
-
AddModelToRepoCmd.Flags().StringVar(&addModelCredentialReference, "credential-reference", "", "reference that allows RunPod to access the model artifact")
194
-
AddModelToRepoCmd.Flags().StringVar(&addModelCredentialType, "credential-type", "", "type of credential used to access the model artifact (API_KEY, OAUTH_TOKEN, OTHER, USERNAME_PASSWORD)")
195
-
AddModelToRepoCmd.Flags().StringVar(&addModelVersionStatus, "version-status", "", "status to assign to the uploaded model version")
196
-
AddModelToRepoCmd.Flags().StringVar(&addModelStatus, "model-status", "", "status to assign to the model record")
197
-
AddModelToRepoCmd.Flags().BoolVar(&addModelCreateUpload, "create-upload", false, "initialize a multipart upload session for the model artifact")
198
-
AddModelToRepoCmd.Flags().StringVar(&addModelFileName, "file-name", "", "file name to use for the model artifact upload")
199
-
AddModelToRepoCmd.Flags().StringVar(&addModelFileSize, "file-size", "", "size of the model artifact in bytes")
200
-
AddModelToRepoCmd.Flags().StringVar(&addModelPartSize, "part-size", "", "preferred multipart upload part size in bytes")
201
-
AddModelToRepoCmd.Flags().StringVar(&addModelContentType, "content-type", "", "content type for the model artifact upload")
202
-
AddModelToRepoCmd.Flags().StringVar(&addModelDirectoryPath, "model-path", "", "path to a directory containing the model files to upload")
203
-
AddModelToRepoCmd.Flags().StringToStringVar(&addModelMetadata, "metadata", nil, "key=value metadata to associate with the model and upload")
0 commit comments