From af0a375b6f789480b4ab646bdb07de4ae6365725 Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Mon, 13 Nov 2023 18:19:05 +0100 Subject: [PATCH] Fix comet-for-mlflow compatibility with latest version of the Comet SDK --- comet_for_mlflow/file_writer.py | 112 ++------------------------------ 1 file changed, 4 insertions(+), 108 deletions(-) diff --git a/comet_for_mlflow/file_writer.py b/comet_for_mlflow/file_writer.py index 725e048..fecd354 100644 --- a/comet_for_mlflow/file_writer.py +++ b/comet_for_mlflow/file_writer.py @@ -64,26 +64,8 @@ def write_line_data(self, data): def write_filename_msg(self, source, timestamp): data = { "payload": { - "code": None, - "context": None, - "env_details": None, "fileName": source, - "git_meta": None, - "gpu_static_info": None, - "graph": None, - "html": None, - "htmlOverride": None, - "installed_packages": None, "local_timestamp": timestamp, - "log_dependency": None, - "log_other": None, - "log_system_info": None, - "metric": None, - "os_packages": None, - "param": None, - "params": None, - "stderr": None, - "stdout": None, }, "type": "ws_msg", } @@ -93,38 +75,24 @@ def write_filename_msg(self, source, timestamp): def write_user_msg(self, user, timestamp): data = { "payload": { - "code": None, - "context": None, "env_details": { "command": None, "hostname": None, "ip": None, "network_interfaces_ips": None, "os": None, + "os_release": None, + "processor": None, "os_type": None, "pid": None, "python_exe": None, "python_version": None, "python_version_verbose": None, "user": user, + "env": None, + "machine": None, }, - "fileName": None, - "git_meta": None, - "gpu_static_info": None, - "graph": None, - "html": None, - "htmlOverride": None, - "installed_packages": None, "local_timestamp": timestamp, - "log_dependency": None, - "log_other": None, - "log_system_info": None, - "metric": None, - "os_packages": None, - "param": None, - "params": None, - "stderr": None, - "stdout": None, }, "type": "ws_msg", } @@ -133,10 +101,6 @@ def write_user_msg(self, user, timestamp): def write_git_meta_msg(self, git_commit, git_origin, timestamp): data = { "payload": { - "code": None, - "context": None, - "env_details": None, - "fileName": None, "git_meta": { "branch": None, "origin": git_origin, @@ -146,21 +110,7 @@ def write_git_meta_msg(self, git_commit, git_origin, timestamp): "status": None, "user": None, }, - "gpu_static_info": None, - "graph": None, - "html": None, - "htmlOverride": None, - "installed_packages": None, "local_timestamp": timestamp, - "log_dependency": None, - "log_other": None, - "log_system_info": None, - "metric": None, - "os_packages": None, - "param": None, - "params": None, - "stderr": None, - "stdout": None, }, "type": "ws_msg", } @@ -170,26 +120,8 @@ def write_git_meta_msg(self, git_commit, git_origin, timestamp): def write_log_other_msg(self, other_name, other_value, timestamp): data = { "payload": { - "code": None, - "context": None, - "env_details": None, - "fileName": None, - "git_meta": None, - "gpu_static_info": None, - "graph": None, - "html": None, - "htmlOverride": None, - "installed_packages": None, "local_timestamp": timestamp, - "log_dependency": None, "log_other": {"key": other_name, "val": other_value}, - "log_system_info": None, - "metric": None, - "os_packages": None, - "param": None, - "params": None, - "stderr": None, - "stdout": None, }, "type": "ws_msg", } @@ -199,30 +131,12 @@ def write_log_other_msg(self, other_name, other_value, timestamp): def write_param_msg(self, param_name, param_value, timestamp): data = { "payload": { - "code": None, - "context": None, - "env_details": None, - "fileName": None, - "git_meta": None, - "gpu_static_info": None, - "graph": None, - "html": None, - "htmlOverride": None, - "installed_packages": None, "local_timestamp": timestamp, - "log_dependency": None, - "log_other": None, - "log_system_info": None, - "metric": None, - "os_packages": None, "param": { "paramName": param_name, "paramValue": param_value, "step": None, }, - "params": None, - "stderr": None, - "stdout": None, }, "type": "ws_msg", } @@ -232,31 +146,13 @@ def write_param_msg(self, param_name, param_value, timestamp): def write_metric_msg(self, metric_name, step, timestamp, metric_value): data = { "payload": { - "code": None, - "context": None, - "env_details": None, - "fileName": None, - "git_meta": None, - "gpu_static_info": None, - "graph": None, - "html": None, - "htmlOverride": None, - "installed_packages": None, "local_timestamp": timestamp, - "log_dependency": None, - "log_other": None, - "log_system_info": None, "metric": { "epoch": 0, "metricName": metric_name, "metricValue": metric_value, "step": step, }, - "os_packages": None, - "param": None, - "params": None, - "stderr": None, - "stdout": None, }, "type": "ws_msg", }