Skip to content

Commit

Permalink
Fix comet-for-mlflow compatibility with latest version of the Comet SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothiraldan committed Nov 13, 2023
1 parent 3936662 commit af0a375
Showing 1 changed file with 4 additions and 108 deletions.
112 changes: 4 additions & 108 deletions comet_for_mlflow/file_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Expand All @@ -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",
}
Expand All @@ -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,
Expand All @@ -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",
}
Expand All @@ -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",
}
Expand All @@ -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",
}
Expand All @@ -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",
}
Expand Down

0 comments on commit af0a375

Please sign in to comment.