[formrecognizer] update samples to train a model where a model_id is needed#18789
[formrecognizer] update samples to train a model where a model_id is needed#18789kristapratico merged 7 commits intomasterfrom
Conversation
| 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 |
| 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 |
| 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. |
There was a problem hiding this comment.
duplicate to to it is in other places too
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
There was a problem hiding this comment.
thanks for catching this! love the song :)
| 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 |
There was a problem hiding this comment.
nit: i think you can do os.getenv("AZURE_SOURCE_MODEL_ID", custom_model_id)
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
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! 🎉
…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) ...
Resolves #18465