trinity.utils.monitor module#
Monitor
- trinity.utils.monitor.gather_metrics(metric_list: List[Dict], prefix: str, output_stats: List[str] = ['mean', 'max', 'min']) Dict[源代码]#
- trinity.utils.monitor.gather_eval_metrics(metric_list: List[Dict], prefix: str, output_stats: List[str] = ['mean', 'max', 'min', 'std'], detailed_stats: bool = False) Dict[源代码]#
- class trinity.utils.monitor.Monitor(project: str, name: str, role: str, config: Config = None)[源代码]#
基类:
ABC- abstractmethod log_table(table_name: str, experiences_table: DataFrame, step: int)[源代码]#
Log a table
- class trinity.utils.monitor.TensorboardMonitor(project: str, group: str, name: str, role: str, config: Config = None)[源代码]#
基类:
Monitor
- class trinity.utils.monitor.WandbMonitor(project: str, group: str, name: str, role: str, config: Config = None)[源代码]#
基类:
MonitorMonitor with Weights & Biases.
- 参数:
base_url (Optional[str]) -- The base URL of the W&B server. If not provided, use the environment variable WANDB_BASE_URL.
api_key (Optional[str]) -- The API key for W&B. If not provided, use the environment variable WANDB_API_KEY.
- class trinity.utils.monitor.MlflowMonitor(project: str, group: str, name: str, role: str, config: Config = None)[源代码]#
基类:
MonitorMonitor with MLflow.
- 参数:
uri (Optional[str]) -- The tracking server URI. If not provided, the default is http://localhost:5000.
username (Optional[str]) -- The username to login. If not provided, the default is None.
password (Optional[str]) -- The password to login. If not provided, the default is None.
- class trinity.utils.monitor.SwanlabMonitor(project: str, group: str, name: str, role: str, config: Config = None)[源代码]#
基类:
MonitorMonitor with SwanLab (https://swanlab.cn/).
Set SWANLAB_API_KEY environment variable with your SwanLab API key before using this monitor. If you're using local deployment of Swanlab, also set SWANLAB_API_HOST environment variable. Pass additional SwanLab initialization arguments via config.monitor.monitor_args in the Config, such as tags, description, logdir, etc. See SwanLab documentation for details.