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
12 changes: 8 additions & 4 deletions gradient/cli/deployments.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import collections

import click
from gradient.cli import common

from gradient import exceptions, logger
from gradient.api_sdk import DeploymentsClient
from gradient.cli import common
from gradient.cli.cli import cli
from gradient.cli.cli_types import ChoiceType
from gradient.cli.common import api_key_option, del_if_value_is_none, ClickGroup
Expand All @@ -23,8 +23,13 @@ def deployments():
)
)

DEPLOYMENT_MACHINE_TYPES = ("G1", "G6", "G12",
"K80", "P100", "GV100")
DEPLOYMENT_MACHINE_TYPES = (
"G1", "G6", "G12",
"K80", "P100", "GV100",
# VPC machine types
"c5.xlarge", "c5.4xlarge", "c5.12xlarge",
"p2.xlarge", "p3.2xlarge", "p3.16xlarge",
)


def get_deployment_client(api_key):
Expand Down Expand Up @@ -58,7 +63,6 @@ def get_deployment_client(api_key):
@click.option(
"--machineType",
"machine_type",
type=click.Choice(DEPLOYMENT_MACHINE_TYPES),
required=True,
help="Type of machine for new deployment",
cls=common.OptionReadValueFromConfigFile,
Expand Down
2 changes: 0 additions & 2 deletions gradient/cli/machines.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def machines_group():
@click.option(
"--machineType",
"machine_type",
type=click.Choice(constants.MACHINE_TYPES),
required=True,
help="Machine type",
cls=common.OptionReadValueFromConfigFile,
Expand Down Expand Up @@ -72,7 +71,6 @@ def check_machine_availability(region, machine_type, api_key, options_file):
@click.option(
"--machineType",
"machine_type",
type=click.Choice(constants.MACHINE_TYPES),
required=True,
help="Machine type",
cls=common.OptionReadValueFromConfigFile,
Expand Down
8 changes: 5 additions & 3 deletions gradient/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ class Region(object):
AMS1 = "Europe (AMS1)"


MACHINE_TYPES = ("Air", "Standard", "Pro", "Advanced", "GPU+",
"P4000", "P5000", "P6000", "V100",
"C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9", "C10")
MACHINE_TYPES = (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this list also include GCP VM types? K80, P100, GV100, GV100x8, G1, G6, and G12?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember where I got this list from. Is there any document with all machine type lists?

"Air", "Standard", "Pro", "Advanced", "GPU+",
"P4000", "P5000", "P6000", "V100",
"C1", "C2", "C3", "C4", "C5", "C6", "C7", "C8", "C9", "C10",
)

BILLING_TYPES = ["hourly", "monthly"]

Expand Down