Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Aug 2, 2024
1 parent 8cd02e8 commit a773cad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
16 changes: 10 additions & 6 deletions sky/api/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1801,7 +1801,7 @@ def cost_report(all: bool): # pylint: disable=redefined-builtin
- Clusters that were terminated/stopped on the cloud console.
"""
cluster_records = sdk.get(sdk.cost_report())
cluster_records = sdk.get(sdk.cost_report(all))

normal_cluster_records = []
controllers = dict()
Expand Down Expand Up @@ -2029,8 +2029,13 @@ def logs(
@_add_click_options(_COMMON_OPTIONS)
@click.argument('jobs', required=False, type=int, nargs=-1)
@usage_lib.entrypoint
def cancel(cluster: str, all: bool, jobs: List[int], yes: bool,
async_call: bool): # pylint: disable=redefined-builtin, redefined-outer-name
def cancel(
cluster: str,
all: bool, # pylint: disable=redefined-builtin
jobs: List[int], # pylint: disable=redefined-outer-name
yes: bool,
async_call: bool,
): # pylint: disable=redefined-builtin
# NOTE(dev): Keep the docstring consistent between the Python API and CLI.
"""Cancel job(s).
Expand Down Expand Up @@ -3240,7 +3245,7 @@ def _output():
all_regions=all_regions)
# Import here to save module load speed.
# pylint: disable=import-outside-toplevel,line-too-long
from sky.clouds.service_catalog import common
from sky.clouds.service_catalog import common as catalog_common

# For each gpu name (count not included):
# - Group by cloud
Expand All @@ -3261,7 +3266,7 @@ def _output():
df = df.sort_values(by=['min_price', 'min_spot_price'])
df = df.drop(columns=['min_price', 'min_spot_price'])
sorted_dataclasses = [
common.InstanceTypeInfo(*row)
catalog_common.InstanceTypeInfo(*row)
for row in df.to_records(index=False)
]
new_result[gpu] = sorted_dataclasses
Expand Down Expand Up @@ -3429,7 +3434,6 @@ def storage_delete(names: List[str], all: bool, yes: bool, async_call: bool): #
_async_call_or_wait(request_id, async_call, 'storage')



@cli.group(cls=_NaturalOrderGroup)
def bench():
"""SkyPilot Benchmark CLI."""
Expand Down
2 changes: 1 addition & 1 deletion sky/api/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ async def logs(request: fastapi.Request,
# return log_dirs


@app.get('/cost-report')
@app.get('/cost_report')
async def cost_report(request: fastapi.Request,
cost_report_body: payloads.CostReportBody) -> None:
_start_background_request(
Expand Down
3 changes: 2 additions & 1 deletion sky/api/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ def launch(
# For internal use
quiet_optimizer=need_confirmation,
is_launched_by_jobs_controller=_is_launched_by_jobs_controller,
is_launched_by_sky_serve_controller=_is_launched_by_sky_serve_controller,
is_launched_by_sky_serve_controller=(
_is_launched_by_sky_serve_controller),
disable_controller_check=_disable_controller_check,
env_vars=_request_body_env_vars(),
)
Expand Down

0 comments on commit a773cad

Please sign in to comment.