class_docstr: Parameters
  ----------
  trials_completed: int
     Number of completed trials
  best_trials_id: int
     Unique identifier of the :class:`orion.core.worker.trial.Trial` object in the database
     which achieved the best known objective result.
  best_evaluation: float
     Evaluation score of the best trial
  start_time: `datetime.datetime`
     When Experiment was first dispatched and started running.
  finish_time: `datetime.datetime`
     When Experiment reached terminating condition and stopped running.
  elapsed_time: `datetime.timedelta`
     Elapsed time.
  max_trials: int
      Experiment max_trials
  nb_trials: int
      Number of trials in experiment
  progress: float
      Experiment progression (between 0 and 1).
  trial_status_count: Dict[str, int]
      Dictionary mapping trial status to number of trials that have this status
  sum_of_trials_time: `datetime.timedelta`
      Sum of trial duration
  eta: `datetime.timedelta`
      Estimated remaining time
  eta_milliseconds: float
      ETA in milliseconds (used to get ETA in other programming languages, e.g. Javascript)
class_docstr_tok: ["Parameters","--","--","--","--","--","trials_completed",":","int","Number","of","completed","trials","best_trials_id",":","int","Unique","identifier","of","the",":","class",":","`","orion.core.worker.trial.Trial","`","object","in","the","database","which","achieved","the","best","known","objective","result",".","best_evaluation",":","float","Evaluation","score","of","the","best","trial","start_time",":","`","datetime.datetime","`","When","Experiment","was","first","dispatched","and","started","running",".","finish_time",":","`","datetime.datetime","`","When","Experiment","reached","terminating","condition","and","stopped","running",".","elapsed_time",":","`","datetime.timedelta","`","Elapsed","time",".","max_trials",":","int","Experiment","max_trials","nb_trials",":","int","Number","of","trials","in","experiment","progress",":","float","Experiment","progression","(","between","0","and","1",")",".","trial_status_count",":","Dict","[","str",",","int","]","Dictionary","mapping","trial","status","to","number","of","trials","that","have","this","status","sum_of_trials_time",":","`","datetime.timedelta","`","Sum","of","trial","duration","eta",":","`","datetime.timedelta","`","Estimated","remaining","time","eta_milliseconds",":","float","ETA","in","milliseconds","(","used","to","get","ETA","in","other","programming","languages",",","e.g",".","Javascript",")"]
docstr: Return a JSON-compatible dictionary of stats.
docstr_tok: ["Return","a","JSON-compatible","dictionary","of","stats","."]
code: def to_json(self):
      """Return a JSON-compatible dictionary of stats."""
      return {
          key: (
              str(value)
              if isinstance(
                  value, (datetime.datetime, datetime.timedelta)
              )
              else value
          )
          for key, value in dataclasses.asdict(self).items()
      }
  
imports: from __future__ import annotations
  import contextlib
  import copy
  import dataclasses
  import datetime
  import inspect
  import logging
  import math
  import typing
  from collections import Counter
  from dataclasses import dataclass, field
  from typing import Generator, Generic, Literal, TypeVar
  import pandas
  from orion.algo.base import BaseAlgorithm
  from orion.algo.space import Space
  from orion.core.evc.adapters import BaseAdapter
  from orion.core.evc.experiment import ExperimentNode
  from orion.core.io.database import DuplicateKeyError
  from orion.core.utils.exceptions import UnsupportedOperation
  from orion.core.utils.flatten import flatten
  from orion.core.worker.experiment_config import ExperimentConfig
  from orion.storage.base import BaseStorageProtocol, FailedUpdate
label_desc: Use image node_id 1 for calling the ExperimentStats obj's underlying member method code with example usage: obj.to_json() and returns: unknown