Skip to content

Commit

Permalink
config path safeguard
Browse files Browse the repository at this point in the history
  • Loading branch information
abiswal2001 committed Oct 20, 2023
1 parent 2a2fd1d commit 23b14c9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions skyplane/planner/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@


class Planner:
def __init__(self, transfer_config: TransferConfig, quota_limits_file: Optional[str] = None):
def __init__(self, transfer_config: TransferConfig, config: Optional[SkyplaneConfig] = None, quota_limits_file: Optional[str] = None):
self.transfer_config = transfer_config
self.config = SkyplaneConfig.load_config(config_path)
if config_path.exists():
self.config = SkyplaneConfig.load_config(config_path)
else:
self.config = SkyplaneConfig.default_config()
self.n_instances = self.config.get_flag("max_instances")

# Loading the quota information, add ibm cloud when it is supported
Expand Down

0 comments on commit 23b14c9

Please sign in to comment.