Skip to content

Commit 4bd6cb3

Browse files
.Net: Bump Microsoft.Azure.Cosmos from 3.44.0-preview.1 to 3.45.2 in /dotnet (#9678)
Due to the drop of float16 support in the package, additional change to drop from the connector was needed to comply with the latest breaking change. - Azure/azure-cosmos-dotnet-v3#4792 Bumps [Microsoft.Azure.Cosmos](https://github.com/Azure/azure-cosmos-dotnet-v3) from 3.44.0-preview.1 to 3.45.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Azure/azure-cosmos-dotnet-v3/releases">Microsoft.Azure.Cosmos's releases</a>.</em></p> <blockquote> <h2>3.45.1</h2> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.1">3.45.1</a> - 2024-11-11</h3> <h4>Added</h4> <ul> <li><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4863">4863</a> VectorIndexDefinition: Refactors Code to Remove Support for VectorIndexShardKey from Preview Contract.</li> </ul> <h2>3.45.0</h2> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.0">3.45.0</a> - 2024-10-25</h3> <h4>Added</h4> <ul> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4781">4781</a> AppInsights: Adds classic attribute back to cosmos db to support appinsights sdk.</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4709">4709</a> Availability: Adds account-level read regions as effective preferred regions when preferred regions is not set on client.</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4810">4810</a> Package Upgrade: Refactors code to upgrade DiagnosticSource Library from 6.0.1 to 8.0.1</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4794">4794</a> Query: Adds hybrid search query pipeline stage</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4819">4819</a> Azurecore: Fixes upgrading azure core dependency to latest</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4814">4814</a> DeleteAllItemsByPartitionKeyStreamAsync: Adds DeleteAllItemsByPartitionKeyStreamAsync API to GA</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4845">4845</a> ContainerProperties: Refactors Vector Embedding and Indexing Policy Interfaces to Mark Them as Public for GA</p> </li> </ul> <h4>Fixed</h4> <ul> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4777">4777</a> Regions: Fixes Removes decommissioned regions.</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4765">4765</a> Open Telemetry: Fixes attribute name following otel convention</p> </li> </ul> <h2>3.45.0-preview.1</h2> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.0-preview.1">3.45.0-preview.1</a> - 2024-10-16</h3> <h4>Fixed</h4> <ul> <li><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4799">4799</a> Open Telemetry: Re-added deprecated attribute to support Application Insights SDK by default. For OpenTelemetry attributes, set the environment variable OTEL_SEMCONV_STABILITY_OPT_IN=<code>database/dupe</code>.</li> </ul> <h2>3.45.0-preview.0</h2> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.0-preview.0">3.45.0-preview.0</a> - 2024-10-07</h3> <h4>Added</h4> <ul> <li><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4566">4566</a> Container: Added support for IsFeedRangePartOfAsync, enabling precise comparisons to determine relationships between FeedRanges.</li> </ul> <h2>3.44.1</h2> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.44.1">3.44.1</a> - 2024-10-16</h3> <h4>Fixed</h4> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/changelog.md">Microsoft.Azure.Cosmos's changelog</a>.</em></p> <blockquote> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.2">3.45.2</a> - 2024-11-12</h3> <h4>Added</h4> <ul> <li><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4866">4866</a> JSON Binary Encoding: Adds support for encoding uniform arrays.</li> </ul> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.46.0-preview.1">3.46.0-preview.1</a> - 2024-11-06</h3> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.1">3.45.1</a> - 2024-11-06</h3> <h4>Added</h4> <ul> <li><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4863">4863</a> VectorIndexDefinition: Refactors Code to Remove Support for VectorIndexShardKey from Preview Contract.</li> </ul> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.46.0-preview.0">3.46.0-preview.0</a> - 2024-10-25</h3> <h4>Added</h4> <ul> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4792">4792</a> VectorIndexDefinition: Adds Support for Partitioned DiskANN</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4837">4837</a> ContainerProperties: Adds Full Text Search and Indexing Policy.</p> </li> </ul> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.0">3.45.0</a> - 2024-10-25</h3> <h4>Added</h4> <ul> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4781">4781</a> AppInsights: Adds classic attribute back to cosmos db to support appinsights sdk.</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4709">4709</a> Availability: Adds account-level read regions as effective preferred regions when preferred regions is not set on client.</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4810">4810</a> Package Upgrade: Refactors code to upgrade DiagnosticSource Library from 6.0.1 to 8.0.1</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4794">4794</a> Query: Adds hybrid search query pipeline stage</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4819">4819</a> Azurecore: Fixes upgrading azure core dependency to latest</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4814">4814</a> DeleteAllItemsByPartitionKeyStreamAsync: Adds DeleteAllItemsByPartitionKeyStreamAsync API to GA</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4845">4845</a> ContainerProperties: Refactors Vector Embedding and Indexing Policy Interfaces to Mark Them as Public for GA</p> </li> </ul> <h4>Fixed</h4> <ul> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4777">4777</a> Regions: Fixes Removes decommissioned regions.</p> </li> <li> <p><a href="https://redirect.github.com/Azure/azure-cosmos-dotnet-v3/pull/4765">4765</a> Open Telemetry: Fixes attribute name following otel convention</p> </li> </ul> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.45.0-preview.1">3.45.0-preview.1</a> - 2024-10-07</h3> <h3><!-- raw HTML omitted --> <a href="https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.44.1">3.44.1</a> - 2024-10-16</h3> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/Azure/azure-cosmos-dotnet-v3/commits">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.Azure.Cosmos&package-manager=nuget&previous-version=3.44.0-preview.1&new-version=3.45.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Roger Barreto <[email protected]>
1 parent 5c998f2 commit 4bd6cb3

File tree

4 files changed

+5
-25
lines changed

4 files changed

+5
-25
lines changed

dotnet/Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<PackageVersion Include="YamlDotNet" Version="15.3.0" />
115115
<PackageVersion Include="Fluid.Core" Version="2.11.1" />
116116
<!-- Memory stores -->
117-
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.44.0-preview.1" />
117+
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.45.2" />
118118
<PackageVersion Include="Pgvector" Version="0.2.0" />
119119
<PackageVersion Include="NRedisStack" Version="0.12.0" />
120120
<PackageVersion Include="Milvus.Client" Version="2.3.0-preview.1" />

dotnet/src/Connectors/Connectors.AzureCosmosDBNoSQL.UnitTests/AzureCosmosDBNoSQLVectorStoreRecordCollectionTests.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,6 @@ public async Task CreateCollectionUsesValidContainerPropertiesAsync(IndexingMode
123123

124124
var expectedVectorEmbeddingPolicy = new VectorEmbeddingPolicy(
125125
[
126-
new Embedding
127-
{
128-
DataType = VectorDataType.Float16,
129-
Dimensions = 1,
130-
DistanceFunction = Microsoft.Azure.Cosmos.DistanceFunction.Cosine,
131-
Path = "/DescriptionEmbedding1"
132-
},
133126
new Embedding
134127
{
135128
DataType = VectorDataType.Float32,
@@ -157,7 +150,6 @@ public async Task CreateCollectionUsesValidContainerPropertiesAsync(IndexingMode
157150
{
158151
VectorIndexes =
159152
[
160-
new VectorIndexPath { Type = VectorIndexType.Flat, Path = "/DescriptionEmbedding1" },
161153
new VectorIndexPath { Type = VectorIndexType.Flat, Path = "/DescriptionEmbedding2" },
162154
new VectorIndexPath { Type = VectorIndexType.QuantizedFlat, Path = "/DescriptionEmbedding3" },
163155
new VectorIndexPath { Type = VectorIndexType.DiskANN, Path = "/DescriptionEmbedding4" },
@@ -172,7 +164,6 @@ public async Task CreateCollectionUsesValidContainerPropertiesAsync(IndexingMode
172164
expectedIndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/IndexableData2/?" });
173165
expectedIndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/" });
174166

175-
expectedIndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/DescriptionEmbedding1/*" });
176167
expectedIndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/DescriptionEmbedding2/*" });
177168
expectedIndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/DescriptionEmbedding3/*" });
178169
expectedIndexingPolicy.ExcludedPaths.Add(new ExcludedPath { Path = "/DescriptionEmbedding4/*" });
@@ -704,9 +695,6 @@ private sealed class TestIndexingModel
704695
[VectorStoreRecordKey]
705696
public string? Id { get; set; }
706697

707-
[VectorStoreRecordVector(Dimensions: 1, DistanceFunction: DistanceFunction.CosineSimilarity, IndexKind: IndexKind.Flat)]
708-
public ReadOnlyMemory<Half>? DescriptionEmbedding1 { get; set; }
709-
710698
[VectorStoreRecordVector(Dimensions: 2, DistanceFunction: DistanceFunction.CosineSimilarity, IndexKind: IndexKind.Flat)]
711699
public ReadOnlyMemory<float>? DescriptionEmbedding2 { get; set; }
712700

dotnet/src/Connectors/Connectors.Memory.AzureCosmosDBNoSQL/AzureCosmosDBNoSQLMemoryStore.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public AzureCosmosDBNoSQLMemoryStore(
6363
new Embedding
6464
{
6565
DataType = vectorDataType,
66-
Dimensions = dimensions,
66+
Dimensions = (int)dimensions,
6767
DistanceFunction = DistanceFunction.Cosine,
6868
Path = EmbeddingPath,
6969
}
@@ -141,10 +141,10 @@ contain an embedding path at {EmbeddingPath}. It's also recommended to include t
141141
be specified as {nameof(DistanceFunction)}.{nameof(DistanceFunction.Cosine)}.
142142
""");
143143
}
144-
else if (embedding.DataType != VectorDataType.Float16 && embedding.DataType != VectorDataType.Float32)
144+
else if (embedding.DataType != VectorDataType.Float32)
145145
{
146146
throw new NotSupportedException($"""
147-
Only {nameof(VectorDataType)}.{nameof(VectorDataType.Float16)} and {nameof(VectorDataType)}.{nameof(VectorDataType.Float32)}
147+
Only {nameof(VectorDataType)}.{nameof(VectorDataType.Float32)}
148148
are supported.
149149
""");
150150
}

dotnet/src/Connectors/Connectors.Memory.AzureCosmosDBNoSQL/AzureCosmosDBNoSQLVectorStoreRecordCollection.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ public sealed class AzureCosmosDBNoSQLVectorStoreRecordCollection<TRecord> :
5757
/// <summary>A <see cref="HashSet{T}"/> of types that vector properties on the provided model may have, based on <see cref="VectorDataType"/> enumeration.</summary>
5858
private static readonly HashSet<Type> s_supportedVectorTypes =
5959
[
60-
// Float16
61-
#if NET5_0_OR_GREATER
62-
typeof(ReadOnlyMemory<Half>),
63-
typeof(ReadOnlyMemory<Half>?),
64-
#endif
6560
// Float32
6661
typeof(ReadOnlyMemory<float>),
6762
typeof(ReadOnlyMemory<float>?),
@@ -485,7 +480,7 @@ private ContainerProperties GetContainerProperties()
485480
var embedding = new Embedding
486481
{
487482
DataType = GetDataType(property.PropertyType, vectorPropertyName),
488-
Dimensions = (ulong)property.Dimensions,
483+
Dimensions = (int)property.Dimensions,
489484
DistanceFunction = GetDistanceFunction(property.DistanceFunction, vectorPropertyName),
490485
Path = path
491486
};
@@ -576,9 +571,6 @@ private static VectorDataType GetDataType(Type vectorDataType, string vectorProp
576571
{
577572
return vectorDataType switch
578573
{
579-
#if NET5_0_OR_GREATER
580-
Type type when type == typeof(ReadOnlyMemory<Half>) || type == typeof(ReadOnlyMemory<Half>?) => VectorDataType.Float16,
581-
#endif
582574
Type type when type == typeof(ReadOnlyMemory<float>) || type == typeof(ReadOnlyMemory<float>?) => VectorDataType.Float32,
583575
Type type when type == typeof(ReadOnlyMemory<byte>) || type == typeof(ReadOnlyMemory<byte>?) => VectorDataType.Uint8,
584576
Type type when type == typeof(ReadOnlyMemory<sbyte>) || type == typeof(ReadOnlyMemory<sbyte>?) => VectorDataType.Int8,

0 commit comments

Comments
 (0)