Paperspace / gradient-cli

The command line interface for Gradient - https://gradient.paperspace.com
ISC License
65 stars 21 forks source link

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

Open madfrog opened 6 months ago

madfrog commented 6 months ago

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?

cay89 commented 6 months ago

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.