Skip to content

Commit af0a375

Browse files
committed
Fix comet-for-mlflow compatibility with latest version of the Comet SDK
1 parent 3936662 commit af0a375

File tree

1 file changed

+4
-108
lines changed

1 file changed

+4
-108
lines changed

comet_for_mlflow/file_writer.py

Lines changed: 4 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,8 @@ def write_line_data(self, data):
6464
def write_filename_msg(self, source, timestamp):
6565
data = {
6666
"payload": {
67-
"code": None,
68-
"context": None,
69-
"env_details": None,
7067
"fileName": source,
71-
"git_meta": None,
72-
"gpu_static_info": None,
73-
"graph": None,
74-
"html": None,
75-
"htmlOverride": None,
76-
"installed_packages": None,
7768
"local_timestamp": timestamp,
78-
"log_dependency": None,
79-
"log_other": None,
80-
"log_system_info": None,
81-
"metric": None,
82-
"os_packages": None,
83-
"param": None,
84-
"params": None,
85-
"stderr": None,
86-
"stdout": None,
8769
},
8870
"type": "ws_msg",
8971
}
@@ -93,38 +75,24 @@ def write_filename_msg(self, source, timestamp):
9375
def write_user_msg(self, user, timestamp):
9476
data = {
9577
"payload": {
96-
"code": None,
97-
"context": None,
9878
"env_details": {
9979
"command": None,
10080
"hostname": None,
10181
"ip": None,
10282
"network_interfaces_ips": None,
10383
"os": None,
84+
"os_release": None,
85+
"processor": None,
10486
"os_type": None,
10587
"pid": None,
10688
"python_exe": None,
10789
"python_version": None,
10890
"python_version_verbose": None,
10991
"user": user,
92+
"env": None,
93+
"machine": None,
11094
},
111-
"fileName": None,
112-
"git_meta": None,
113-
"gpu_static_info": None,
114-
"graph": None,
115-
"html": None,
116-
"htmlOverride": None,
117-
"installed_packages": None,
11895
"local_timestamp": timestamp,
119-
"log_dependency": None,
120-
"log_other": None,
121-
"log_system_info": None,
122-
"metric": None,
123-
"os_packages": None,
124-
"param": None,
125-
"params": None,
126-
"stderr": None,
127-
"stdout": None,
12896
},
12997
"type": "ws_msg",
13098
}
@@ -133,10 +101,6 @@ def write_user_msg(self, user, timestamp):
133101
def write_git_meta_msg(self, git_commit, git_origin, timestamp):
134102
data = {
135103
"payload": {
136-
"code": None,
137-
"context": None,
138-
"env_details": None,
139-
"fileName": None,
140104
"git_meta": {
141105
"branch": None,
142106
"origin": git_origin,
@@ -146,21 +110,7 @@ def write_git_meta_msg(self, git_commit, git_origin, timestamp):
146110
"status": None,
147111
"user": None,
148112
},
149-
"gpu_static_info": None,
150-
"graph": None,
151-
"html": None,
152-
"htmlOverride": None,
153-
"installed_packages": None,
154113
"local_timestamp": timestamp,
155-
"log_dependency": None,
156-
"log_other": None,
157-
"log_system_info": None,
158-
"metric": None,
159-
"os_packages": None,
160-
"param": None,
161-
"params": None,
162-
"stderr": None,
163-
"stdout": None,
164114
},
165115
"type": "ws_msg",
166116
}
@@ -170,26 +120,8 @@ def write_git_meta_msg(self, git_commit, git_origin, timestamp):
170120
def write_log_other_msg(self, other_name, other_value, timestamp):
171121
data = {
172122
"payload": {
173-
"code": None,
174-
"context": None,
175-
"env_details": None,
176-
"fileName": None,
177-
"git_meta": None,
178-
"gpu_static_info": None,
179-
"graph": None,
180-
"html": None,
181-
"htmlOverride": None,
182-
"installed_packages": None,
183123
"local_timestamp": timestamp,
184-
"log_dependency": None,
185124
"log_other": {"key": other_name, "val": other_value},
186-
"log_system_info": None,
187-
"metric": None,
188-
"os_packages": None,
189-
"param": None,
190-
"params": None,
191-
"stderr": None,
192-
"stdout": None,
193125
},
194126
"type": "ws_msg",
195127
}
@@ -199,30 +131,12 @@ def write_log_other_msg(self, other_name, other_value, timestamp):
199131
def write_param_msg(self, param_name, param_value, timestamp):
200132
data = {
201133
"payload": {
202-
"code": None,
203-
"context": None,
204-
"env_details": None,
205-
"fileName": None,
206-
"git_meta": None,
207-
"gpu_static_info": None,
208-
"graph": None,
209-
"html": None,
210-
"htmlOverride": None,
211-
"installed_packages": None,
212134
"local_timestamp": timestamp,
213-
"log_dependency": None,
214-
"log_other": None,
215-
"log_system_info": None,
216-
"metric": None,
217-
"os_packages": None,
218135
"param": {
219136
"paramName": param_name,
220137
"paramValue": param_value,
221138
"step": None,
222139
},
223-
"params": None,
224-
"stderr": None,
225-
"stdout": None,
226140
},
227141
"type": "ws_msg",
228142
}
@@ -232,31 +146,13 @@ def write_param_msg(self, param_name, param_value, timestamp):
232146
def write_metric_msg(self, metric_name, step, timestamp, metric_value):
233147
data = {
234148
"payload": {
235-
"code": None,
236-
"context": None,
237-
"env_details": None,
238-
"fileName": None,
239-
"git_meta": None,
240-
"gpu_static_info": None,
241-
"graph": None,
242-
"html": None,
243-
"htmlOverride": None,
244-
"installed_packages": None,
245149
"local_timestamp": timestamp,
246-
"log_dependency": None,
247-
"log_other": None,
248-
"log_system_info": None,
249150
"metric": {
250151
"epoch": 0,
251152
"metricName": metric_name,
252153
"metricValue": metric_value,
253154
"step": step,
254155
},
255-
"os_packages": None,
256-
"param": None,
257-
"params": None,
258-
"stderr": None,
259-
"stdout": None,
260156
},
261157
"type": "ws_msg",
262158
}

0 commit comments

Comments
 (0)