Skip to content

[TA] Added RecognizeCustomEntities Functionality#24245

Merged
maririos merged 7 commits intoAzure:feature/textanalytics/customfrom
ZulaMostafa:TA-CustomNER
Oct 19, 2021
Merged

[TA] Added RecognizeCustomEntities Functionality#24245
maririos merged 7 commits intoAzure:feature/textanalytics/customfrom
ZulaMostafa:TA-CustomNER

Conversation

@ZulaMostafa
Copy link
Copy Markdown
Contributor

This PR contains the implementation of the Recognize Custom Entities API interface as explained in #24054

Copy link
Copy Markdown
Member

@maririos maririos left a comment

Choose a reason for hiding this comment

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

So far it looks good. Mostly nits. Next review I will look at the tests

Because Ahmed's PR was merged, need to resolve the conflicts.

Copy link
Copy Markdown
Member

@deyaaeldeen deyaaeldeen left a comment

Choose a reason for hiding this comment

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

The implementation looks really good. I left a few comments, with one on re-using RecognizeEntitiesResult.

@ZulaMostafa
Copy link
Copy Markdown
Contributor Author

@maririos @mssfang @deyaaeldeen Thank you all for your great review! I've made all the changes, I've also generated the code based on the new swagger as @mssfang told me.
Since @AhmedLeithy rebased his other PR I will wait for his to get merged, to not rebase 2 times.

@check-enforcer
Copy link
Copy Markdown

check-enforcer bot commented Oct 3, 2021

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.

Copy link
Copy Markdown
Contributor

@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.

Partial review (haven't looked through tests yet).

@maririos maririos requested a review from jsquire October 7, 2021 21:11
Copy link
Copy Markdown
Member

@maririos maririos left a comment

Choose a reason for hiding this comment

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

Almost there. Most comments are nits.

return ActionResult.DocumentsResults;
}

private void ValidateInDocumentResult(CategorizedEntityCollection entities, List<string> minimumExpectedOutput)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

For now, this is good, but could you create an issue for us to look into moving the ValidateInDocumentResult function into a commonplace that both the RecognizeCustomEntitiesTests and the RecognizeEntitiesTests classes can consume?

/// <summary>
/// JobManifestTasks.
/// </summary>
[CodeGenModel("JobManifestTasks")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I imagine this was added by mistake?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is actually so weird, I didn't add it and I have no idea where did it come from!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The difference between it and the original one is the path, azure.ai.textanalytics is capitalized in the original one. I can't find the file locally, It may be a bug

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

weird. can u just delete the file so we don't merge it?

@maririos
Copy link
Copy Markdown
Member

@ZulaMostafa after you make changes to samples that use snippets, don't forget to run eng\scripts\Update-Snippets.ps1 textanalytics so the snippets are updated everywhere and you don't get build breaks like this one:

https://dev.azure.com/azure-sdk/public/_build/results?buildId=1147189&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=2102385d-609d-5572-64d2-932661c7902f

Copy link
Copy Markdown
Member

@maririos maririos left a comment

Choose a reason for hiding this comment

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

Besides the weird new file :P changes LGTM!!!

@ZulaMostafa
Copy link
Copy Markdown
Contributor Author

I think we are good to go now!

@maririos
Copy link
Copy Markdown
Member

I think we are good to go now!

Almost. Still need to delete file sdk/textanalytics/azure.ai.textanalytics/src/JobManifestTasks.cs

@ZulaMostafa
Copy link
Copy Markdown
Contributor Author

I think we are good to go now!

Almost. Still need to delete file sdk/textanalytics/azure.ai.textanalytics/src/JobManifestTasks.cs

My bad, I read your comment from the mail so I thought you was talking about session records. Anyways, I deleted the weirdo file :p

@maririos
Copy link
Copy Markdown
Member

/azp run net - textanalytics - ci

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@maririos maririos merged commit 6b074dd into Azure:feature/textanalytics/custom Oct 19, 2021
maririos pushed a commit to maririos/azure-sdk-for-net that referenced this pull request Oct 26, 2021
maririos added a commit that referenced this pull request Oct 26, 2021
* [TextAnalytics] Generated client from 3.2-preview.2 swagger (#23536)

* [TA] Added SingleCategoryClassify functionality (#24235)

* [TA] Added MultiCategoryClassify Functionality (#24237)

* [TA] Added RecognizeCustomEntities Functionality (#24245)

* [TA] Expose ActionName and enable multiple actions from same type (#24619)

* Rerecorded all tests excluding AAD ones (#24913)

* re-record AAD tests (#24919)

* [TA] Enable CI for live tests for custom features (#24916)

* add comments

Co-authored-by: Caio Saldanha <camaiaor@microsoft.com>
Co-authored-by: Ahmed Leithy <v-aleithy@microsoft.com>
Co-authored-by: Salah Mostafa <zulamostafa@gmail.com>
Co-authored-by: Salah Mostafa <v-samostafa@microsoft.com>
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.

6 participants