19 Commits
Author SHA1 Message Date
Luis Cossío e1215364a3 Score boosting local mode (#915)
* add local mode of formula scoring

* grpc<->rest conversions

* fixes for formula evaluation

* add mixed payload type to fixture payload

* update tests

* ignore math warnings (invalid operations raise an error anyway)

* fix conversions

* use same haversine distance as in core

* upd tests

* add fixtures for expressions

* fix import

* temporary hack for tests

* evaluation fixes

* satisfy mypy

* gen async client

* reduce flakiness

..by nesting less equations, so that floating point differences affect
less

* get_args_subscribed

* retriever match multivalue behavior

* review remarks

* more review remarks

* review nit

* no type ignore

* fix imports
2025-04-22 15:35:59 +03:00
bdbe43db00 chore: Update clients (#758)
* update rest client

* update grpc client with grpcio 1.65.4

* update grpc client with grpcio==1.49.1

* generate grpc client with grpcio==1.48.2

* generate grpc client with grpcio==1.66.1 and mypy-protobuf extension

* add mypy-protobuf to pyproject

* relax version for grpcio, but keep grpcio-tools at 1.48.2

* improve generation script

* fix bash script comment

Co-authored-by: George <george.panchuk@qdrant.tech>

* use old grpcio to generate client

* rollbakc mypy-protobuf

* regenerate with distance matrix

* new: update clients (#774)

* new: update clients

* rollback grpcio version

* feature: Facets (#759)

* facet in local_collection.py

* replace usages of calculate_payload_mask

* - qdrant remote
- qdrant base
- qdrant client
- conversions

* congruence tests + local mode fixes

* generate async client

* add type stubs and misc fixes

* fix mypy in Python 3.8

* generate async client

* review remarks

* gen async client

* update for bool facets

* Feature: Distance Matrix API (#769)

* add remote impls

* add client impl

* regen async client

* start local

* regen async

* local mode

* start congruence

* Fix local mode

* regen async of course

* test filtering

* fix min samples count

* simplify comparaison loop

* simplify samples loop

* add rest/gRPC conversion tests

* fix conversions + tests

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
Co-authored-by: generall <andrey@vasnetsov.com>
Co-authored-by: Arnaud Gourlay <arnaud.gourlay@gmail.com>
2024-10-07 11:07:49 +02:00
Luis Cossío e4b492da0f Add a test for scrolling query with offset (#676) 2024-07-08 12:42:06 +03:00
Luis Cossío 0fc3341cfc : int 2024-07-01 22:52:12 +02:00
Luis Cossío f5f51550da ditch unused imports in test_query_batch.py 2024-07-01 22:52:08 +02:00
Luis Cossío 00d9b24440 danse dense revolution 🕺 2024-07-01 22:52:04 +02:00
Luis Cossío 1c9dfcc108 fix return types 2024-07-01 22:52:00 +02:00
Luis Cossío 2a3a4018ea smol refactors 2024-07-01 22:51:25 +02:00
Luis Cossío c78e1943be Local mode for Query 2024-07-01 22:49:50 +02:00
Luis Cossío 666c04fe10 allow string RecommendStrategy with prefer_grpc=True (#637) 2024-06-20 13:01:02 +02:00
Luis Cossío f184add5c2 Add support for datetime ranges (#517) 2024-03-04 19:09:39 +01:00
Luis Cossío 90586d2643 Remove deprecated field conversions (#502) 2024-03-04 19:08:56 +01:00
Luis Cossío 21863d1959 Generate rest and grpc clients for 1.8 (#512)
* update grpc client

* update rest client
2024-03-04 19:07:48 +01:00
Luis Cossío ee22ab2919 Local mode of order_by parameter in scroll + datetime support (#491)
* generate rest client (only points_api)

* generate grpc client (points part only)

* add local mode implementation

* update collections_api.py

* add grpc conversions

* fix problematic StartFrom Union order

* add basic congruence test

* route order_by in qdrant clients

* fix local mode `start_from` logic

* add library stubs for dateutil

* generate async client

* generate the rest of the rest client 👻

* test datetime values too

* add int Range and int StartFrom

* update points.proto and points_pb2.py

* fix conversion of range interface

* add conversion fixtures and use better conversion of datetime to timestamp

* remove integer range

* restore `value_by_key()`

* OrderBy grpc to rest conversions

* generate async client

* use `OrderByInterface` instead of only `OrderBy`

* - use equivalent qdrant core datetime parsing,
- use type alias for OrderingValue, instead of custom class,
- better random date generation

* Drop custom datetime parser implementation

* nit fixes

* fix flakiness of the congruence test by subsorting

* better datetime to timestamp conversion

* uncomment conversion fixtures, add Direction

* restore poetry.lock and remove dateutil dep

* poetry lock --no-update

* rename datetime.py to datetime_utils.py

* add StrictInt to StartFrom union

* use more date formats in fixtures

* move conversion test to `test_validate_conversions.py`

* drop `%:z` formats

* add more complex timezones to payload fixtures, fix deserialization

* update datetime parsing test
2024-03-04 19:07:31 +01:00
Luis Cossío 31232368c8 Fix potential edge case scoring in context search (#474)
* apply fast_sigmoid fn to context pair score

* remove redundant else statement

* better NaN and float32 handling

* remove unused import
2024-03-04 19:02:44 +01:00
Luis Cossío 298e67bcdc Add Discovery API and local mode (#368)
* add score calculations

* fix type errors, route scorers accordingly

* generate grpc client (only discovery stuff)

* generate rest client

* discover preprocessing + local mode handling

* implement discover for remote client

* add failing tests, fix some stuff

* update rest client and local mode

* fixes and more tests

* fix mypy errors

* generate async client

* tiny edit docstring

* simplify custom distance calculation,
fix euclidean case for recommend best score

* fix python version for generating grpc client

* update grpc (select only discovery changes)

* generate grpc: add also ShardKey changes,
fix conversion changes for deprecated PointsUpdateOperation operations

* fix coverage on conversions

* generate async client

* generate async client with python 3.11

* change dict -> typings.Dict

* add deprecated field handling for grpc.PointsUpdateOperation

* update grpc client

* fix grpc conversion issues and review comments

* increase coverage

* also test for prefer_grpc = True

* fix has_field

* unflake test_context_many_pairs

* don't convert if None in model conversions

* move docstring to qdrant_client.py

* handle request timeout on all other interfaces

* oopsie: define timeout param in search_batch

* generate async client
2023-12-07 13:32:55 +01:00
Luis Cossío fd2bf9c5b8 update recommend formula 2023-12-07 13:29:23 +01:00
Luis CossíoandGeorge bc08733e77 Mac: add explicit ports for integration tests (#170)
* fix: add explicit ports for integration tests

* amend: replace hardcoded grpc port

---------

Co-authored-by: George <george.panchuk@qdrant.tech>
2023-07-08 17:09:14 +04:00
Luis CossíoandGeorge Panchuk 0777ea88cb Add gnu-sed instructions for macOS in DEVELOPMENT.md (#181)
* Add gnu-sed instructions for macOS in DEVELOPMENT.md

* new: extend mac os sed instructions

---------

Co-authored-by: George Panchuk <george.panchuk@qdrant.tech>
2023-07-08 16:49:39 +04:00