Open steffencruz opened 1 year ago
This fixes it.
import json
# Store the original json.loads
original_json_loads = json.loads
def relaxed_json_loads(s, *args, **kwargs):
kwargs.pop("strict", None) # remove the strict argument if it exists
return original_json_loads(s, strict=False, *args, **kwargs)
# Patch the library's json.loads
json.loads = relaxed_json_loads
This way we can keep the original data and it won't throw the error and we can still pull all runs.
This appears to happen when the run summary metrics contains characters that are not JSON decodable. An example substring is
We should sanitize completions and prompts to ensure that there are no characters of this type and add unit tests