How to Upload/Download Files by SDK?
Upload Files
Choose your model version
Step 1: Install the SDK CLI
Copypip install https://s3-han02.fptcloud.com/aifactory-public/SDK/model_space-0.3.3-py3-none-any.whlStep 2: Set up environment variables
Copyexport FPT_SPACE_URL=https://ai-api.fptcloud.com/
export FPT_TENANT_ID=
export FPT_SPACE_TOKEN=Note:
Please visit https://ai.fptcloud.com/{{tenant_name}}/user-token to generate your access token and paste it after FPT_SPACE_TOKEN= above
To use the SDK through a proxy (e.g., internal environments), make sure to configure one of the proxy environment variables (HTTP_PROXY or HTTPS_PROXY) in addition to the variables above.
Copyexport HTTP_PROXY=
export HTTPS_PROXY=Step 3: Upload model version
Copymodel_space model upload --model-id {{model_id}} --version-id {{version_id}} --path Optional parameters
-include:
Include only files that match the given regex patterns. Commas should separate multiple patterns ,.
-exclude:
Exclude files that match the given regex patterns. You can also use commas , to separate multiple patterns.
Download Files
Choose your model version
Step 1: Install the SDK CLI
Copypip install https://s3-han02.fptcloud.com/aifactory-public/SDK/model_space-0.3.3-py3-none-any.whlStep 2: Set up environment variables
Copyexport FPT_SPACE_URL=https://ai-api.fptcloud.com/
export FPT_TENANT_ID=
export FPT_SPACE_TOKEN=Note:
Please visit https://ai.fptcloud.com/{{tenant_name}}/user-token to generate your access token and paste it after FPT_SPACE_TOKEN= above
To use the SDK through a proxy (e.g., internal environments), make sure to configure one of the proxy environment variables (HTTP_PROXY or HTTPS_PROXY) in addition to the variables above.
Copyexport HTTP_PROXY=
export HTTPS_PROXY=Step 3: Download model version
Copymodel_space model download --model-id {{model_id}} --version-id {{version_id}} --path Optional parameters
-include:
Include only files that match the given regex patterns. Multiple patterns should be separated by commas ,.
-exclude:
Exclude files that match the given regex patterns. You can also use commas , to separate multiple patterns.
Delete File
Purpose: Delete the files associated with a version.
To delete files, follow these steps:
Step 1: Click on a model to view its details > Select the File Browser tab.
Step 2: Click the three dots in the Action column > Select Delete

Step 3: A confirmation dialog will appear. To confirm deletion, type "delete" into the text box. The Delete button will be enabled once the text is entered.

Step 4: To delete, click the Confirm button. To cancel the action, click Cancel.
Last updated
