Skip to content

Commit

Permalink
force to string output (#7239)
Browse files Browse the repository at this point in the history
  • Loading branch information
zpcore committed Jun 11, 2024
1 parent 258f9a7 commit 0255964
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion benchmarks/result_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def get_calculated_metrics(self, d, dataline):
return d

# TODO: handle error message properly (database length restriction)
# Do not use bool. This will mess up with the bigquery parsing.
def extract_metrics_jsonl(self, file):
with open(file, mode="r", encoding="utf-8") as f:
jsonlines = f.read().splitlines()
Expand All @@ -122,7 +123,8 @@ def extract_metrics_jsonl(self, file):
torch_xla2_value = "None" if torch_xla2 is None else torch_xla2
keep_model_data_on_cuda = dataline["experiment"][
"keep_model_data_on_cuda"]
keep_model_data_on_cuda_value = "None" if keep_model_data_on_cuda is None else keep_model_data_on_cuda
keep_model_data_on_cuda_value = "None" if keep_model_data_on_cuda is None else str(
keep_model_data_on_cuda)
test = dataline["experiment"]["test"]
test_value = "None" if test is None else test
outputs_file = dataline["experiment"].get("outputs_file", None)
Expand Down

0 comments on commit 0255964

Please sign in to comment.