92
92
"ian" : {
93
93
# ! Scores from original paper
94
94
"Dehong Ma et al. 2017 (Original)" : {
95
- "laptops" : {"Micro-F1" : 74.49 , "Macro-F1" : 71.35 },
96
- "restaurants" : {"Micro-F1" : 80.23 , "Macro-F1" : 70.8 },
97
- },
98
- # ! Scores from LCR-ROT
99
- "Zheng et al. 2018" : {
100
95
"laptops" : {"Micro-F1" : 72.1 },
101
96
"restaurants" : {"Micro-F1" : 78.6 },
102
97
},
98
+ # # ! Scores from LCR-ROT
99
+ # "Zheng et al. 2018": {
100
+ # "laptops": {"Micro-F1": 72.1},
101
+ # "restaurants": {"Micro-F1": 78.6},
102
+ # },
103
+ # ! Scores from https://arxiv.org/abs/2005.06607
104
+ "Navonil et al. 2020" : {
105
+ "laptops" : {"Macro-F1" : 64.86 },
106
+ "restaurants" : {"Macro-F1" : 66.41 },
107
+ },
103
108
},
104
109
"ram" : {
105
110
# ! Scores from original paper
209
214
"ram" : "RAM" ,
210
215
}
211
216
217
+ # EMBEDDINGS = {
218
+ # "cc42": "GloVe CommonCrawl 42b (300d)",
219
+ # "cc840": "GloVe CommonCrawl 840b (300d)",
220
+ # "t200": "GloVe Twitter (200d)",
221
+ # "t100": "GloVe Twitter (100d)",
222
+ # }
223
+
212
224
EMBEDDINGS = {
213
- "cc42 " : "GloVe CommonCrawl 42b (300d) " ,
214
- "cc840 " : "GloVe CommonCrawl 840b (300d) " ,
215
- "t200" : "GloVe Twitter (200d) " ,
216
- "t100" : "GloVe Twitter (100d) " ,
225
+ "cc840 " : "300d 840b CommonCrawl GloVe " ,
226
+ "cc42 " : "300d 42b CommonCrawl GloVe " ,
227
+ "t200" : "200d Twitter GloVe " ,
228
+ "t100" : "100d Twitter GloVe " ,
217
229
}
218
230
219
231
METRIC_COLS = {
@@ -290,12 +302,28 @@ def get_comet_api(api_key=None, **kwargs):
290
302
return api
291
303
292
304
293
- def get_metric_series (experiment , metric_cmt_key ):
294
- return {
295
- v ["epoch" ]: float (v ["metricValue" ])
296
- for v in experiment .get_metrics ()
297
- if v ["metricName" ] == metric_cmt_key
298
- }
305
+ # DEPRECATED, need to use metrics_for_chart now
306
+ # def get_metric_series(experiment, metric_cmt_key):
307
+ # return {
308
+ # v["epoch"]: float(v["metricValue"])
309
+ # for v in experiment.get_metrics()
310
+ # if v["metricName"] == metric_cmt_key
311
+ # }
312
+
313
+
314
+ def get_metric_series (experiment , metric_cmt_key , api ):
315
+ series_data_full = api .get_metrics_for_chart (
316
+ experiment_keys = [experiment .id ], metrics = [metric_cmt_key ]
317
+ )
318
+ metric_series_data = [
319
+ {
320
+ ep : float (val )
321
+ for (ep , val ) in zip (metrics ["epochs" ], metrics ["values" ])
322
+ }
323
+ for metrics in series_data_full [experiment .id ]["metrics" ]
324
+ if metrics ["metricName" ] == metric_cmt_key
325
+ ]
326
+ return metric_series_data [0 ]
299
327
300
328
301
329
def get_grouped_metric_series (project , metrics , workspace = None , ** kwargs ):
@@ -319,7 +347,7 @@ def get_grouped_metric_series(project, metrics, workspace=None, **kwargs):
319
347
"experiments" : [e for e in experiments if e .name == name ],
320
348
** {
321
349
metric_cmt_key : [
322
- get_metric_series (e , metric_cmt_key )
350
+ get_metric_series (e , metric_cmt_key , api )
323
351
for e in experiments
324
352
if e .name == name
325
353
]
@@ -480,14 +508,14 @@ def comet_to_df(workspace, models=None, metrics=None, **kwargs):
480
508
"fasttext-wiki-news-subwords-300" : "FastText (300d)" ,
481
509
"glove-twitter-25" : "GloVe Twitter (25d)" ,
482
510
"glove-twitter-50" : "GloVe Twitter (50d)" ,
483
- "glove-twitter-100" : "GloVe Twitter (100d)" ,
484
- "glove-twitter-200" : "GloVe Twitter (200d)" ,
511
+ "glove-twitter-100" : EMBEDDINGS [ "t100" ] ,
512
+ "glove-twitter-200" : EMBEDDINGS [ "t200" ] ,
485
513
"glove-wiki-gigaword-50" : "GloVe Wiki (50d)" ,
486
514
"glove-wiki-gigaword-100" : "GloVe Wiki (100d)" ,
487
515
"glove-wiki-gigaword-200" : "GloVe Wiki (200d)" ,
488
516
"glove-wiki-gigaword-300" : "GloVe Wiki (300d)" ,
489
- "glove-cc42-300" : "GloVe CommonCrawl 42b (300d)" ,
490
- "glove-cc840-300" : "GloVe CommonCrawl 840b (300d)" ,
517
+ "glove-cc42-300" : EMBEDDINGS [ "cc42" ] ,
518
+ "glove-cc840-300" : EMBEDDINGS [ "cc840" ] ,
491
519
"word2vec-google-news-300" : "Word2Vec Google News (300d)" ,
492
520
"word2vec-ruscorpora-300" : "Word2Vec Rus Corpora (300d)" ,
493
521
}.get (embedding_info ["name" ])
@@ -497,12 +525,13 @@ def comet_to_df(workspace, models=None, metrics=None, **kwargs):
497
525
exp_name_str = exp_name_str .replace (ds_name , "" )
498
526
exp_name_str = exp_name_str .replace ("balanced" , "" )
499
527
exp_name_str = exp_name_str .replace (
500
- {
501
- "GloVe CommonCrawl 42b (300d)" : "cc42" ,
502
- "GloVe CommonCrawl 840b (300d)" : "cc840" ,
503
- "GloVe Twitter (100d)" : "t100" ,
504
- "GloVe Twitter (200d)" : "t200" ,
505
- }.get (embedding_str ),
528
+ {v : k for k , v in EMBEDDINGS .items ()}.get (embedding_str ),
529
+ # {
530
+ # "GloVe CommonCrawl 42b (300d)": "cc42",
531
+ # "GloVe CommonCrawl 840b (300d)": "cc840",
532
+ # "GloVe Twitter (100d)": "t100",
533
+ # "GloVe Twitter (200d)": "t200",
534
+ # }.get(embedding_str),
506
535
"" ,
507
536
)
508
537
exp_name_str = exp_name_str .replace ("-" , " " )
0 commit comments