Skip to content

Commit

Permalink
[Personalizer] Thick client feature and Model Put API (#26828)
Browse files Browse the repository at this point in the history
* 12767912: Add isLocalInference in the public SDK

* Rename the variable

* Thick clent feature (#5)

* 12767907: Add a package dependency on Microsoft.RL

* Add RankProcessor

* Remove unused file

* Remove some key

* Toggle commented codes so that most tests can pass

* Getting the required config details for rankprocessor to enable livemode

* Updating the wrong variable name

* Cleanup

* Revert "12767907: Add a package dependency on Microsoft.RL"

This reverts commit c586920.

* Revert "Add RankProcessor"

This reverts commit 43967d3.

* Revert "Remove unused file"

This reverts commit 1e400a8.

* Revert "Toggle commented codes so that most tests can pass"

This reverts commit 7ec50ec.

* Delete DisposeHelper.cs

* Revert "Revert "12767907: Add a package dependency on Microsoft.RL""

This reverts commit d6df6b5.

* Cleanup after reverting

* generating client configuration using autorest

* Revert "generating client configuration using autorest"

This reverts commit 6b75695.

* Configuration details for livemodel

* cleanup

* cleanup

* Added ToDo comments

* correct the version in endpoints

Co-authored-by: Tejaswi Paruchuri <[email protected]>
Co-authored-by: Tparuchuri <[email protected]>

* 12768045: Add rank processor for single slot (#3)

Add RankProcessor

Remove unused file

Remove some key

Toggle commented codes so that most tests can pass

RankProcessor is working. Still need to clean up the codes

Add test json files

only construct LiveModel when localInference is true

Move rankprocessor to under model

Add latest generated files from autorest

Add autogenerated files from autorest

Fix the setting in DecisionContext

Remove wrong comment

Revert unexpected auto-generated file changes

Addressed a comment

Move suppression to GlobalSuppressions.cs

Remove the decoration in MultiSlotClient.cs

Refactor rankProcessor so that the actions is not modified and restored;
added a converter between sdk and Rl.Net; replace Newtonsoft.json with
System.Text.Json

Address comments

Refactor RlObjuectConverter; remove some unneeded setters, etc.

Added unit tests for RlObjectConverter, DecisionContext,
JsonRawStringListConverter

Remove unused using

* 13009290: Create RankProcessor class to Azure Personalizer client library for .NET for multi slot (#7)

* 13009290: Create RankProcessor class to Azure Personalizer client
              library for .NET for multi slot

* Address comments

* Subsampling

* Cleanup and added tests

* Cleanup and added tests

* cleanup

* cleanup

* Single SubSample rate

* Cleanup

* Cleanup

* Variable name

* 13192221: Point to the Rl.Net nuget package from SDK dev drop (#9)

* Adding test code for Model/Put api and moving to preview.3

* Johnhuang/13216589 reward activate local inference api (#10)

* Update API view file

* 13216589: Add local inference reward api
13216590: Add local inference activate api

* Fix the comments

* Remove IsDisposed method

* Revert "Update API view file"

This reverts commit 0a4dcbf.

* Remove MultiSlotClient class as it is never used

* Add more change after other PRs were merged

* Revert "Add more change after other PRs were merged"

This reverts commit 35a3120.

* 13225147: Update API view file for thick client (#11)

* 13225147: Update API view file for thick client

* Remove some suppressing warning

* Add more changes after 2 PRs were merged

* lazy load rank processor, refresh config  and relaod token on expiry (#12)

* lazy load rank processor, refresh config  and relaod token on expiry

* Comments & Cleanup

* Cleanup

* Addressed comments

* Cleanup

* Fix conflict

Co-authored-by: John Huang <[email protected]>

* 13309375: Improve the tests by mocking LiveModel when test mode is (#14)

* 13309375: Improve the tests by mocking LiveModel when test mode is
	  Playback but using real LiveModel when test mode is Live

* Change some public classes to private

* Address those comments in the main PR

* Update Microsoft.RL version

* Rename some properties

* Update Microsoft.RL version

* Fix spelling check

* Remove the unneeded warning

* Update live model config

* Use similar method names for export and import apis

* Johnhuang/13170630 address thick client sdk review (#18)

* 13170630: Address comments from SDK review

* Update API view file

* Remove unnecessary file under Gerated folder

* Add more test for RLObjectConverter

* Remove unused parameter

* Remove unneeded comment

* Update recording sessions for tests that were changed in earlier commit. (#19)

Co-authored-by: Personalizer Team <[email protected]>

* Update api view file after model api change (#20)

* Rename modelStream to modelBody (#21)

* Update Microsoft.RL version

* 13678440: Some cosmetic change to address comments from DotNet team (#22)

* Update method names for Export/Import models as per suggestions. (#23)

* Update method names for Export/Import models as per suggestions.

* Updates after running codecheck.ps1 script

Co-authored-by: Personalizer Team <[email protected]>

Co-authored-by: Tejaswi Paruchuri <[email protected]>
Co-authored-by: Tparuchuri <[email protected]>
Co-authored-by: Personalizer Team <[email protected]>
Co-authored-by: Sharath Malladi <[email protected]>
  • Loading branch information
5 people authored Mar 1, 2022
1 parent 1645ea5 commit e7f6846
Show file tree
Hide file tree
Showing 71 changed files with 3,895 additions and 724 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,22 @@ public PersonalizerAdministrationClient(System.Uri endpoint, Azure.Core.TokenCre
public virtual System.Threading.Tasks.Task<Azure.Response> DeletePersonalizerEvaluationAsync(string evaluationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response DeletePersonalizerLogs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> DeletePersonalizerLogsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<System.IO.Stream> ExportPersonalizerModel(bool isSigned, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<System.IO.Stream>> ExportPersonalizerModelAsync(bool isSigned, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerEvaluation> GetPersonalizerEvaluation(string evaluationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerEvaluation>> GetPersonalizerEvaluationAsync(string evaluationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Pageable<Azure.AI.Personalizer.PersonalizerEvaluation> GetPersonalizerEvaluations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.AsyncPageable<Azure.AI.Personalizer.PersonalizerEvaluation> GetPersonalizerEvaluationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerLogProperties> GetPersonalizerLogProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerLogProperties>> GetPersonalizerLogPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<System.IO.Stream> GetPersonalizerModel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<System.IO.Stream>> GetPersonalizerModelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerModelProperties> GetPersonalizerModelProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerModelProperties>> GetPersonalizerModelPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerPolicy> GetPersonalizerPolicy(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerPolicy>> GetPersonalizerPolicyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerServiceProperties> GetPersonalizerProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerServiceProperties>> GetPersonalizerPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response ImportPersonalizerSignedModel(System.IO.Stream modelBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> ImportPersonalizerSignedModelAsync(System.IO.Stream modelBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response ResetPersonalizerModel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> ResetPersonalizerModelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerPolicy> ResetPersonalizerPolicy(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down Expand Up @@ -64,10 +66,10 @@ public PersonalizerClient(System.Uri endpoint, Azure.Core.TokenCredential creden
}
public partial class PersonalizerClientOptions : Azure.Core.ClientOptions
{
public PersonalizerClientOptions(Azure.AI.Personalizer.PersonalizerClientOptions.ServiceVersion version = Azure.AI.Personalizer.PersonalizerClientOptions.ServiceVersion.V1_1_preview_1) { }
public PersonalizerClientOptions(Azure.AI.Personalizer.PersonalizerClientOptions.ServiceVersion version = Azure.AI.Personalizer.PersonalizerClientOptions.ServiceVersion.V1_1_preview_3, bool useLocalInference = false, float subsampleRate = 1f) { }
public enum ServiceVersion
{
V1_1_preview_1 = 1,
V1_1_preview_3 = 1,
}
}
public partial class PersonalizerCreateEvaluationOperation : Azure.Operation<Azure.AI.Personalizer.PersonalizerEvaluation>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyTitle>Microsoft Azure.AI.Personalizer client library</AssemblyTitle>
<Version>2.0.0-beta.2</Version>
Expand Down Expand Up @@ -32,6 +32,8 @@

<ItemGroup>
<PackageReference Include="Azure.Core" />
<PackageReference Include="Microsoft.RL" VersionOverride="1.0.18750001-dev" />
<PackageReference Include="System.Text.Json" VersionOverride="6.0.1" />
</ItemGroup>

</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

186 changes: 0 additions & 186 deletions sdk/personalizer/Azure.AI.Personalizer/src/Generated/ModelClient.cs

This file was deleted.

Loading

0 comments on commit e7f6846

Please sign in to comment.