File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1156,14 +1156,17 @@ def _add_default_column(
11561156 ) -> Tuple [Dict [str , any ], pd .DataFrame ]:
11571157 """Adds the default column specified by ``column_name`` to the dataset config
11581158 and dataframe."""
1159+ df = df .copy ()
11591160 if column_name == "timestampColumnName" :
11601161 timestamp_column_name = f"timestamp_{ str (uuid .uuid1 ())[:8 ]} "
11611162 config ["timestampColumnName" ] = timestamp_column_name
1162- df [ timestamp_column_name ] = int (time .time ())
1163+ df . loc [:, timestamp_column_name ] = int (time .time ())
11631164 elif column_name == "inferenceIdColumnName" :
11641165 inference_id_column_name = f"inference_id_{ str (uuid .uuid1 ())[:8 ]} "
11651166 config ["inferenceIdColumnName" ] = inference_id_column_name
1166- df [inference_id_column_name ] = [str (uuid .uuid1 ()) for _ in range (len (df ))]
1167+ df .loc [:, inference_id_column_name ] = [
1168+ str (uuid .uuid1 ()) for _ in range (len (df ))
1169+ ]
11671170 return config , df
11681171
11691172 def publish_ground_truths (
You can’t perform that action at this time.
0 commit comments