Clarify update_analyzer sample docs#47137
Conversation
|
Thank you for your contribution @anhtnt90dev! We will review the pull request and get back to you soon. |
|
@anhtnt90dev please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
2 similar comments
|
@anhtnt90dev please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
@anhtnt90dev please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Clarifies the limitations of update_analyzer in the Content Understanding samples/docs, and points users to begin_create_analyzer(..., allow_replace=True) for replacing create-only analyzer properties.
Changes:
- Update sample docstrings/comments to state only
descriptionandtagsare updatable viaupdate_analyzer. - Add guidance for changing create-only properties via
begin_create_analyzerwithallow_replace=True. - Update the samples README to reflect the same guidance.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_update_analyzer.py | Clarifies in-sample guidance on what update_analyzer can modify vs. what requires replace-create. |
| sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_analyzer_async.py | Same clarification as sync sample for async flow. |
| sdk/contentunderstanding/azure-ai-contentunderstanding/samples/README.md | Documents the update_analyzer limitation and replacement path in the samples index. |
| To change create-only properties such as models, field_schema, config, base_analyzer_id, | ||
| dynamic_field_schema, processing_location, or knowledge_sources, use begin_create_analyzer | ||
| with allow_replace=True. | ||
|
|
| To change create-only properties such as models, field_schema, config, base_analyzer_id, | ||
| dynamic_field_schema, processing_location, or knowledge_sources, use begin_create_analyzer | ||
| with allow_replace=True. |
|
|
||
| #### `sample_update_analyzer.py` / `sample_update_analyzer_async.py` | ||
| Updates an existing custom analyzer's description and tags. Shows how to modify analyzer properties. | ||
| Updates an existing custom analyzer's description and tags. Only `description` and `tags` can be updated with `update_analyzer`; use `begin_create_analyzer` with `allow_replace=True` to change create-only properties such as `models`, `field_schema`, `config`, `base_analyzer_id`, `dynamic_field_schema`, `processing_location`, or `knowledge_sources`. |
Summary
update_analyzeronly updatesdescriptionandtagsin the Content Understanding samples.begin_create_analyzer(..., allow_replace=True)for create-only analyzer properties such asmodels,field_schema, andconfig.Addresses #45789.
Checks
git diff --checkpython -m py_compile sdk/contentunderstanding/azure-ai-contentunderstanding/samples/sample_update_analyzer.py sdk/contentunderstanding/azure-ai-contentunderstanding/samples/async_samples/sample_update_analyzer_async.pyNote: I did not run the live samples because they require a Content Understanding endpoint and credentials.