[formrecognizer] update samples to train a model where a model_id is needed#18789
Merged
kristapratico merged 7 commits intomasterfrom May 19, 2021
Merged
[formrecognizer] update samples to train a model where a model_id is needed#18789kristapratico merged 7 commits intomasterfrom
kristapratico merged 7 commits intomasterfrom
Conversation
maririos
reviewed
May 18, 2021
| This sample demonstrates the differences in output that arise when begin_recognize_custom_forms | ||
| is called with custom models trained with labels and without labels. The models used in this | ||
| sample can be created in sample_train_model_with_labels_async.py and sample_train_model_without_labels_async.py | ||
| using the training files found here: https://aka.ms/azsdk/formrecognizer/sampletrainingfiles |
maririos
reviewed
May 18, 2021
| TEST_MODE: 'RunLiveNoRecord' | ||
| AZURE_SKIP_LIVE_RECORDING: 'True' | ||
| AZURE_TEST_RUN_LIVE: 'true' | ||
| # EnvVars for samples to run. TODO: These use an existing FR resource. Fix samples so they don't have to |
maririos
reviewed
May 18, 2021
| 5) AZURE_SOURCE_MODEL_ID - the model ID from the source resource to be copied over to the target resource. | ||
| - OR - | ||
| CONTAINER_SAS_URL - The shared access signature (SAS) Url of your Azure Blob Storage container with your forms. | ||
| A model will be trained and used to to run the sample. |
Member
There was a problem hiding this comment.
duplicate to to it is in other places too
Member
There was a problem hiding this comment.
And not related, but in my head, when I read it in Spanish it sounded like: https://www.youtube.com/watch?v=5AkDqm-cEgg
Contributor
Author
There was a problem hiding this comment.
thanks for catching this! love the song :)
maririos
approved these changes
May 18, 2021
iscai-msft
approved these changes
May 18, 2021
| target_endpoint = os.environ["AZURE_FORM_RECOGNIZER_TARGET_ENDPOINT"] | ||
| target_key = os.environ["AZURE_FORM_RECOGNIZER_TARGET_KEY"] | ||
| source_model_id = os.environ["AZURE_SOURCE_MODEL_ID"] | ||
| source_model_id = os.getenv("AZURE_SOURCE_MODEL_ID") or custom_model_id |
Contributor
There was a problem hiding this comment.
nit: i think you can do os.getenv("AZURE_SOURCE_MODEL_ID", custom_model_id)
Contributor
Author
There was a problem hiding this comment.
good catch! I was using os.environ before and then missed this when I switched to getenv :)
catalinaperalta
approved these changes
May 18, 2021
Member
catalinaperalta
left a comment
There was a problem hiding this comment.
Agree with the other nits. Aside from that this looks great! I think the samples will be so much easier to use now as well! 🎉
iscai-msft
added a commit
to iscai-msft/azure-sdk-for-python
that referenced
this pull request
May 28, 2021
…into protocol_base * 'master' of https://github.com/Azure/azure-sdk-for-python: (365 commits) Agrifood/test infra (Azure#18779) [formrecognizer] update samples to train a model where a model_id is needed (Azure#18789) replace response urls too (Azure#18758) [AutoRelease] t2-resource-2021-05-19-78417 (Azure#18807) [pipeline]update autorest version for pipeline (Azure#18782) [AutoRelease] t2-digitaltwins-2021-05-18-25594(wave4) (Azure#18786) [AutoRelease] t2-hybridkubernetes-2021-05-19-49364(wave4) (Azure#18802) Added Async APIs and Samples for attestation SDK (Azure#18735) [AVA] Updating links in package ReadMe (Azure#18800) Sync eng/common directory with azure-sdk-tools for PR 1585 (Azure#18793) Increment version for textanalytics releases (Azure#18797) remove PHI with multiple actions due to known service error (Azure#18794) [textanalyitcs] switch to westus2 region (Azure#18791) Remove implicit dependency on successful completion of verify-links (Azure#18277) Add Testing of Conda Artifacts (Azure#18478) reset continuation token (Azure#18772) pipline prepare (Azure#18755) [AutoRelease] t2-machinelearningcompute-2021-05-14-14426(wave4) (Azure#18750) [AutoRelease] t2-iothubprovisioningservices-2021-05-14-29542(wave4) (Azure#18748) [AutoRelease] t2-agfood-2021-05-17-53436 (Azure#18768) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #18465