diff --git a/sky/api/cli.py b/sky/api/cli.py index d646aff650d..723cd22186e 100644 --- a/sky/api/cli.py +++ b/sky/api/cli.py @@ -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() @@ -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). @@ -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 @@ -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 @@ -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.""" diff --git a/sky/api/rest.py b/sky/api/rest.py index 39bc7dd8bc3..4cd009cc798 100644 --- a/sky/api/rest.py +++ b/sky/api/rest.py @@ -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( diff --git a/sky/api/sdk.py b/sky/api/sdk.py index 246dd1f43c7..dccfcf425c9 100644 --- a/sky/api/sdk.py +++ b/sky/api/sdk.py @@ -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(), )