apache/dolphinscheduler · error · RuntimeException
MLFlow task params is not valid
Error message
MLFlow task params is not valid
What it means
MlflowTask.init() deserializes taskRequest.getTaskParams() into MlflowParameters and validates with checkParameters(). If parsing yields null or validation fails, it throws RuntimeException('MLFlow task params is not valid') to stop initialization before job submission.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-mlflow/src/main/java/org/apache/dolphinscheduler/plugin/task/mlflow/MlflowTask.java:95
String versionString;
if (StringUtils.isEmpty(version)) {
versionString = "";
} else if (GIT_CHECK_PATTERN.matcher(repository).find()) {
versionString = String.format("--version=%s", version);
} else {
versionString = "";
}
return versionString;
}
@Override
public void init() {
mlflowParameters = JSONUtils.parseObject(taskRequest.getTaskParams(), MlflowParameters.class);
log.info("Initialize MLFlow task params {}", JSONUtils.toPrettyJsonString(mlflowParameters));
if (mlflowParameters == null || !mlflowParameters.checkParameters()) {
throw new RuntimeException("MLFlow task params is not valid");
}
}
@SuppressWarnings("unchecked")
@Override
public void handle(TaskCallBack taskCallBack) throws TaskException {
try {
// construct process
IShellInterceptorBuilder<?, ?> shellActuatorBuilder = ShellInterceptorBuilderFactory.newBuilder()
.properties(ParameterUtils.convert(getParamsMap()))
.appendScript(buildCommand());
TaskResponse commandExecuteResult = shellCommandExecutor.run(shellActuatorBuilder, taskCallBack);
int exitCode;
if (mlflowParameters.getIsDeployDocker()) {
exitCode = checkDockerHealth();
} else {
exitCode = commandExecuteResult.getExitStatusCode();
}View on GitHub (pinned to 02eac45a1b)
Solutions
- Open the MLflow task node and fill in all required parameters (deploy model key with runs:/ or models:/ prefix, deploy mode, etc.).
- Validate the stored task params JSON is well-formed and matches MlflowParameters fields.
- Compare the definition against MlflowParameters.checkParameters() to see which required checks fail.
- After an upgrade, re-save legacy MLflow task definitions to include newly required fields.
Example fix
// before (task params JSON)
{"deployMode":"local"}
// after
{"deployMode":"local","deployModelKey":"runs:/1234/model","mlflowTaskType":"MLflow Projects","params":{}} Defensive patterns
Strategy: validation
Validate before calling
MlflowParameters p = JSONUtils.parseObject(taskParams, MlflowParameters.class);
if (p == null || !p.checkParameters()) {
throw new IllegalArgumentException("MLFlow task params invalid: required fields missing");
} Try / catch
try {
task.init();
} catch (RuntimeException e) {
log.error("MLFlow params rejected: {}", e.getMessage());
// fix task definition, do not blind-retry
} Prevention
- Fill all required MLflow task fields (deployModelKey, deployMode, mlflowTaskType) before saving.
- Validate params JSON after workflow imports or API-driven task creation.
- Re-save legacy MLflow tasks after DolphinScheduler upgrades.
- Verify deployModelKey uses runs:/ or models:/ to pass checkParameters.
When it happens
Trigger: taskRequest.getTaskParams() is empty/malformed JSON (parseObject returns null), or MlflowParameters.checkParameters() returns false due to missing required fields (e.g. deploy model key, deploy mode).
Common situations: MLflow task node saved with required fields blank; params JSON corrupted by API/workflow import; a DolphinScheduler upgrade changed required MlflowParameters fields so old task definitions now fail validation.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- dvc task params is not valid
- flink task params is not valid
- hiveCli task params is not valid
- Linkis task params is not valid
- DESCRIPTION_TOO_LONG_ERROR
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/2601022a408d1a22.
Report an issue: GitHub.