Skip to content

Commit 00fe686

Browse files
authored
Merge pull request #60 from neptune-ai/mp/fetch-metric-previews
feat: Add fields related to metric previews
2 parents 47a5545 + c30891f commit 00fe686

File tree

12 files changed

+102
-12
lines changed

12 files changed

+102
-12
lines changed

src/neptune_api/proto/neptune_pb/ingest/v1/ingest_pb2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
_sym_db = _symbol_database.Default()
77
from ....google_rpc import code_pb2 as google__rpc_dot_code__pb2
88
from ....neptune_pb.ingest.v1 import common_pb2 as neptune__pb_dot_ingest_dot_v1_dot_common__pb2
9-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!neptune_pb/ingest/v1/ingest.proto\x12\x11neptune.ingest.v1\x1a\x15google_rpc/code.proto\x1a!neptune_pb/ingest/v1/common.proto"0\n\x0cBatchContext\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x0f\n\x07api_key\x18\x02 \x01(\x0c"V\n\tUpdateRun\x12A\n\x10update_snapshots\x18\x08 \x01(\x0b2%.neptune.ingest.v1.UpdateRunSnapshotsH\x00B\x06\n\x04mode"\xb8\x02\n\x16BatchProjectOperations\x120\n\x07context\x18\x01 \x01(\x0b2\x1f.neptune.ingest.v1.BatchContext\x12\x1e\n\x16create_missing_project\x18\x03 \x01(\x08\x12+\n\x0bcreate_runs\x18\x04 \x03(\x0b2\x16.neptune.ingest.v1.Run\x12N\n\x0bupdate_runs\x18\x08 \x03(\x0b29.neptune.ingest.v1.BatchProjectOperations.UpdateRunsEntry\x1aO\n\x0fUpdateRunsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b2\x1c.neptune.ingest.v1.UpdateRun:\x028\x01"z\n\x0eCreateRunError\x12#\n\tgrpc_code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x122\n\x0bingest_code\x18\x03 \x01(\x0e2\x1d.neptune.ingest.v1.IngestCode\x12\x0f\n\x07message\x18\x02 \x01(\t"t\n\x0fCreateRunResult\x12%\n\x03run\x18\x01 \x01(\x0b2\x16.neptune.ingest.v1.RunH\x00\x122\n\x05error\x18\x02 \x01(\x0b2!.neptune.ingest.v1.CreateRunErrorH\x00B\x06\n\x04type"\xb4\x03\n\rResultSummary\x12\x1e\n\x16total_operations_count\x18\x01 \x01(\x03\x12\x18\n\x10successful_count\x18\x02 \x01(\x03\x12\x14\n\x0cfailed_count\x18\x03 \x01(\x03\x12V\n\x13failed_by_grpc_code\x18\x04 \x03(\x0b29.neptune.ingest.v1.ResultSummary.FailedByGRPCCodeCounters\x12R\n\x15failed_by_ingest_code\x18\x05 \x03(\x0b23.neptune.ingest.v1.ResultSummary.IngestCodeCounters\x1aN\n\x18FailedByGRPCCodeCounters\x12#\n\tgrpc_code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x12\r\n\x05count\x18\x02 \x01(\x03\x1aW\n\x12IngestCodeCounters\x122\n\x0bingest_code\x18\x01 \x01(\x0e2\x1d.neptune.ingest.v1.IngestCode\x12\r\n\x05count\x18\x02 \x01(\x03"\x89\x01\n\x0eUpdateRunError\x12#\n\tgrpc_code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x122\n\x0bingest_code\x18\x02 \x01(\x0e2\x1d.neptune.ingest.v1.IngestCode\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\r\n\x05field\x18\x04 \x01(\t"\x8a\x01\n\x10UpdateRunResults\x12<\n\x12operations_summary\x18\x01 \x01(\x0b2 .neptune.ingest.v1.ResultSummary\x128\n\rupdate_errors\x18\x02 \x03(\x0b2!.neptune.ingest.v1.UpdateRunError"\xb6\x03\n\x0bBatchResult\x12#\n\tgrpc_code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x122\n\x0bingest_code\x18\t \x01(\x0e2\x1d.neptune.ingest.v1.IngestCode\x12<\n\x12operations_summary\x18\x02 \x01(\x0b2 .neptune.ingest.v1.ResultSummary\x12\x0f\n\x07project\x18\x05 \x01(\t\x12>\n\x12create_run_results\x18\x06 \x03(\x0b2".neptune.ingest.v1.CreateRunResult\x12P\n\x12update_run_results\x18\x07 \x03(\x0b24.neptune.ingest.v1.BatchResult.UpdateRunResultsEntry\x12\x0f\n\x07message\x18\x08 \x01(\t\x1a\\\n\x15UpdateRunResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x122\n\x05value\x18\x02 \x01(\x0b2#.neptune.ingest.v1.UpdateRunResults:\x028\x01"K\n\rIngestRequest\x12:\n\x07batches\x18\x01 \x03(\x0b2).neptune.ingest.v1.BatchProjectOperations"\x91\x01\n\x0eIngestResponse\x121\n\x07summary\x18\x02 \x01(\x0b2 .neptune.ingest.v1.ResultSummary\x12\x15\n\rerror_message\x18\x04 \x01(\t\x125\n\rbatch_results\x18\x05 \x03(\x0b2\x1e.neptune.ingest.v1.BatchResult*\xa1\x05\n\nIngestCode\x12\x06\n\x02OK\x10\x00\x12!\n\x1dBATCH_CONTAINS_DEPENDENT_RUNS\x10\x04\x12\x15\n\x11PROJECT_NOT_FOUND\x10\x08\x12\x18\n\x14PROJECT_INVALID_NAME\x10\t\x12\x11\n\rRUN_NOT_FOUND\x10\n\x12\x11\n\rRUN_DUPLICATE\x10\x0b\x12\x13\n\x0fRUN_CONFLICTING\x10\x0c\x12\x1d\n\x19RUN_FORK_PARENT_NOT_FOUND\x10\r\x12#\n\x1fRUN_INVALID_CREATION_PARAMETERS\x10\x0e\x12!\n\x1dFIELD_PATH_EXCEEDS_SIZE_LIMIT\x10\x10\x12\x14\n\x10FIELD_PATH_EMPTY\x10\x11\x12\x16\n\x12FIELD_PATH_INVALID\x10\x12\x12\x1b\n\x17FIELD_PATH_NON_WRITABLE\x10\x13\x12\x1a\n\x16FIELD_TYPE_UNSUPPORTED\x10\x14\x12\x1a\n\x16FIELD_TYPE_CONFLICTING\x10\x15\x12\x1a\n\x16SERIES_POINT_DUPLICATE\x10\x18\x12\x1e\n\x1aSERIES_STEP_NON_INCREASING\x10\x19\x12$\n SERIES_STEP_NOT_AFTER_FORK_POINT\x10\x1a\x12\x1f\n\x1bSERIES_TIMESTAMP_DECREASING\x10\x1b\x12#\n\x1fFLOAT_VALUE_NAN_INF_UNSUPPORTED\x10 \x12#\n\x1fSTRING_VALUE_EXCEEDS_SIZE_LIMIT\x10$\x12!\n\x1dSTRING_SET_EXCEEDS_SIZE_LIMIT\x10%\x12\x14\n\x10INGEST_SUSPENDED\x10?\x12\x0c\n\x08INTERNAL\x10@B5\n$ml.neptune.leaderboard.api.ingest.v1B\x0bIngestProtoP\x01b\x06proto3')
9+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!neptune_pb/ingest/v1/ingest.proto\x12\x11neptune.ingest.v1\x1a\x15google_rpc/code.proto\x1a!neptune_pb/ingest/v1/common.proto"0\n\x0cBatchContext\x12\x0f\n\x07project\x18\x01 \x01(\t\x12\x0f\n\x07api_key\x18\x02 \x01(\x0c"V\n\tUpdateRun\x12A\n\x10update_snapshots\x18\x08 \x01(\x0b2%.neptune.ingest.v1.UpdateRunSnapshotsH\x00B\x06\n\x04mode"\xb8\x02\n\x16BatchProjectOperations\x120\n\x07context\x18\x01 \x01(\x0b2\x1f.neptune.ingest.v1.BatchContext\x12\x1e\n\x16create_missing_project\x18\x03 \x01(\x08\x12+\n\x0bcreate_runs\x18\x04 \x03(\x0b2\x16.neptune.ingest.v1.Run\x12N\n\x0bupdate_runs\x18\x08 \x03(\x0b29.neptune.ingest.v1.BatchProjectOperations.UpdateRunsEntry\x1aO\n\x0fUpdateRunsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b2\x1c.neptune.ingest.v1.UpdateRun:\x028\x01"z\n\x0eCreateRunError\x12#\n\tgrpc_code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x122\n\x0bingest_code\x18\x03 \x01(\x0e2\x1d.neptune.ingest.v1.IngestCode\x12\x0f\n\x07message\x18\x02 \x01(\t"t\n\x0fCreateRunResult\x12%\n\x03run\x18\x01 \x01(\x0b2\x16.neptune.ingest.v1.RunH\x00\x122\n\x05error\x18\x02 \x01(\x0b2!.neptune.ingest.v1.CreateRunErrorH\x00B\x06\n\x04type"\xb4\x03\n\rResultSummary\x12\x1e\n\x16total_operations_count\x18\x01 \x01(\x03\x12\x18\n\x10successful_count\x18\x02 \x01(\x03\x12\x14\n\x0cfailed_count\x18\x03 \x01(\x03\x12V\n\x13failed_by_grpc_code\x18\x04 \x03(\x0b29.neptune.ingest.v1.ResultSummary.FailedByGRPCCodeCounters\x12R\n\x15failed_by_ingest_code\x18\x05 \x03(\x0b23.neptune.ingest.v1.ResultSummary.IngestCodeCounters\x1aN\n\x18FailedByGRPCCodeCounters\x12#\n\tgrpc_code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x12\r\n\x05count\x18\x02 \x01(\x03\x1aW\n\x12IngestCodeCounters\x122\n\x0bingest_code\x18\x01 \x01(\x0e2\x1d.neptune.ingest.v1.IngestCode\x12\r\n\x05count\x18\x02 \x01(\x03"\x89\x01\n\x0eUpdateRunError\x12#\n\tgrpc_code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x122\n\x0bingest_code\x18\x02 \x01(\x0e2\x1d.neptune.ingest.v1.IngestCode\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\r\n\x05field\x18\x04 \x01(\t"\x8a\x01\n\x10UpdateRunResults\x12<\n\x12operations_summary\x18\x01 \x01(\x0b2 .neptune.ingest.v1.ResultSummary\x128\n\rupdate_errors\x18\x02 \x03(\x0b2!.neptune.ingest.v1.UpdateRunError"\xb6\x03\n\x0bBatchResult\x12#\n\tgrpc_code\x18\x01 \x01(\x0e2\x10.google_rpc.Code\x122\n\x0bingest_code\x18\t \x01(\x0e2\x1d.neptune.ingest.v1.IngestCode\x12<\n\x12operations_summary\x18\x02 \x01(\x0b2 .neptune.ingest.v1.ResultSummary\x12\x0f\n\x07project\x18\x05 \x01(\t\x12>\n\x12create_run_results\x18\x06 \x03(\x0b2".neptune.ingest.v1.CreateRunResult\x12P\n\x12update_run_results\x18\x07 \x03(\x0b24.neptune.ingest.v1.BatchResult.UpdateRunResultsEntry\x12\x0f\n\x07message\x18\x08 \x01(\t\x1a\\\n\x15UpdateRunResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x122\n\x05value\x18\x02 \x01(\x0b2#.neptune.ingest.v1.UpdateRunResults:\x028\x01"K\n\rIngestRequest\x12:\n\x07batches\x18\x01 \x03(\x0b2).neptune.ingest.v1.BatchProjectOperations"\x91\x01\n\x0eIngestResponse\x121\n\x07summary\x18\x02 \x01(\x0b2 .neptune.ingest.v1.ResultSummary\x12\x15\n\rerror_message\x18\x04 \x01(\t\x125\n\rbatch_results\x18\x05 \x03(\x0b2\x1e.neptune.ingest.v1.BatchResult*\x8c\x06\n\nIngestCode\x12\x06\n\x02OK\x10\x00\x12!\n\x1dBATCH_CONTAINS_DEPENDENT_RUNS\x10\x04\x12\x15\n\x11PROJECT_NOT_FOUND\x10\x08\x12\x18\n\x14PROJECT_INVALID_NAME\x10\t\x12\x11\n\rRUN_NOT_FOUND\x10\n\x12\x11\n\rRUN_DUPLICATE\x10\x0b\x12\x13\n\x0fRUN_CONFLICTING\x10\x0c\x12\x1d\n\x19RUN_FORK_PARENT_NOT_FOUND\x10\r\x12#\n\x1fRUN_INVALID_CREATION_PARAMETERS\x10\x0e\x12!\n\x1dFIELD_PATH_EXCEEDS_SIZE_LIMIT\x10\x10\x12\x14\n\x10FIELD_PATH_EMPTY\x10\x11\x12\x16\n\x12FIELD_PATH_INVALID\x10\x12\x12\x1b\n\x17FIELD_PATH_NON_WRITABLE\x10\x13\x12\x1a\n\x16FIELD_TYPE_UNSUPPORTED\x10\x14\x12\x1a\n\x16FIELD_TYPE_CONFLICTING\x10\x15\x12\x1a\n\x16SERIES_POINT_DUPLICATE\x10\x18\x12\x19\n\x15SERIES_STEP_TOO_LARGE\x10(\x12\x17\n\x13SERIES_STEP_INVALID\x10)\x125\n1SERIES_PREVIEW_STEP_NOT_AFTER_LAST_COMMITTED_STEP\x10*\x12\x1e\n\x1aSERIES_STEP_NON_INCREASING\x10\x19\x12$\n SERIES_STEP_NOT_AFTER_FORK_POINT\x10\x1a\x12\x1f\n\x1bSERIES_TIMESTAMP_DECREASING\x10\x1b\x12#\n\x1fFLOAT_VALUE_NAN_INF_UNSUPPORTED\x10 \x12#\n\x1fSTRING_VALUE_EXCEEDS_SIZE_LIMIT\x10$\x12!\n\x1dSTRING_SET_EXCEEDS_SIZE_LIMIT\x10%\x12\x14\n\x10INGEST_SUSPENDED\x10?\x12\x0c\n\x08INTERNAL\x10@B5\n$ml.neptune.leaderboard.api.ingest.v1B\x0bIngestProtoP\x01b\x06proto3')
1010
_globals = globals()
1111
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
1212
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'neptune_pb.ingest.v1.ingest_pb2', _globals)
@@ -18,7 +18,7 @@
1818
_globals['_BATCHRESULT_UPDATERUNRESULTSENTRY']._options = None
1919
_globals['_BATCHRESULT_UPDATERUNRESULTSENTRY']._serialized_options = b'8\x01'
2020
_globals['_INGESTCODE']._serialized_start = 2196
21-
_globals['_INGESTCODE']._serialized_end = 2869
21+
_globals['_INGESTCODE']._serialized_end = 2976
2222
_globals['_BATCHCONTEXT']._serialized_start = 114
2323
_globals['_BATCHCONTEXT']._serialized_end = 162
2424
_globals['_UPDATERUN']._serialized_start = 164

src/neptune_api/proto/neptune_pb/ingest/v1/ingest_pb2.pyi

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class _IngestCodeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._Enu
5656
'Field type is different from the one that was previously logged for this series.\n Once a field type is set, it cannot be changed.\n '
5757
SERIES_POINT_DUPLICATE: _IngestCode.ValueType
5858
'Idempotency Warning: The exact same data point was already logged for this series.'
59+
SERIES_STEP_TOO_LARGE: _IngestCode.ValueType
60+
'Step value must be smaller than: `1_000_000_000_000`.'
61+
SERIES_STEP_INVALID: _IngestCode.ValueType
62+
'Invalid step value. Step `micro` part must be smaller than `1_000_000`.'
63+
SERIES_PREVIEW_STEP_NOT_AFTER_LAST_COMMITTED_STEP: _IngestCode.ValueType
64+
'Series preview step not after last committed step.'
5965
SERIES_STEP_NON_INCREASING: _IngestCode.ValueType
6066
"The step of a series value is lesser than the most recently logged step for this series or the step is exactly the\n same, but the value is different (DUPLICATE_DATA_POINT doesn't apply).\n "
6167
SERIES_STEP_NOT_AFTER_FORK_POINT: _IngestCode.ValueType
@@ -107,6 +113,12 @@ FIELD_TYPE_CONFLICTING: IngestCode.ValueType
107113
'Field type is different from the one that was previously logged for this series.\nOnce a field type is set, it cannot be changed.\n'
108114
SERIES_POINT_DUPLICATE: IngestCode.ValueType
109115
'Idempotency Warning: The exact same data point was already logged for this series.'
116+
SERIES_STEP_TOO_LARGE: IngestCode.ValueType
117+
'Step value must be smaller than: `1_000_000_000_000`.'
118+
SERIES_STEP_INVALID: IngestCode.ValueType
119+
'Invalid step value. Step `micro` part must be smaller than `1_000_000`.'
120+
SERIES_PREVIEW_STEP_NOT_AFTER_LAST_COMMITTED_STEP: IngestCode.ValueType
121+
'Series preview step not after last committed step.'
110122
SERIES_STEP_NON_INCREASING: IngestCode.ValueType
111123
"The step of a series value is lesser than the most recently logged step for this series or the step is exactly the\nsame, but the value is different (DUPLICATE_DATA_POINT doesn't apply).\n"
112124
SERIES_STEP_NOT_AFTER_FORK_POINT: IngestCode.ValueType

src/neptune_retrieval_api/api/default/get_float_series_values.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def _get_kwargs(
4242
*,
4343
attribute: str,
4444
experiment_id: Union[Unset, str] = UNSET,
45+
include_preview: Union[Unset, bool] = False,
4546
limit: Union[Unset, int] = UNSET,
4647
lineage: Union[Unset, GetFloatSeriesValuesLineage] = UNSET,
4748
skip_to_step: Union[Unset, float] = UNSET,
@@ -52,6 +53,8 @@ def _get_kwargs(
5253

5354
params["experimentId"] = experiment_id
5455

56+
params["includePreview"] = include_preview
57+
5558
params["limit"] = limit
5659

5760
json_lineage: Union[Unset, str] = UNSET
@@ -126,6 +129,7 @@ def sync_detailed(
126129
client: Union[AuthenticatedClient, Client],
127130
attribute: str,
128131
experiment_id: Union[Unset, str] = UNSET,
132+
include_preview: Union[Unset, bool] = False,
129133
limit: Union[Unset, int] = UNSET,
130134
lineage: Union[Unset, GetFloatSeriesValuesLineage] = UNSET,
131135
skip_to_step: Union[Unset, float] = UNSET,
@@ -135,6 +139,7 @@ def sync_detailed(
135139
Args:
136140
attribute (str):
137141
experiment_id (Union[Unset, str]):
142+
include_preview (Union[Unset, bool]): Default: False.
138143
limit (Union[Unset, int]):
139144
lineage (Union[Unset, GetFloatSeriesValuesLineage]):
140145
skip_to_step (Union[Unset, float]):
@@ -150,6 +155,7 @@ def sync_detailed(
150155
kwargs = _get_kwargs(
151156
attribute=attribute,
152157
experiment_id=experiment_id,
158+
include_preview=include_preview,
153159
limit=limit,
154160
lineage=lineage,
155161
skip_to_step=skip_to_step,
@@ -167,6 +173,7 @@ def sync(
167173
client: Union[AuthenticatedClient, Client],
168174
attribute: str,
169175
experiment_id: Union[Unset, str] = UNSET,
176+
include_preview: Union[Unset, bool] = False,
170177
limit: Union[Unset, int] = UNSET,
171178
lineage: Union[Unset, GetFloatSeriesValuesLineage] = UNSET,
172179
skip_to_step: Union[Unset, float] = UNSET,
@@ -176,6 +183,7 @@ def sync(
176183
Args:
177184
attribute (str):
178185
experiment_id (Union[Unset, str]):
186+
include_preview (Union[Unset, bool]): Default: False.
179187
limit (Union[Unset, int]):
180188
lineage (Union[Unset, GetFloatSeriesValuesLineage]):
181189
skip_to_step (Union[Unset, float]):
@@ -192,6 +200,7 @@ def sync(
192200
client=client,
193201
attribute=attribute,
194202
experiment_id=experiment_id,
203+
include_preview=include_preview,
195204
limit=limit,
196205
lineage=lineage,
197206
skip_to_step=skip_to_step,
@@ -203,6 +212,7 @@ async def asyncio_detailed(
203212
client: Union[AuthenticatedClient, Client],
204213
attribute: str,
205214
experiment_id: Union[Unset, str] = UNSET,
215+
include_preview: Union[Unset, bool] = False,
206216
limit: Union[Unset, int] = UNSET,
207217
lineage: Union[Unset, GetFloatSeriesValuesLineage] = UNSET,
208218
skip_to_step: Union[Unset, float] = UNSET,
@@ -212,6 +222,7 @@ async def asyncio_detailed(
212222
Args:
213223
attribute (str):
214224
experiment_id (Union[Unset, str]):
225+
include_preview (Union[Unset, bool]): Default: False.
215226
limit (Union[Unset, int]):
216227
lineage (Union[Unset, GetFloatSeriesValuesLineage]):
217228
skip_to_step (Union[Unset, float]):
@@ -227,6 +238,7 @@ async def asyncio_detailed(
227238
kwargs = _get_kwargs(
228239
attribute=attribute,
229240
experiment_id=experiment_id,
241+
include_preview=include_preview,
230242
limit=limit,
231243
lineage=lineage,
232244
skip_to_step=skip_to_step,
@@ -242,6 +254,7 @@ async def asyncio(
242254
client: Union[AuthenticatedClient, Client],
243255
attribute: str,
244256
experiment_id: Union[Unset, str] = UNSET,
257+
include_preview: Union[Unset, bool] = False,
245258
limit: Union[Unset, int] = UNSET,
246259
lineage: Union[Unset, GetFloatSeriesValuesLineage] = UNSET,
247260
skip_to_step: Union[Unset, float] = UNSET,
@@ -251,6 +264,7 @@ async def asyncio(
251264
Args:
252265
attribute (str):
253266
experiment_id (Union[Unset, str]):
267+
include_preview (Union[Unset, bool]): Default: False.
254268
limit (Union[Unset, int]):
255269
lineage (Union[Unset, GetFloatSeriesValuesLineage]):
256270
skip_to_step (Union[Unset, float]):
@@ -268,6 +282,7 @@ async def asyncio(
268282
client=client,
269283
attribute=attribute,
270284
experiment_id=experiment_id,
285+
include_preview=include_preview,
271286
limit=limit,
272287
lineage=lineage,
273288
skip_to_step=skip_to_step,

0 commit comments

Comments
 (0)