Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 1ea7533

Browse files
committed
Fixed variable names
1 parent 4480440 commit 1ea7533

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

paperspace/cli/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ def get_deployments_list(api_key=None, **filters):
456456
def update_deployment_model(id_, api_key, **kwargs):
457457
del_if_value_is_none(kwargs)
458458
deployments_api = client.API(config.CONFIG_HOST, api_key=api_key)
459-
command = deployments_commands.UpdateModelCommand(api=deployments_api)
459+
command = deployments_commands.UpdateDeploymentCommand(api=deployments_api)
460460
command.execute(id_, kwargs)
461461

462462

paperspace/cli/models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ def models_group():
1414
@click.option(
1515
"--experimentId",
1616
"experimentId",
17-
help="Use to filter jobs by experiment ID",
17+
help="Use to filter by experiment ID",
1818
)
1919
@click.option(
2020
"--projectId",
2121
"projectId",
22-
help="Use to filter jobs by project ID",
22+
help="Use to filter by project ID",
2323
)
2424
@common.api_key_option
25-
def list_jobs(api_key, **filters):
25+
def list_models(api_key, **filters):
2626
common.del_if_value_is_none(filters)
27-
jobs_api = client.API(config.CONFIG_HOST, api_key=api_key)
28-
command = models_commands.ListModelsCommand(api=jobs_api)
27+
models_api = client.API(config.CONFIG_HOST, api_key=api_key)
28+
command = models_commands.ListModelsCommand(api=models_api)
2929
command.execute(filters)

paperspace/commands/deployments.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ def execute(self, filters=None):
4949
if not response.ok:
5050
self.logger.log_error_response(data)
5151
return
52-
models = self._get_deployments_list(response)
52+
deployments = self._get_deployments_list(response)
5353
except (ValueError, KeyError) as e:
5454
self.logger.log("Error while parsing response data: {}".format(e))
5555
else:
56-
self._log_deployments_list(models)
56+
self._log_deployments_list(deployments)
5757

5858
@staticmethod
5959
def _get_request_json(filters):
@@ -98,13 +98,13 @@ def _make_deployments_list_table(deployments):
9898
return table_string
9999

100100

101-
class UpdateModelCommand(_DeploymentCommandBase):
102-
def execute(self, model_id, kwargs):
101+
class UpdateDeploymentCommand(_DeploymentCommandBase):
102+
def execute(self, deployment_id, kwargs):
103103
if not kwargs:
104104
self.logger.log("No parameters to update were given. Use --help for more information.")
105105
return
106106

107-
json_ = {"id": model_id,
107+
json_ = {"id": deployment_id,
108108
"upd": kwargs}
109109
response = self.api.post("/deployments/updateDeployment/", json=json_)
110110
self._log_message(response,
@@ -113,8 +113,8 @@ def execute(self, model_id, kwargs):
113113

114114

115115
class StartDeploymentCommand(_DeploymentCommandBase):
116-
def execute(self, model_id):
117-
json_ = {"id": model_id,
116+
def execute(self, deployment_id):
117+
json_ = {"id": deployment_id,
118118
"isRunning": True}
119119
response = self.api.post("/deployments/updateDeployment/", json=json_)
120120
self._log_message(response,
@@ -123,8 +123,8 @@ def execute(self, model_id):
123123

124124

125125
class DeleteDeploymentCommand(_DeploymentCommandBase):
126-
def execute(self, model_id):
127-
json_ = {"id": model_id,
126+
def execute(self, deployment_id):
127+
json_ = {"id": deployment_id,
128128
"upd": {"isDeleted": True}}
129129
response = self.api.post("/deployments/updateDeployment/", json=json_)
130130
self._log_message(response,

0 commit comments

Comments
 (0)