Open zoubicek opened 7 months ago
will check
@zoubicek , which version did you use in rest api? this one?
@kazrael2119 yes, with the following endpoint -> https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/jobs/{id}?api-version=2023-10-01
@zoubicek not sure whether your issue is because of the api version. In 2.1.1, the job api uses 2022-10-01, azure-arm-machinelearning-3.0.0.zip here is the sdk generated with 2023-10-01, could you try to use this and call again?
Hi @zoubicek. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
@kazrael2119 I think I am not able to try it because in version 3.0.0 you delete the "AzureMachineLearningWorkspaces" client and without any samples or documentation I do not know how to replace it. But I can confirm that REST API works even with version 2022-10-01
. At the same time, I did not notice any change between these versions in the documentation. I would rather focus on the internal validation within the package, if there is a bug in the regex in the validation of URI (Job input AssetUri) for the "uri_file" or "uri_folder" types. Unfortunately, unlike the REST API, the library is not very specific when it comes to errors and only writes basic phrases without any details. But it makes the sense to me to look for a bug in the validation of URI for these kind of inputs.
for literal type, in sdk code, it is generated as
export interface LiteralJobInput extends JobInput {
/** Polymorphic discriminator, which specifies the different types this object can be */
jobInputType: "literal";
/** [Required] Literal value for the input. */
value: string;
}
we can see this model only extends JobInput model but for other types,
export interface UriFileJobInput extends AssetJobInput, JobInput {}
export interface AssetJobInput {
/** Input Asset Delivery Mode. */
mode?: InputDeliveryMode;
/** [Required] Input Asset URI. */
uri: string;
}
they extend two models, and in request body, it doesn't send the parameter defined in AssetJobInput , So the creation failed. Maybe it is a codegen issue.
I will take a look
Hi @zoubicek , could you try to use this package to create a job? azure-arm-machinelearning-2.2.0.zip
we fixed this issue, and it worked on my side
Hi @kazrael2119, I confirm that it works on my side as well. Thx
released the new package here: https://www.npmjs.com/package/@azure/arm-machinelearning/v/2.2.0
Describe the bug Unable to create a new Job using "client.jobs.createOrUpdate" function. The issue occurs when I add inputs of type "uri_file" or "uri_folder". With input of "literal" type it works. If I call request using REST API with same params, the job is created without any problems.
Returned error:
"message": "Request is invalid and/or missing fields.", "trace": "RestError: Request is invalid and/or missing fields.\n at handleErrorResponse (...\\node_modules\\@azure\\core-client\\dist\\commonjs\\deserializationPolicy.js:146:19)\n at deserializeResponseBody (...\\node_modules\\@azure\\core-client\\dist\\commonjs\\deserializationPolicy.js:82:45)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)" }
I also try to add the parameters "mode" and "description" but it does not help.
To Reproduce
Expected behavior The job will be created.
Screenshots
Additional context