Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Jul 31, 2024
1 parent 9e10670 commit cc9dadb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions sky/api/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import sys
import textwrap
import time
import types
import typing
from typing import Any, Dict, List, Optional, Tuple, Union
import webbrowser
Expand All @@ -54,7 +55,7 @@
from sky import serve as serve_lib
from sky import sky_logging
from sky.adaptors import common as adaptors_common
from sky.api import sdk
from sky.api import sdk as sdk_lib
from sky.backends import backend_utils
from sky.benchmark import benchmark_state
from sky.benchmark import benchmark_utils
Expand Down Expand Up @@ -104,11 +105,13 @@
_DAG_NOT_SUPPORTED_MESSAGE = ('YAML specifies a DAG which is only supported by '
'`sky jobs launch`. `{command}` supports a '
'single task only.')

sdk: types.ModuleType
if env_options.Options.get(env_options.Options.CLI_LOCAL_MODE):
from sky import core
setattr(core, 'get', lambda args: args)
sdk = core
else:
sdk = sdk_lib

def _get_glob_clusters(clusters: List[str], silent: bool = False) -> List[str]:
"""Returns a list of clusters that match the glob pattern."""
Expand Down
5 changes: 3 additions & 2 deletions sky/backends/backend_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2778,8 +2778,9 @@ def get_endpoints(cluster_name: str,
launched_resources, {clouds.CloudImplementationFeatures.OPEN_PORTS})
except exceptions.NotSupportedError:
with ux_utils.print_exception_no_traceback():
raise ValueError('Querying endpoints is not supported '
f'for cluster {cluster_name!r} on {cloud}.') from None
raise ValueError(
'Querying endpoints is not supported '
f'for cluster {cluster_name!r} on {cloud}.') from None

config = common_utils.read_yaml(handle.cluster_yaml)
port_details = provision_lib.query_ports(repr(cloud),
Expand Down
1 change: 0 additions & 1 deletion sky/skypilot_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
from sky import sky_logging
from sky.skylet import constants
from sky.utils import common_utils
from sky.utils import registry
from sky.utils import schemas
from sky.utils import ux_utils

Expand Down

0 comments on commit cc9dadb

Please sign in to comment.