in src/hyperpod_cli/commands/job.py [0:0]
def validate_only_config_file_argument(ctx):
# Get all the arguments passed to the command
all_args = ctx.params
# Filter out None values and arguments that has default values
provided_args = {
k: v
for k, v in all_args.items()
if v is not None
and ctx.get_parameter_source(k) != click.core.ParameterSource.DEFAULT
}
# If config-file provided with other arguments, raise an error
if len(provided_args) > 1 and "config_file" in provided_args:
raise click.BadParameter(
f"Please only provide 'config-file' argument if you want to start job with .yaml file."
)