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

[formrecognizer] add copy tests for new features in v2.1 #14987

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ def get_custom_model(self, model_id, **kwargs):
raise ValueError("model_id cannot be None or empty.")

response = self._client.get_custom_model(model_id=model_id, include_keys=True, **kwargs)
if hasattr(response, "composed_train_results") and response.composed_train_results:
return CustomFormModel._from_generated_composed(response)
return CustomFormModel._from_generated(response, api_version=self.api_version)

@distributed_trace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ async def get_custom_model(self, model_id: str, **kwargs: Any) -> CustomFormMode
response = await self._client.get_custom_model(
model_id=model_id, include_keys=True, **kwargs
)
if hasattr(response, "composed_train_results") and response.composed_train_results:
return CustomFormModel._from_generated_composed(response)
return CustomFormModel._from_generated(response, api_version=self.api_version)

@distributed_trace_async
Expand Down
Loading