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

[FR] Samples for DMAC #24300

Merged
merged 4 commits into from
Sep 29, 2021
Merged

Conversation

maririos
Copy link
Member

To avoid conflicts I removed all code snippets from the main Readme and I renamed some of the snippets to include V3 at the end. I want to make sure I don't use them by mistake.

This PR has async samples. After this PR I will create the sync ones and the respective .md files.

@azure-sdk
Copy link
Collaborator

API changes have been detected in this PR. You can review API changes here

Copy link
Member

@kinelski kinelski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very straightforward. LGTM.

@@ -0,0 +1,57 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

File name has a typo: Asyncs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changos!!!!

@azure-sdk
Copy link
Collaborator

API changes have been detected in this PR. You can review API changes here

@@ -402,191 +210,23 @@ For more information and samples using prebuilt models see:
### Train a Model
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build a Model ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not making modifications to the Readme in this PR. Will do in a future PR

@@ -402,191 +210,23 @@ For more information and samples using prebuilt models see:
### Train a Model
Train a machine-learned model on your own form types. The resulting model will be able to recognize values from the types of forms it was trained on.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be changing this line too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not making modifications to the Readme in this PR. Will do in a future PR

Console.WriteLine($" Lower left => X: {selectionMark.BoundingBox[3].X}, Y= {selectionMark.BoundingBox[3].Y}");
}
}
```
For more information and samples see [here][recognize_content].

### Recognize Custom Forms
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Analyze Custom Documents

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not making modifications to the Readme in this PR. Will do in a future PR

@@ -185,121 +185,11 @@ The following section provides several code snippets illustrating common pattern
### Recognize Content
Recognize text, tables, and selection marks like radio buttons and check boxes data, along with their bounding box coordinates, from documents.

```C# Snippet:FormRecognizerSampleRecognizeContentFromUri
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you be adding samples in a later PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. When I work on the Readme, I will add the real samples here

@@ -20,7 +20,7 @@ You can set `endpoint` and `apiKey` based on an environment variable, a configur
### Source client
The source client that contains the custom model we want to copy.

```C# Snippet:FormRecognizerSampleCreateCopySourceClient
```C# Snippet:FormRecognizerSampleCreateCopySourceClientV3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if V3 would be appropriate, should we use the date version for the folder name?
And would that be enough without having to append the V3 in FormRecognizerSampleCreateCopySourceClientV3 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in this case, V3 is reflecting the SDK version. It is following the structure we talked about of having samples in V3 folder and current samples in either a V4 folder or in the main samples folder.

Although snippet strings are internal to us, they are the way for us to know where the code for the sample lives. We have also modified the samples code and moved all "old" samples to a V3 folder
https://github.com/Azure/azure-sdk-for-net/tree/feature/formrecognizerv4/sdk/formrecognizer/Azure.AI.FormRecognizer/tests/samples

Do you think this is clear enough for future developers to know which code/snippet/sample, lives where?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... I feel v3 or v4 is awkward since we havent used these terms before. Could we use similar wording as what python did v3.1 and v3.2-beta

Do you think this would be better?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it! I will change it to v3.1 everywhere to make it more clear. I will do it in the next PR to keep this one "small-ish"

Copy link
Member

@samvaity samvaity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need samples for get/list operations?

@maririos
Copy link
Member Author

Do we need samples for get/list operations?

Great point. I will add them here

@maririos maririos requested a review from samvaity September 29, 2021 19:27
@azure-sdk
Copy link
Collaborator

API changes have been detected in this PR. You can review API changes here

@check-enforcer
Copy link

This pull request is protected by Check Enforcer.

What is Check Enforcer?

Check Enforcer helps ensure all pull requests are covered by at least one check-run (typically an Azure Pipeline). When all check-runs associated with this pull request pass then Check Enforcer itself will pass.

Why am I getting this message?

You are getting this message because Check Enforcer did not detect any check-runs being associated with this pull request within five minutes. This may indicate that your pull request is not covered by any pipelines and so Check Enforcer is correctly blocking the pull request being merged.

What should I do now?

If the check-enforcer check-run is not passing and all other check-runs associated with this PR are passing (excluding license-cla) then you could try telling Check Enforcer to evaluate your pull request again. You can do this by adding a comment to this pull request as follows:
/check-enforcer evaluate
Typically evaulation only takes a few seconds. If you know that your pull request is not covered by a pipeline and this is expected you can override Check Enforcer using the following command:
/check-enforcer override
Note that using the override command triggers alerts so that follow-up investigations can occur (PRs still need to be approved as normal).

What if I am onboarding a new service?

Often, new services do not have validation pipelines associated with them. In order to bootstrap pipelines for a new service, please perform following steps:

For data-plane/track 2 SDKs Issue the following command as a pull request comment:

/azp run prepare-pipelines
This will run a pipeline that analyzes the source tree and creates the pipelines necessary to build and validate your pull request. Once the pipeline has been created you can trigger the pipeline using the following comment:
/azp run net - [service] - ci

For track 1 management-plane SDKs

Please open a separate PR and to your service SDK path in this file. Once that PR has been merged, you can re-run the pipeline to trigger the verification.

@azure-sdk
Copy link
Collaborator

API changes have been detected in this PR. You can review API changes here

@maririos maririos merged commit b2677e6 into Azure:feature/formrecognizerv4 Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants