Skip to content

[FR] OperationDetails result returns Union[Model, Classifier] #29655

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

Closed
kristapratico opened this issue Mar 29, 2023 · 1 comment · Fixed by #29732
Closed

[FR] OperationDetails result returns Union[Model, Classifier] #29655

kristapratico opened this issue Mar 29, 2023 · 1 comment · Fixed by #29732
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Form Recognizer
Milestone

Comments

@kristapratico
Copy link
Member

kristapratico commented Mar 29, 2023

https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py#L3718

Concern that changing this to Union[DocumentModelDetails, DocumentModelClassifier] would be breaking since the latter type does not include model_id and introduces a new attribute - classifier_id.

@kristapratico kristapratico added Client This issue points to a problem in the data-plane of the library. Cognitive - Form Recognizer labels Mar 29, 2023
@kristapratico kristapratico self-assigned this Mar 29, 2023
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 29, 2023
@kristapratico kristapratico removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Mar 29, 2023
@kristapratico kristapratico added this to the 2023-04 milestone Mar 29, 2023
@kristapratico
Copy link
Member Author

As it turns out, this is only an issue with Get operation (list operation does not return the result). Using the older GA version and passing an ID which points to a classifier into the Get call will currently leak the classifier model, but the service team said that they are working to disable that. Moving forward classifier will only be available in this current preview version so we can change result to the union type.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Form Recognizer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant