gradient-cli icon indicating copy to clipboard operation
gradient-cli copied to clipboard

Why there is no deployments interfaces in SDK, only can be found in CLI?

Open madfrog opened this issue 1 year ago • 1 comments

I want to use the SDK to operate deployments, but I found that the

deployment_client = sdk_client.DeploymentsClient()

listed in https://docs.paperspace.com/gradient/python-sdk/sdk-tutorial/ not work. There is also no corresponding file in the code. Has it been removed?

madfrog avatar Dec 30 '23 00:12 madfrog

The document on docs.paperspace.com seems outdated. DeploymentsClient() doesn't really exist, but these do:

from gradient import api_sdk

api_sdk.create_deployment()
api_sdk.update_deployment()
api_sdk.get_deployment()
api_sdk.list_deployments()
api_sdk.delete_deployment()

I've tried to create a deployment via create_deployment(), but it does not work for me. It throws an error:

gql.transport.exceptions.TransportQueryError: {'message': 'One or more invalid values were supplied.', 'locations': [{'line': 1, 'column': 27}], 'extensions': {'code': 'BAD_USER_INPUT'}}

However, it doesn't specify the problem, making it difficult to identify the issue.

Nevertheless, I think this is a dead project, as it hasn't been updated in a year and a half. Additionally, the readme suggests using the Paperspace CLI instead. But it's not written in Python, so that's the end of the story.

cay89 avatar Jan 11 '24 13:01 cay89