Skip to content

Commit

Permalink
cap the number of executions and artifacts
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 576305908
  • Loading branch information
ml-metadata-team authored and tfx-copybara committed Oct 24, 2023
1 parent 243b4be commit 6a5199f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ml_metadata/metadata_store/metadata_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ def put_execution(
reuse_context_if_already_exist: bool = False,
reuse_artifact_if_already_exist_by_external_id: bool = False,
force_reuse_context: bool = False,
force_update_time: bool = False,
extra_options: Optional[ExtraOptions] = None,
) -> Tuple[int, List[int], List[int]]:
"""Inserts or updates an Execution with artifacts, events and contexts.
Expand Down Expand Up @@ -678,6 +679,8 @@ def put_execution(
force_reuse_context: If True, for contexts with a context.id, the stored
context will NOT be updated. For such contexts, we will only look at
the context.id to associate the context with the execution.
force_update_time: If it is true, `last_update_time_since_epoch` is
updated even if input execution is the same as stored execution.
extra_options: ExtraOptions instance.
Returns:
Expand All @@ -696,8 +699,11 @@ def put_execution(
contexts=contexts,
options=metadata_store_service_pb2.PutExecutionRequest.Options(
reuse_context_if_already_exist=reuse_context_if_already_exist,
reuse_artifact_if_already_exist_by_external_id=reuse_artifact_if_already_exist_by_external_id,
reuse_artifact_if_already_exist_by_external_id=(
reuse_artifact_if_already_exist_by_external_id
),
force_reuse_context=force_reuse_context,
force_update_time=force_update_time,
),
)
# Add artifact_and_event pairs to the request.
Expand Down

0 comments on commit 6a5199f

Please sign in to comment.