Skip to content

Commit 032f639

Browse files
Merge remote-tracking branch 'team/impl/sky_lauch' into impl/demo/100724
2 parents a85fa24 + ab8ff6e commit 032f639

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/pymc_server/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pymc_server.cli_factory import setup_launch_factory, setup_status_factory
99
from sky.usage import usage_lib
1010
from sky.cli import _get_shell_complete_args, _get_click_major_version, _complete_cluster_name, _NaturalOrderGroup, _DocumentedCodeCommand
11-
from pymc_server.utils.cli_ex import jobs_launch as ex_launch
11+
1212

1313

1414
from sky.cli import (

src/pymc_server/utils/yaml.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def get_pymc_config_yaml(module_name, import_from="config", file_name="base.yaml
125125

126126
# check that we have the config and support the module
127127
is_valid_module = file_exists and module_name in supported_modules
128-
assert is_valid_module , f'Not Implemented: the only supported module are {supported_modules} but we may have config for additional modules: {list}'
128+
assert is_valid_module , f'{colorama.Fore.RED}Not Implemented: {colorama.Style.RESET_ALL}the only supported module are {colorama.Fore.YELLOW}{supported_modules}{colorama.Style.RESET_ALL} but we may have config for additional modules: {colorama.Fore.YELLOW}{list}{colorama.Style.RESET_ALL}'
129129

130130
return f'{base_path}/{import_from}/{module_name}/{file_name}'
131131

@@ -155,15 +155,18 @@ def get_config_from_yaml(entrypoint: Tuple[str, ...],module_name:Optional[str],b
155155
exists(entrypoint[0])
156156
userYaml, isValid = _check_and_return_yaml(getUserYaml(entrypoint))
157157

158+
current_module = module_name if module_name is not None else get_module_name_from_yaml()
158159
if base_config_path is not None:
160+
if(current_module is None):
161+
raise Exception(f'{colorama.Fore.RED}Please define a module for: '
162+
f'{colorama.Fore.YELLOW}{base_config_path}{colorama.Style.RESET_ALL}')
159163
base_file = f'{base_config_path}/{module_name}/base.yaml'
160164
exists(base_file)
161165
#customBaseYaml, isValid_ = _check_and_return_yaml(getUserYaml(base_file))
162166
module_config_path = base_file
163167

164168

165169
if module_config_path is None:
166-
current_module = module_name if module_name is not None else get_module_name_from_yaml()
167170
base_file = get_pymc_config_yaml(current_module if current_module is not None else "pymc-marketing")
168171
exists(base_file)
169172
module_config_path = base_file

0 commit comments

Comments
 (0)