@@ -1984,6 +1984,9 @@ def publish_batch_data(
19841984 "Make sure to fix all of the issues listed above before the upload." ,
19851985 ) from None
19861986
1987+ # Check if batch of data contains ground truths
1988+ contains_ground_truths = self ._contains_ground_truths (batch_config = batch_data )
1989+
19871990 # Load dataset config and augment with defaults
19881991 batch_data = DatasetSchema ().load (
19891992 {"task_type" : task_type .value , ** batch_config }
@@ -1999,15 +2002,13 @@ def publish_batch_data(
19992002 # Get min and max timestamps
20002003 earliest_timestamp = batch_df [batch_data ["timestampColumnName" ]].min ()
20012004 latest_timestamp = batch_df [batch_data ["timestampColumnName" ]].max ()
2002- # Check if batch of data contains ground truths
2003- contains_ground_truths = self ._contains_ground_truths (batch_config = batch_data )
20042005
20052006 with tempfile .TemporaryDirectory () as tmp_dir :
20062007 # Copy save files to tmp dir
20072008 batch_df .to_csv (f"{ tmp_dir } /dataset.csv" , index = False )
20082009 payload = {
2009- "earliestTimestamp" : earliest_timestamp ,
2010- "latestTimestamp" : latest_timestamp ,
2010+ "earliestTimestamp" : int ( earliest_timestamp ) ,
2011+ "latestTimestamp" : int ( latest_timestamp ) ,
20112012 "performGroundTruthMerge" : not contains_ground_truths ,
20122013 ** batch_data ,
20132014 }
0 commit comments