Skip to content

Commit

Permalink
remove unnecessary overwrite arg
Browse files Browse the repository at this point in the history
  • Loading branch information
brimoor committed Sep 17, 2024
1 parent a81382b commit 685fbf0
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions fiftyone/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,6 @@ def create_summary_field(
group_by=None,
read_only=True,
create_index=True,
overwrite=True,
):
"""Populates a sample-level field that records the unique values or
numeric ranges that appear in the specified field on each sample in
Expand Down Expand Up @@ -1729,8 +1728,6 @@ def create_summary_field(
read_only (True): whether to mark the summary field as read-only
create_index (True): whether to create database index(es) for the
summary field
overwrite (True): whether to overwrite any existing summary field
with the same name
Returns:
the summary field name
Expand Down Expand Up @@ -1777,13 +1774,6 @@ def create_summary_field(

field_name = "_".join(chunks)

field = self.get_field(field_name)
if field is not None:
if overwrite and _SUMMARY_FIELD_KEY in field.info:
self.delete_summary_field(field_name)
else:
raise ValueError(f"Field '{field_name}' already exists")

index_fields = []
summary_info = {"path": path, "field_type": field_type}
if field_type == "categorical":
Expand Down

0 comments on commit 685fbf0

Please sign in to comment.