Skip to content

Commit

Permalink
.Net: Bump Microsoft.Azure.Cosmos from 3.44.0-preview.1 to 3.45.2 in …
Browse files Browse the repository at this point in the history
…/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] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Roger Barreto <19890735+RogerBarreto@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and RogerBarreto authored Nov 18, 2024
1 parent 5c998f2 commit 4bd6cb3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
2 changes: 1 addition & 1 deletion dotnet/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<PackageVersion Include="YamlDotNet" Version="15.3.0" />
<PackageVersion Include="Fluid.Core" Version="2.11.1" />
<!-- Memory stores -->
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.44.0-preview.1" />
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.45.2" />
<PackageVersion Include="Pgvector" Version="0.2.0" />
<PackageVersion Include="NRedisStack" Version="0.12.0" />
<PackageVersion Include="Milvus.Client" Version="2.3.0-preview.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,6 @@ public async Task CreateCollectionUsesValidContainerPropertiesAsync(IndexingMode

var expectedVectorEmbeddingPolicy = new VectorEmbeddingPolicy(
[
new Embedding
{
DataType = VectorDataType.Float16,
Dimensions = 1,
DistanceFunction = Microsoft.Azure.Cosmos.DistanceFunction.Cosine,
Path = "/DescriptionEmbedding1"
},
new Embedding
{
DataType = VectorDataType.Float32,
Expand Down Expand Up @@ -157,7 +150,6 @@ public async Task CreateCollectionUsesValidContainerPropertiesAsync(IndexingMode
{
VectorIndexes =
[
new VectorIndexPath { Type = VectorIndexType.Flat, Path = "/DescriptionEmbedding1" },
new VectorIndexPath { Type = VectorIndexType.Flat, Path = "/DescriptionEmbedding2" },
new VectorIndexPath { Type = VectorIndexType.QuantizedFlat, Path = "/DescriptionEmbedding3" },
new VectorIndexPath { Type = VectorIndexType.DiskANN, Path = "/DescriptionEmbedding4" },
Expand All @@ -172,7 +164,6 @@ public async Task CreateCollectionUsesValidContainerPropertiesAsync(IndexingMode
expectedIndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/IndexableData2/?" });
expectedIndexingPolicy.IncludedPaths.Add(new IncludedPath { Path = "/" });

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

[VectorStoreRecordVector(Dimensions: 1, DistanceFunction: DistanceFunction.CosineSimilarity, IndexKind: IndexKind.Flat)]
public ReadOnlyMemory<Half>? DescriptionEmbedding1 { get; set; }

[VectorStoreRecordVector(Dimensions: 2, DistanceFunction: DistanceFunction.CosineSimilarity, IndexKind: IndexKind.Flat)]
public ReadOnlyMemory<float>? DescriptionEmbedding2 { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public AzureCosmosDBNoSQLMemoryStore(
new Embedding
{
DataType = vectorDataType,
Dimensions = dimensions,
Dimensions = (int)dimensions,
DistanceFunction = DistanceFunction.Cosine,
Path = EmbeddingPath,
}
Expand Down Expand Up @@ -141,10 +141,10 @@ contain an embedding path at {EmbeddingPath}. It's also recommended to include t
be specified as {nameof(DistanceFunction)}.{nameof(DistanceFunction.Cosine)}.
""");
}
else if (embedding.DataType != VectorDataType.Float16 && embedding.DataType != VectorDataType.Float32)
else if (embedding.DataType != VectorDataType.Float32)
{
throw new NotSupportedException($"""
Only {nameof(VectorDataType)}.{nameof(VectorDataType.Float16)} and {nameof(VectorDataType)}.{nameof(VectorDataType.Float32)}
Only {nameof(VectorDataType)}.{nameof(VectorDataType.Float32)}
are supported.
""");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ public sealed class AzureCosmosDBNoSQLVectorStoreRecordCollection<TRecord> :
/// <summary>A <see cref="HashSet{T}"/> of types that vector properties on the provided model may have, based on <see cref="VectorDataType"/> enumeration.</summary>
private static readonly HashSet<Type> s_supportedVectorTypes =
[
// Float16
#if NET5_0_OR_GREATER
typeof(ReadOnlyMemory<Half>),
typeof(ReadOnlyMemory<Half>?),
#endif
// Float32
typeof(ReadOnlyMemory<float>),
typeof(ReadOnlyMemory<float>?),
Expand Down Expand Up @@ -485,7 +480,7 @@ private ContainerProperties GetContainerProperties()
var embedding = new Embedding
{
DataType = GetDataType(property.PropertyType, vectorPropertyName),
Dimensions = (ulong)property.Dimensions,
Dimensions = (int)property.Dimensions,
DistanceFunction = GetDistanceFunction(property.DistanceFunction, vectorPropertyName),
Path = path
};
Expand Down Expand Up @@ -576,9 +571,6 @@ private static VectorDataType GetDataType(Type vectorDataType, string vectorProp
{
return vectorDataType switch
{
#if NET5_0_OR_GREATER
Type type when type == typeof(ReadOnlyMemory<Half>) || type == typeof(ReadOnlyMemory<Half>?) => VectorDataType.Float16,
#endif
Type type when type == typeof(ReadOnlyMemory<float>) || type == typeof(ReadOnlyMemory<float>?) => VectorDataType.Float32,
Type type when type == typeof(ReadOnlyMemory<byte>) || type == typeof(ReadOnlyMemory<byte>?) => VectorDataType.Uint8,
Type type when type == typeof(ReadOnlyMemory<sbyte>) || type == typeof(ReadOnlyMemory<sbyte>?) => VectorDataType.Int8,
Expand Down

0 comments on commit 4bd6cb3

Please sign in to comment.