@@ -44,7 +44,7 @@ def create_transcribed_shard_manifests(prediction_filepaths: List[str], prefix)
4444 for prediction_filepath in prediction_filepaths :
4545 max_shard_id = 0
4646 shard_data = {}
47- full_path = os .path .join (prediction_filepath , "predictions_all .json" )
47+ full_path = os .path .join (prediction_filepath , f" { prefix } _predictions_all .json" )
4848 with open (full_path , 'r' ) as f :
4949 for line in f .readlines ():
5050 data_entry = json .loads (line )
@@ -90,7 +90,7 @@ def create_transcribed_manifests(prediction_filepaths: List[str], prefix) -> Lis
9090 """
9191 all_manifest_filepaths = []
9292 for prediction_filepath in prediction_filepaths :
93- prediction_name = os .path .join (prediction_filepath , "predictions_all .json" )
93+ prediction_name = os .path .join (prediction_filepath , f" { prefix } _predictions_all .json" )
9494 transcripted_name = os .path .join (prediction_filepath , f"{ prefix } _transcribed_manifest.json" )
9595
9696 # Open and read the original predictions_all.json file
@@ -129,7 +129,7 @@ def write_sampled_shard_transcriptions(manifest_filepaths: List[str], prefix) ->
129129 for prediction_filepath in manifest_filepaths :
130130 predicted_shard_data = {}
131131 # Collect entries from prediction files based on shard id
132- prediction_path = os .path .join (prediction_filepath , "predictions_all .json" )
132+ prediction_path = os .path .join (prediction_filepath , f" { prefix } _predictions_all .json" )
133133 with open (prediction_path , 'r' ) as f :
134134 for line in f :
135135 data_entry = json .loads (line )
@@ -190,7 +190,7 @@ def write_sampled_transcriptions(manifest_filepaths: List[str], prefix) -> List[
190190 all_manifest_filepaths = []
191191 for prediction_filepath in manifest_filepaths :
192192 predicted_data = {}
193- prediction_path = os .path .join (prediction_filepath , "predictions_all .json" )
193+ prediction_path = os .path .join (prediction_filepath , f" { prefix } _predictions_all .json" )
194194 with open (prediction_path , 'r' ) as f :
195195 for line in f :
196196 data_entry = json .loads (line )
0 commit comments