Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradient/api_sdk/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_api_key(config_dir_path, config_file_name):
return ''


_DEFAULT_WEB_URL = "https://www.paperspace.com"
_DEFAULT_WEB_URL = "https://console.paperspace.com"
_DEFAULT_CONFIG_HOST = "https://api.paperspace.io"
_DEFAULT_CONFIG_LOG_HOST = "https://logs.paperspace.io"
_DEFAULT_CONFIG_EXPERIMENTS_HOST = "https://services.paperspace.io/experiments/v1/"
Expand Down
2 changes: 1 addition & 1 deletion gradient/cli/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

LOGIN_DEPRECATION_MESSAGE = """The login command is currently disabled for logging in using `--email` and `--password`.

Instead, obtain an API Key from https://www.paperspace.com/console/account/api.
Instead, obtain an API Key from https://console.paperspace.com/account/api.

Then use the `apiKey` command to save your API Key locally.

Expand Down
2 changes: 1 addition & 1 deletion gradient/commands/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def execute(self, **kwargs):
self.logger.log(self.get_instance_url(deployment_id))

def get_instance_url(self, instance_id):
url = concatenate_urls(config.WEB_URL, "/console/deployments/{}".format(instance_id))
url = concatenate_urls(config.WEB_URL, "/deployments/{}".format(instance_id))
return url

def _handle_auth(self, kwargs):
Expand Down
2 changes: 1 addition & 1 deletion gradient/commands/experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def execute(self, json_, add_to_tensorboard=False):
return experiment_id

def get_instance_url(self, instance_id, project_id):
url = concatenate_urls(config.WEB_URL, "console/projects/{}/experiments/{}".format(project_id, instance_id))
url = concatenate_urls(config.WEB_URL, "projects/{}/experiments/{}".format(project_id, instance_id))
return url

def _handle_workspace(self, instance_dict):
Expand Down
2 changes: 1 addition & 1 deletion gradient/commands/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def execute(self, json_):

@staticmethod
def get_instance_url(instance_id):
url = concatenate_urls(config.config.WEB_URL, "console/jobs/{}".format(instance_id))
url = concatenate_urls(config.config.WEB_URL, "jobs/{}".format(instance_id))
return url

def _handle_workspace(self, instance_dict):
Expand Down
2 changes: 1 addition & 1 deletion gradient/commands/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def execute(self, kwargs):
self.logger.log(self.get_instance_url(handle))

def get_instance_url(self, machine_id):
url = concatenate_urls(config.WEB_URL, "console/machines/{}".format(machine_id))
url = concatenate_urls(config.WEB_URL, "machines/{}".format(machine_id))
return url


Expand Down
2 changes: 1 addition & 1 deletion gradient/commands/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def execute(self, project_dict):
self.logger.log(self.get_instance_url(project_id))

def get_instance_url(self, project_id):
url = concatenate_urls(config.WEB_URL, "console/projects/{}".format(project_id))
url = concatenate_urls(config.WEB_URL, "projects/{}".format(project_id))
return url


Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,12 @@ class TestDeploymentsCreate(object):
RESPONSE_JSON_200 = example_responses.CREATE_DEPLOYMENT_WITH_BASIC_OPTIONS_RESPONSE
UPDATE_TAGS_RESPONSE_JSON_200 = example_responses.UPDATE_TAGS_RESPONSE
EXPECTED_STDOUT = "New deployment created with id: sadkfhlskdjh\n" \
"https://www.paperspace.com/console/deployments/sadkfhlskdjh\n"
"https://console.paperspace.com/deployments/sadkfhlskdjh\n"

EXPECTED_STDOUT_WITH_WORKSPACE_ARCHIVING = "Archiving your working directory for upload as your experiment workspace..." \
"(See https://docs.paperspace.com/gradient/experiments/run-experiments for more information.)\n" \
"New deployment created with id: sadkfhlskdjh\n" \
"https://www.paperspace.com/console/deployments/sadkfhlskdjh\n"
"https://console.paperspace.com/deployments/sadkfhlskdjh\n"

RESPONSE_JSON_404_MODEL_NOT_FOUND = {"error": {"name": "Error", "status": 404, "message": "Unable to find model"}}
RESPONSE_CONTENT_404_MODEL_NOT_FOUND = b'{"error":{"name":"Error","status":404,"message":"Unable to find model"}}\n'
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_hyperparameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class TestCreateHyperparameters(object):

EXPECTED_RESPONSE = {"handle": "eshgvasywz9k1w", "message": "success"}
EXPECTED_STDOUT = "Hyperparameter tuning job created with ID: eshgvasywz9k1w\n" \
"https://www.paperspace.com/console/projects/some_project_id/experiments/eshgvasywz9k1w\n"
"https://console.paperspace.com/projects/some_project_id/experiments/eshgvasywz9k1w\n"

EXPECTED_RESPONSE_JSON_WITH_ERROR = {
"details": {
Expand Down Expand Up @@ -393,7 +393,7 @@ class TestCreateAndStartHyperparameters(object):

EXPECTED_RESPONSE = {"handle": "eshgvasywz9k1w", "message": "success"}
EXPECTED_STDOUT = "Hyperparameter tuning job created and started with ID: eshgvasywz9k1w\n" \
"https://www.paperspace.com/console/projects/some_project_id/experiments/eshgvasywz9k1w\n"
"https://console.paperspace.com/projects/some_project_id/experiments/eshgvasywz9k1w\n"

EXPECTED_RESPONSE_JSON_WITH_ERROR = {
"details": {
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ class TestJobsCreate(object):
RESPONSE_CONTENT_200 = b'{"handle":"sadkfhlskdjh","message":"success"}\n'
EXPECTED_STDOUT = u'New job created with ID: sadkfhlskdjh\n'
EXPECTED_STDOUT_TAGS = u'New job created with ID: sadkfhlskdjh\n' \
u'https://www.paperspace.com/console/jobs/sadkfhlskdjh\n'
u'https://console.paperspace.com/jobs/sadkfhlskdjh\n'

RESPONSE_JSON_404_PROJECT_NOT_FOUND = {"details": {"handle": "wrong_handle"}, "error": "Project not found"}
RESPONSE_CONTENT_404_PROJECT_NOT_FOUND = b'{"details":{"handle":"wrong_handle"},"error":"Project not found"}\n'
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class TestCreateMachine(object):
COMMAND_WITH_OPTIONS_FILE = ["machines", "create", "--optionsFile", ] # path added in test

EXPECTED_STDOUT = "New machine created with id: psclbvqpc\n" \
"https://www.paperspace.com/console/machines/psclbvqpc\n"
"https://console.paperspace.com/machines/psclbvqpc\n"

RESPONSE_JSON_WITH_WRONG_API_TOKEN = {"status": 400, "message": "Invalid API token"}
EXPECTED_STDOUT_WITH_WRONG_API_TOKEN = "Failed to create resource: Invalid API token\n"
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/test_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class TestNotebooksCreate(object):
"container": "jupyter/notebook",
}
EXPECTED_STDOUT = "Created new notebook with id: some_id\n" \
"https://www.paperspace.com/some_namespace/notebook/prg284tu2\n"
"https://console.paperspace.com/some_namespace/notebook/prg284tu2\n"

COMMAND_WITH_API_KEY_USED = [
"notebooks",
Expand Down Expand Up @@ -349,7 +349,7 @@ class TestNotebooksStart(object):
RESPONSE_JSON_WITH_WRONG_API_TOKEN = {"status": 400, "message": "Invalid API token"}
EXPECTED_STDOUT_WITH_WRONG_API_TOKEN = "Failed to create resource: Invalid API token\n"
EXPECTED_STDOUT_WITH_KEY = "Started notebook with id: n123\n" \
"https://www.paperspace.com/some_namespace/notebook/prg284tu2\n"
"https://console.paperspace.com/some_namespace/notebook/prg284tu2\n"

@mock.patch("gradient.api_sdk.clients.http_client.requests.get")
@mock.patch("gradient.api_sdk.clients.http_client.requests.post")
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class TestCreateProject(object):
UPDATE_TAGS_RESPONSE_JSON_200 = example_responses.UPDATE_TAGS_RESPONSE

EXPECTED_STDOUT = "Project created with ID: pru5a4dnu\n" \
"https://www.paperspace.com/console/projects/pru5a4dnu\n"
"https://console.paperspace.com/projects/pru5a4dnu\n"

EXPECTED_RESPONSE_JSON_WITH_ERROR = {
"error": {
Expand Down