From eef97f683bb5f1720548fcbc8f38dfd8836a19b1 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Wed, 7 Aug 2024 09:19:10 +0200 Subject: [PATCH 1/7] Exposed lineage parameter --- src/neptune/internal/backends/hosted_neptune_backend.py | 5 +++++ src/neptune/internal/backends/neptune_backend.py | 1 + src/neptune/internal/backends/neptune_backend_mock.py | 1 + src/neptune/internal/backends/offline_neptune_backend.py | 1 + 4 files changed, 8 insertions(+) diff --git a/src/neptune/internal/backends/hosted_neptune_backend.py b/src/neptune/internal/backends/hosted_neptune_backend.py index 0d90af2d7..4a6dfd8c7 100644 --- a/src/neptune/internal/backends/hosted_neptune_backend.py +++ b/src/neptune/internal/backends/hosted_neptune_backend.py @@ -994,6 +994,7 @@ def get_float_series_values( limit: int, from_step: Optional[float] = None, use_proto: Optional[bool] = None, + include_inherited: bool = True, ) -> FloatSeriesValues: use_proto = use_proto if use_proto is not None else self.use_proto @@ -1003,6 +1004,10 @@ def get_float_series_values( "limit": limit, "skipToStep": from_step, } + + if not include_inherited: + params["lineage"] = "NONE" + try: if use_proto: result = ( diff --git a/src/neptune/internal/backends/neptune_backend.py b/src/neptune/internal/backends/neptune_backend.py index a8b3f7b72..d9b764031 100644 --- a/src/neptune/internal/backends/neptune_backend.py +++ b/src/neptune/internal/backends/neptune_backend.py @@ -262,6 +262,7 @@ def get_string_series_values( path: List[str], limit: int, from_step: Optional[float] = None, + include_inherited: bool = True, ) -> StringSeriesValues: ... @abc.abstractmethod diff --git a/src/neptune/internal/backends/neptune_backend_mock.py b/src/neptune/internal/backends/neptune_backend_mock.py index c1722b794..206b872b4 100644 --- a/src/neptune/internal/backends/neptune_backend_mock.py +++ b/src/neptune/internal/backends/neptune_backend_mock.py @@ -457,6 +457,7 @@ def get_string_series_values( path: List[str], limit: int, from_step: Optional[float] = None, + include_inherited: bool = True, ) -> StringSeriesValues: val = self._get_attribute(container_id, container_type, path, StringSeries) return StringSeriesValues( diff --git a/src/neptune/internal/backends/offline_neptune_backend.py b/src/neptune/internal/backends/offline_neptune_backend.py index 6964132f2..edb4c6326 100644 --- a/src/neptune/internal/backends/offline_neptune_backend.py +++ b/src/neptune/internal/backends/offline_neptune_backend.py @@ -112,6 +112,7 @@ def get_string_series_values( path: List[str], limit: int, from_step: Optional[float] = None, + include_inherited: bool = True, ) -> StringSeriesValues: raise NeptuneOfflineModeFetchException From ed1563da887b6341dddc071d748f116d2c698274 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Wed, 7 Aug 2024 09:46:21 +0200 Subject: [PATCH 2/7] Fixes --- src/neptune/api/fetching_series_values.py | 10 +++++++--- src/neptune/attributes/series/fetchable_series.py | 13 +++++++++++-- src/neptune/attributes/series/float_series.py | 5 ++++- src/neptune/attributes/series/string_series.py | 4 +++- src/neptune/internal/backends/neptune_backend.py | 2 +- .../internal/backends/neptune_backend_mock.py | 2 +- .../internal/backends/offline_neptune_backend.py | 2 +- 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/neptune/api/fetching_series_values.py b/src/neptune/api/fetching_series_values.py index f30fccaed..86603ca44 100644 --- a/src/neptune/api/fetching_series_values.py +++ b/src/neptune/api/fetching_series_values.py @@ -34,9 +34,13 @@ def fetch_series_values( - getter: Callable[..., Any], path: str, step_size: int = 1000, progress_bar: Optional[ProgressBarType] = None + getter: Callable[..., Any], + path: str, + step_size: int = 1000, + progress_bar: Optional[ProgressBarType] = None, + include_inherited: bool = True, ) -> Iterator[PointValue]: - first_batch = getter(from_step=None, limit=1) + first_batch = getter(from_step=None, limit=1, include_inherited=include_inherited) data_count = 0 total = first_batch.total last_step_value = (first_batch.values[-1].step - 1) if first_batch.values else None @@ -50,7 +54,7 @@ def fetch_series_values( bar.update(by=data_count, total=total) while data_count < first_batch.total: - batch = getter(from_step=last_step_value, limit=step_size) + batch = getter(from_step=last_step_value, limit=step_size, include_inherited=include_inherited) bar.update(by=len(batch.values), total=total) diff --git a/src/neptune/attributes/series/fetchable_series.py b/src/neptune/attributes/series/fetchable_series.py index 7829510e0..4c1159f58 100644 --- a/src/neptune/attributes/series/fetchable_series.py +++ b/src/neptune/attributes/series/fetchable_series.py @@ -50,9 +50,17 @@ def make_row(entry: Row, include_timestamp: bool = True) -> Dict[str, Union[str, class FetchableSeries(Generic[Row]): @abc.abstractmethod - def _fetch_values_from_backend(self, limit: int, from_step: Optional[float] = None) -> Row: ... + def _fetch_values_from_backend( + self, limit: int, from_step: Optional[float] = None, include_inherited: bool = True + ) -> Row: ... - def fetch_values(self, *, include_timestamp: bool = True, progress_bar: Optional[ProgressBarType] = None): + def fetch_values( + self, + *, + include_timestamp: bool = True, + progress_bar: Optional[ProgressBarType] = None, + include_inherited: bool = True, + ): import pandas as pd path = path_to_str(self._path) if hasattr(self, "_path") else "" @@ -60,6 +68,7 @@ def fetch_values(self, *, include_timestamp: bool = True, progress_bar: Optional getter=self._fetch_values_from_backend, path=path, progress_bar=progress_bar, + include_inherited=include_inherited, ) rows = dict((n, make_row(entry=entry, include_timestamp=include_timestamp)) for (n, entry) in enumerate(data)) diff --git a/src/neptune/attributes/series/float_series.py b/src/neptune/attributes/series/float_series.py index de3a1d623..07723a7f1 100644 --- a/src/neptune/attributes/series/float_series.py +++ b/src/neptune/attributes/series/float_series.py @@ -72,11 +72,14 @@ def fetch_last(self) -> float: val = self._backend.get_float_series_attribute(self._container_id, self._container_type, self._path) return val.last - def _fetch_values_from_backend(self, limit: int, from_step: Optional[float] = None) -> FloatSeriesValues: + def _fetch_values_from_backend( + self, limit: int, from_step: Optional[float] = None, include_inherited: bool = True + ) -> FloatSeriesValues: return self._backend.get_float_series_values( container_id=self._container_id, container_type=self._container_type, path=self._path, from_step=from_step, limit=limit, + include_inherited=include_inherited, ) diff --git a/src/neptune/attributes/series/string_series.py b/src/neptune/attributes/series/string_series.py index f56b490be..e66cf536c 100644 --- a/src/neptune/attributes/series/string_series.py +++ b/src/neptune/attributes/series/string_series.py @@ -97,7 +97,9 @@ def fetch_last(self) -> str: val = self._backend.get_string_series_attribute(self._container_id, self._container_type, self._path) return val.last - def _fetch_values_from_backend(self, limit: int, from_step: Optional[float] = None) -> StringSeriesValues: + def _fetch_values_from_backend( + self, limit: int, from_step: Optional[float] = None, include_inherited: bool = True + ) -> StringSeriesValues: return self._backend.get_string_series_values( container_id=self._container_id, container_type=self._container_type, diff --git a/src/neptune/internal/backends/neptune_backend.py b/src/neptune/internal/backends/neptune_backend.py index d9b764031..7fbc5297c 100644 --- a/src/neptune/internal/backends/neptune_backend.py +++ b/src/neptune/internal/backends/neptune_backend.py @@ -262,7 +262,6 @@ def get_string_series_values( path: List[str], limit: int, from_step: Optional[float] = None, - include_inherited: bool = True, ) -> StringSeriesValues: ... @abc.abstractmethod @@ -274,6 +273,7 @@ def get_float_series_values( limit: int, from_step: Optional[float] = None, use_proto: Optional[bool] = None, + include_inherited: bool = True, ) -> FloatSeriesValues: ... @abc.abstractmethod diff --git a/src/neptune/internal/backends/neptune_backend_mock.py b/src/neptune/internal/backends/neptune_backend_mock.py index 206b872b4..4aa049006 100644 --- a/src/neptune/internal/backends/neptune_backend_mock.py +++ b/src/neptune/internal/backends/neptune_backend_mock.py @@ -457,7 +457,6 @@ def get_string_series_values( path: List[str], limit: int, from_step: Optional[float] = None, - include_inherited: bool = True, ) -> StringSeriesValues: val = self._get_attribute(container_id, container_type, path, StringSeries) return StringSeriesValues( @@ -473,6 +472,7 @@ def get_float_series_values( limit: int, from_step: Optional[float] = None, use_proto: Optional[bool] = None, + include_inherited: bool = True, ) -> FloatSeriesValues: val = self._get_attribute(container_id, container_type, path, FloatSeries) return FloatSeriesValues( diff --git a/src/neptune/internal/backends/offline_neptune_backend.py b/src/neptune/internal/backends/offline_neptune_backend.py index edb4c6326..bb3f9b40a 100644 --- a/src/neptune/internal/backends/offline_neptune_backend.py +++ b/src/neptune/internal/backends/offline_neptune_backend.py @@ -112,7 +112,6 @@ def get_string_series_values( path: List[str], limit: int, from_step: Optional[float] = None, - include_inherited: bool = True, ) -> StringSeriesValues: raise NeptuneOfflineModeFetchException @@ -124,6 +123,7 @@ def get_float_series_values( limit: int, from_step: Optional[float] = None, use_proto: Optional[bool] = None, + include_inherited: bool = True, ) -> FloatSeriesValues: raise NeptuneOfflineModeFetchException From 7d4fc50ce7fd093d5fadaa1e05dd7668a4c7fc78 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Wed, 7 Aug 2024 11:29:42 +0200 Subject: [PATCH 3/7] Simplified --- src/neptune/api/fetching_series_values.py | 5 ++--- src/neptune/attributes/series/fetchable_series.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/neptune/api/fetching_series_values.py b/src/neptune/api/fetching_series_values.py index 86603ca44..372dd212b 100644 --- a/src/neptune/api/fetching_series_values.py +++ b/src/neptune/api/fetching_series_values.py @@ -38,9 +38,8 @@ def fetch_series_values( path: str, step_size: int = 1000, progress_bar: Optional[ProgressBarType] = None, - include_inherited: bool = True, ) -> Iterator[PointValue]: - first_batch = getter(from_step=None, limit=1, include_inherited=include_inherited) + first_batch = getter(from_step=None, limit=1) data_count = 0 total = first_batch.total last_step_value = (first_batch.values[-1].step - 1) if first_batch.values else None @@ -54,7 +53,7 @@ def fetch_series_values( bar.update(by=data_count, total=total) while data_count < first_batch.total: - batch = getter(from_step=last_step_value, limit=step_size, include_inherited=include_inherited) + batch = getter(from_step=last_step_value, limit=step_size) bar.update(by=len(batch.values), total=total) diff --git a/src/neptune/attributes/series/fetchable_series.py b/src/neptune/attributes/series/fetchable_series.py index 4c1159f58..8326594e5 100644 --- a/src/neptune/attributes/series/fetchable_series.py +++ b/src/neptune/attributes/series/fetchable_series.py @@ -17,6 +17,7 @@ import abc from datetime import datetime +from functools import partial from typing import ( Dict, Generic, @@ -65,10 +66,9 @@ def fetch_values( path = path_to_str(self._path) if hasattr(self, "_path") else "" data = fetch_series_values( - getter=self._fetch_values_from_backend, + getter=partial(self._fetch_values_from_backend, include_inherited=include_inherited), path=path, progress_bar=progress_bar, - include_inherited=include_inherited, ) rows = dict((n, make_row(entry=entry, include_timestamp=include_timestamp)) for (n, entry) in enumerate(data)) From 113e825c5c03726903c4d583031dcacf455a3627 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Wed, 7 Aug 2024 11:30:46 +0200 Subject: [PATCH 4/7] Revert --- src/neptune/api/fetching_series_values.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/neptune/api/fetching_series_values.py b/src/neptune/api/fetching_series_values.py index 372dd212b..f30fccaed 100644 --- a/src/neptune/api/fetching_series_values.py +++ b/src/neptune/api/fetching_series_values.py @@ -34,10 +34,7 @@ def fetch_series_values( - getter: Callable[..., Any], - path: str, - step_size: int = 1000, - progress_bar: Optional[ProgressBarType] = None, + getter: Callable[..., Any], path: str, step_size: int = 1000, progress_bar: Optional[ProgressBarType] = None ) -> Iterator[PointValue]: first_batch = getter(from_step=None, limit=1) data_count = 0 From e40321162031c310c2bd69332f54beb5eb92677c Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Wed, 7 Aug 2024 15:36:19 +0200 Subject: [PATCH 5/7] Matrix mac python3.8 --- .github/workflows/unit-in-pull-request.yml | 5 ++++- .github/workflows/unit.yml | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit-in-pull-request.yml b/.github/workflows/unit-in-pull-request.yml index eb42476fc..20f268afc 100644 --- a/.github/workflows/unit-in-pull-request.yml +++ b/.github/workflows/unit-in-pull-request.yml @@ -12,8 +12,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu, windows, macos] + os: [ubuntu, windows] python-version: ["3.7"] + include: + - os: macos + python-version: "3.8" name: 'test (${{ matrix.os }} - py${{ matrix.python-version }})' runs-on: ${{ matrix.os }}-latest steps: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 3437a3118..e69d62d5f 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -18,8 +18,6 @@ jobs: python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu, windows] include: - - python-version: "3.7.16" - os: macos - python-version: "3.8" os: macos - python-version: "3.9" From 7881182a8ee8263de76f7fcea9ce99163d7e4860 Mon Sep 17 00:00:00 2001 From: Rafal Jankowski Date: Wed, 7 Aug 2024 15:42:18 +0200 Subject: [PATCH 6/7] Revert "Matrix mac python3.8" This reverts commit e40321162031c310c2bd69332f54beb5eb92677c. --- .github/workflows/unit-in-pull-request.yml | 5 +---- .github/workflows/unit.yml | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit-in-pull-request.yml b/.github/workflows/unit-in-pull-request.yml index 20f268afc..eb42476fc 100644 --- a/.github/workflows/unit-in-pull-request.yml +++ b/.github/workflows/unit-in-pull-request.yml @@ -12,11 +12,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu, windows] + os: [ubuntu, windows, macos] python-version: ["3.7"] - include: - - os: macos - python-version: "3.8" name: 'test (${{ matrix.os }} - py${{ matrix.python-version }})' runs-on: ${{ matrix.os }}-latest steps: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index e69d62d5f..3437a3118 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -18,6 +18,8 @@ jobs: python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu, windows] include: + - python-version: "3.7.16" + os: macos - python-version: "3.8" os: macos - python-version: "3.9" From 975556d12d2e8fcbfaf42e25c7f64d4af2e1accc Mon Sep 17 00:00:00 2001 From: AleksanderWWW Date: Mon, 2 Sep 2024 13:47:55 +0200 Subject: [PATCH 7/7] Adjust neptune-client after endpoint changes (#1863) --- CHANGELOG.md | 1 + .../backends/hosted_neptune_backend.py | 42 +++++-------------- .../internal/backends/neptune_backend.py | 10 ----- .../internal/backends/neptune_backend_mock.py | 13 ------ src/neptune/internal/backends/nql.py | 1 + .../backends/offline_neptune_backend.py | 10 ----- 6 files changed, 12 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6819cde90..a527f99a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Series values DTO conversion reworked with protocol buffer support ([#1738](https://github.com/neptune-ai/neptune-client/pull/1738)) - Series values fetching reworked with protocol buffer support ([#1744](https://github.com/neptune-ai/neptune-client/pull/1744)) - Added support for enhanced field definitions querying ([#1751](https://github.com/neptune-ai/neptune-client/pull/1751)) +- Added support for `NQL` `MATCHES` operator ([#1863](https://github.com/neptune-ai/neptune-client/pull/1863)) ### Fixes - Fixed `tqdm.notebook` import only in Notebook environment ([#1716](https://github.com/neptune-ai/neptune-client/pull/1716)) diff --git a/src/neptune/internal/backends/hosted_neptune_backend.py b/src/neptune/internal/backends/hosted_neptune_backend.py index 4a6dfd8c7..79fdf80fa 100644 --- a/src/neptune/internal/backends/hosted_neptune_backend.py +++ b/src/neptune/internal/backends/hosted_neptune_backend.py @@ -55,7 +55,6 @@ LeaderboardEntry, NextPage, QueryFieldDefinitionsResult, - QueryFieldsResult, StringField, StringSeriesField, StringSeriesValues, @@ -1033,31 +1032,6 @@ def get_float_series_values( except HTTPNotFound: raise FetchAttributeNotFoundException(path_to_str(path)) - @with_api_exceptions_handler - def query_fields_within_project( - self, - project_id: QualifiedName, - field_names_filter: Optional[List[str]] = None, - experiment_ids_filter: Optional[List[str]] = None, - next_page: Optional[NextPage] = None, - ) -> QueryFieldsResult: - pagination = {"nextPage": next_page.to_dto()} if next_page else {} - params = { - "projectIdentifier": project_id, - "query": { - **pagination, - "attributeNamesFilter": field_names_filter, - "experimentIdsFilter": experiment_ids_filter, - }, - **DEFAULT_REQUEST_KWARGS, - } - - try: - result = self.leaderboard_client.api.queryAttributesWithinProject(**params).response().result - return QueryFieldsResult.from_model(result) - except HTTPNotFound: - raise ProjectNotFound(project_id=project_id) - @with_api_exceptions_handler def fetch_atom_attribute_values( self, container_id: str, container_type: ContainerType, path: List[str] @@ -1092,16 +1066,18 @@ def _get_file_set_download_request(self, container_id: str, container_type: Cont raise FetchAttributeNotFoundException(path_to_str(path)) @with_api_exceptions_handler - def _get_column_types(self, project_id: UniqueId, column: str, types: Optional[Iterable[str]] = None) -> List[Any]: + def _get_column_types(self, project_id: UniqueId, column: str) -> List[Any]: params = { "projectIdentifier": project_id, - "search": column, - "type": types, - "params": {}, + "query": { + "attributeNameFilter": {"mustMatchRegexes": [column]}, + }, **DEFAULT_REQUEST_KWARGS, } try: - return self.leaderboard_client.api.searchLeaderboardAttributes(**params).response().result.entries + return ( + self.leaderboard_client.api.queryAttributeDefinitionsWithinProject(**params).response().result.entries + ) except HTTPNotFound as e: raise ProjectNotFound(project_id=project_id) from e @@ -1124,6 +1100,8 @@ def search_leaderboard_entries( step_size = min(default_step_size, limit) if limit else default_step_size + columns = set(columns) | {sort_by} if columns else {sort_by} + types_filter = list(map(lambda container_type: container_type.to_api(), types)) if types else None attributes_filter = {"attributeFilters": [{"path": column} for column in columns]} if columns else {} @@ -1132,7 +1110,7 @@ def search_leaderboard_entries( elif sort_by == "sys/id": sort_by_column_type = FieldType.STRING.value else: - sort_by_column_type_candidates = self._get_column_types(project_id, sort_by, types_filter) + sort_by_column_type_candidates = self._get_column_types(project_id, sort_by) sort_by_column_type = _get_column_type_from_entries(sort_by_column_type_candidates, sort_by) try: diff --git a/src/neptune/internal/backends/neptune_backend.py b/src/neptune/internal/backends/neptune_backend.py index 7fbc5297c..7193fac19 100644 --- a/src/neptune/internal/backends/neptune_backend.py +++ b/src/neptune/internal/backends/neptune_backend.py @@ -42,7 +42,6 @@ LeaderboardEntry, NextPage, QueryFieldDefinitionsResult, - QueryFieldsResult, StringField, StringSeriesField, StringSeriesValues, @@ -347,12 +346,3 @@ def query_fields_definitions_within_project( experiment_ids_filter: Optional[List[str]] = None, next_page: Optional[NextPage] = None, ) -> QueryFieldDefinitionsResult: ... - - @abc.abstractmethod - def query_fields_within_project( - self, - project_id: QualifiedName, - field_names_filter: Optional[List[str]] = None, - experiment_ids_filter: Optional[List[str]] = None, - next_page: Optional[NextPage] = None, - ) -> QueryFieldsResult: ... diff --git a/src/neptune/internal/backends/neptune_backend_mock.py b/src/neptune/internal/backends/neptune_backend_mock.py index 4aa049006..b3b0c735f 100644 --- a/src/neptune/internal/backends/neptune_backend_mock.py +++ b/src/neptune/internal/backends/neptune_backend_mock.py @@ -52,7 +52,6 @@ LeaderboardEntry, NextPage, QueryFieldDefinitionsResult, - QueryFieldsResult, StringField, StringPointValue, StringSeriesField, @@ -819,15 +818,3 @@ def query_fields_definitions_within_project( entries=[], next_page=NextPage(next_page_token=None, limit=0), ) - - def query_fields_within_project( - self, - project_id: QualifiedName, - field_names_filter: Optional[List[str]] = None, - experiment_ids_filter: Optional[List[str]] = None, - next_page: Optional[NextPage] = None, - ) -> QueryFieldsResult: - return QueryFieldsResult( - entries=[], - next_page=NextPage(next_page_token=None, limit=0), - ) diff --git a/src/neptune/internal/backends/nql.py b/src/neptune/internal/backends/nql.py index 7719679cc..9c9e9860d 100644 --- a/src/neptune/internal/backends/nql.py +++ b/src/neptune/internal/backends/nql.py @@ -76,6 +76,7 @@ class NQLAttributeOperator(str, Enum): CONTAINS = "CONTAINS" GREATER_THAN = ">" LESS_THAN = "<" + MATCHES = "MATCHES" class NQLAttributeType(str, Enum): diff --git a/src/neptune/internal/backends/offline_neptune_backend.py b/src/neptune/internal/backends/offline_neptune_backend.py index bb3f9b40a..c06ae0aac 100644 --- a/src/neptune/internal/backends/offline_neptune_backend.py +++ b/src/neptune/internal/backends/offline_neptune_backend.py @@ -38,7 +38,6 @@ LeaderboardEntry, NextPage, QueryFieldDefinitionsResult, - QueryFieldsResult, StringField, StringSeriesField, StringSeriesValues, @@ -186,12 +185,3 @@ def query_fields_definitions_within_project( next_page: Optional[NextPage] = None, ) -> QueryFieldDefinitionsResult: raise NeptuneOfflineModeFetchException - - def query_fields_within_project( - self, - project_id: QualifiedName, - field_names_filter: Optional[List[str]] = None, - experiment_ids_filter: Optional[List[str]] = None, - next_page: Optional[NextPage] = None, - ) -> QueryFieldsResult: - raise NeptuneOfflineModeFetchException