diff --git a/gradient/api_sdk/config.py b/gradient/api_sdk/config.py index a588c46c..e1314f86 100644 --- a/gradient/api_sdk/config.py +++ b/gradient/api_sdk/config.py @@ -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/" diff --git a/gradient/cli/auth.py b/gradient/cli/auth.py index dbef6ec4..d788aa87 100644 --- a/gradient/cli/auth.py +++ b/gradient/cli/auth.py @@ -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. diff --git a/gradient/commands/deployments.py b/gradient/commands/deployments.py index 242c37f3..435d860b 100644 --- a/gradient/commands/deployments.py +++ b/gradient/commands/deployments.py @@ -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): diff --git a/gradient/commands/experiments.py b/gradient/commands/experiments.py index 6bf5670c..a4d4a195 100644 --- a/gradient/commands/experiments.py +++ b/gradient/commands/experiments.py @@ -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): diff --git a/gradient/commands/jobs.py b/gradient/commands/jobs.py index b6fcc9fd..50849488 100644 --- a/gradient/commands/jobs.py +++ b/gradient/commands/jobs.py @@ -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): diff --git a/gradient/commands/machines.py b/gradient/commands/machines.py index eaa1e98d..5638a9fa 100644 --- a/gradient/commands/machines.py +++ b/gradient/commands/machines.py @@ -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 diff --git a/gradient/commands/projects.py b/gradient/commands/projects.py index af8e1b78..7c295207 100644 --- a/gradient/commands/projects.py +++ b/gradient/commands/projects.py @@ -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 diff --git a/tests/functional/test_deployments.py b/tests/functional/test_deployments.py index 59d2a0ff..254c4d90 100644 --- a/tests/functional/test_deployments.py +++ b/tests/functional/test_deployments.py @@ -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' diff --git a/tests/functional/test_hyperparameters.py b/tests/functional/test_hyperparameters.py index 5eed3249..003e3183 100644 --- a/tests/functional/test_hyperparameters.py +++ b/tests/functional/test_hyperparameters.py @@ -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": { @@ -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": { diff --git a/tests/functional/test_jobs.py b/tests/functional/test_jobs.py index 2f39a043..09a287e5 100644 --- a/tests/functional/test_jobs.py +++ b/tests/functional/test_jobs.py @@ -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' diff --git a/tests/functional/test_machines.py b/tests/functional/test_machines.py index c04ecce9..7d910ce0 100644 --- a/tests/functional/test_machines.py +++ b/tests/functional/test_machines.py @@ -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" diff --git a/tests/functional/test_notebooks.py b/tests/functional/test_notebooks.py index bda0d18f..54d0b797 100644 --- a/tests/functional/test_notebooks.py +++ b/tests/functional/test_notebooks.py @@ -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", @@ -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") diff --git a/tests/functional/test_projects.py b/tests/functional/test_projects.py index df832af4..8f8a4cec 100644 --- a/tests/functional/test_projects.py +++ b/tests/functional/test_projects.py @@ -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": {