Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Get task can't work for some batch job #2954

Closed
ylwu-amzn opened this issue Sep 15, 2024 · 0 comments · Fixed by #2955
Closed

[BUG] Get task can't work for some batch job #2954

ylwu-amzn opened this issue Sep 15, 2024 · 0 comments · Fixed by #2955
Labels
bug Something isn't working untriaged

Comments

@ylwu-amzn
Copy link
Collaborator

ylwu-amzn commented Sep 15, 2024

Hard coded status parsing logic

Get task status for remote job using hard-coded status field https://github.com/opensearch-project/ml-commons/blob/main/plugin/src/main/java/org/opensearch/ml/action/tasks/GetTaskTransportAction.java#L252

                  if ((remoteJob.containsKey("status") && remoteJob.get("status").equals("completed"))
                      || (remoteJob.containsKey("TransformJobStatus") && remoteJob.get("TransformJobStatus").equals("Completed"))) {
                      updatedTask.put(STATE_FIELD, COMPLETED);
                      mlTask.setState(COMPLETED);

                  } else if ((remoteJob.containsKey("status") && remoteJob.get("status").equals("cancelled"))
                      || (remoteJob.containsKey("TransformJobStatus") && remoteJob.get("TransformJobStatus").equals("Stopped"))) {
                      updatedTask.put(STATE_FIELD, CANCELLED);
                      mlTask.setState(CANCELLED);
                  }

Cohere batch embed job will return complete. The current code can't work for this case.

We need to enhance this part. Suggest to remove the hard-coded part by adding settings for status field and status regex.

Bedrock inference job arn can't work

Get Bedrock inference job API needs jobArn, but the jobArn has / which will cause failure "The provided ARN is invalid.", need to escape / to %2F.

@ylwu-amzn ylwu-amzn added bug Something isn't working untriaged labels Sep 15, 2024
@ylwu-amzn ylwu-amzn changed the title [BUG] Get task can't work for cohere batch job [BUG] Get task can't work for some batch job Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant