Skip to content

Commit e7f6846

Browse files
johnhuang01TparuchuriPersonalizer Teamsharathmalladi
authored
[Personalizer] Thick client feature and Model Put API (Azure#26828)
* 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]>
1 parent 1645ea5 commit e7f6846

File tree

71 files changed

+3895
-724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+3895
-724
lines changed

sdk/personalizer/Azure.AI.Personalizer/api/Azure.AI.Personalizer.netstandard2.0.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,22 @@ public PersonalizerAdministrationClient(System.Uri endpoint, Azure.Core.TokenCre
1313
public virtual System.Threading.Tasks.Task<Azure.Response> DeletePersonalizerEvaluationAsync(string evaluationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
1414
public virtual Azure.Response DeletePersonalizerLogs(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
1515
public virtual System.Threading.Tasks.Task<Azure.Response> DeletePersonalizerLogsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
16+
public virtual Azure.Response<System.IO.Stream> ExportPersonalizerModel(bool isSigned, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
17+
public virtual System.Threading.Tasks.Task<Azure.Response<System.IO.Stream>> ExportPersonalizerModelAsync(bool isSigned, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
1618
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerEvaluation> GetPersonalizerEvaluation(string evaluationId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
1719
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; }
1820
public virtual Azure.Pageable<Azure.AI.Personalizer.PersonalizerEvaluation> GetPersonalizerEvaluations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
1921
public virtual Azure.AsyncPageable<Azure.AI.Personalizer.PersonalizerEvaluation> GetPersonalizerEvaluationsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2022
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerLogProperties> GetPersonalizerLogProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2123
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerLogProperties>> GetPersonalizerLogPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
22-
public virtual Azure.Response<System.IO.Stream> GetPersonalizerModel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
23-
public virtual System.Threading.Tasks.Task<Azure.Response<System.IO.Stream>> GetPersonalizerModelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2424
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerModelProperties> GetPersonalizerModelProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2525
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerModelProperties>> GetPersonalizerModelPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2626
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerPolicy> GetPersonalizerPolicy(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2727
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerPolicy>> GetPersonalizerPolicyAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2828
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerServiceProperties> GetPersonalizerProperties(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
2929
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.AI.Personalizer.PersonalizerServiceProperties>> GetPersonalizerPropertiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
30+
public virtual Azure.Response ImportPersonalizerSignedModel(System.IO.Stream modelBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
31+
public virtual System.Threading.Tasks.Task<Azure.Response> ImportPersonalizerSignedModelAsync(System.IO.Stream modelBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3032
public virtual Azure.Response ResetPersonalizerModel(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3133
public virtual System.Threading.Tasks.Task<Azure.Response> ResetPersonalizerModelAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
3234
public virtual Azure.Response<Azure.AI.Personalizer.PersonalizerPolicy> ResetPersonalizerPolicy(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@@ -64,10 +66,10 @@ public PersonalizerClient(System.Uri endpoint, Azure.Core.TokenCredential creden
6466
}
6567
public partial class PersonalizerClientOptions : Azure.Core.ClientOptions
6668
{
67-
public PersonalizerClientOptions(Azure.AI.Personalizer.PersonalizerClientOptions.ServiceVersion version = Azure.AI.Personalizer.PersonalizerClientOptions.ServiceVersion.V1_1_preview_1) { }
69+
public PersonalizerClientOptions(Azure.AI.Personalizer.PersonalizerClientOptions.ServiceVersion version = Azure.AI.Personalizer.PersonalizerClientOptions.ServiceVersion.V1_1_preview_3, bool useLocalInference = false, float subsampleRate = 1f) { }
6870
public enum ServiceVersion
6971
{
70-
V1_1_preview_1 = 1,
72+
V1_1_preview_3 = 1,
7173
}
7274
}
7375
public partial class PersonalizerCreateEvaluationOperation : Azure.Operation<Azure.AI.Personalizer.PersonalizerEvaluation>

sdk/personalizer/Azure.AI.Personalizer/src/Azure.AI.Personalizer.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<AssemblyTitle>Microsoft Azure.AI.Personalizer client library</AssemblyTitle>
44
<Version>2.0.0-beta.2</Version>
@@ -32,6 +32,8 @@
3232

3333
<ItemGroup>
3434
<PackageReference Include="Azure.Core" />
35+
<PackageReference Include="Microsoft.RL" VersionOverride="1.0.18750001-dev" />
36+
<PackageReference Include="System.Text.Json" VersionOverride="6.0.1" />
3537
</ItemGroup>
3638

3739
</Project>

sdk/personalizer/Azure.AI.Personalizer/src/Generated/EvaluationsRestClient.cs

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/personalizer/Azure.AI.Personalizer/src/Generated/EventsRestClient.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/personalizer/Azure.AI.Personalizer/src/Generated/LogRestClient.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/personalizer/Azure.AI.Personalizer/src/Generated/ModelClient.cs

Lines changed: 0 additions & 186 deletions
This file was deleted.

0 commit comments

Comments
 (0)