juncliu commited on
Commit
e5239b0
·
1 Parent(s): 01ff098

update code

Browse files
results/Chronos_small/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "Chronos_small",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/amazon/chronos-t5-small"
 
6
  }
 
2
  "model": "Chronos_small",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/amazon/chronos-t5-small",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/chronos.ipynb"
7
  }
results/Moirai_base/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "Moirai_base",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/Salesforce/moirai-1.1-R-base"
 
6
  }
 
2
  "model": "Moirai_base",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/Salesforce/moirai-1.1-R-base",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/moirai.ipynb"
7
  }
results/Moirai_large/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "Moirai_large",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/Salesforce/moirai-1.1-R-large"
 
6
  }
 
2
  "model": "Moirai_large",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/Salesforce/moirai-1.1-R-large",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/moirai.ipynb"
7
  }
results/Moirai_small/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "Moirai_small",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/Salesforce/moirai-1.1-R-large"
 
6
  }
 
2
  "model": "Moirai_small",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/Salesforce/moirai-1.1-R-large",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/moirai.ipynb"
7
  }
results/TTM-R2/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "TTM-R2",
3
  "model_type": "fine-tuned",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/ibm-granite/granite-timeseries-ttm-r2"
 
6
  }
 
2
  "model": "TTM-R2",
3
  "model_type": "fine-tuned",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/ibm-granite/granite-timeseries-ttm-r2",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/ttm.ipynb"
7
  }
results/chronos_base/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "Chronos_base",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/amazon/chronos-t5-base"
 
6
  }
 
2
  "model": "Chronos_base",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/amazon/chronos-t5-base",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/chronos.ipynb"
7
  }
results/chronos_bolt_base/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "chronos_bolt_base",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/amazon/chronos-bolt-base"
 
6
  }
 
2
  "model": "chronos_bolt_base",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/amazon/chronos-bolt-base",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/chronos.ipynb"
7
  }
results/chronos_bolt_small/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "chronos_bolt_small",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/amazon/chronos-bolt-small"
 
6
  }
 
2
  "model": "chronos_bolt_small",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/amazon/chronos-bolt-small",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/chronos.ipynb"
7
  }
results/chronos_large/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "Chronos_large",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/amazon/chronos-t5-large"
 
6
  }
 
2
  "model": "Chronos_large",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/amazon/chronos-t5-large",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/chronos.ipynb"
7
  }
results/timesfm_2_0_500m/config.json CHANGED
@@ -2,5 +2,6 @@
2
  "model": "timesfm_2_0_500m",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
- "model_link": "https://huggingface.co/google/timesfm-2.0-500m-jax"
 
6
  }
 
2
  "model": "timesfm_2_0_500m",
3
  "model_type": "pretrained",
4
  "model_dtype": "float32",
5
+ "model_link": "https://huggingface.co/google/timesfm-2.0-500m-jax",
6
+ "code_link": "https://github.com/SalesforceAIResearch/gift-eval/blob/main/notebooks/timesfm.ipynb"
7
  }
src/display/formatting.py CHANGED
@@ -1,9 +1,17 @@
1
- def model_hyperlink(link, model_name):
2
- if link == "":
3
  return model_name
4
  # return f'<a target="_blank">{model_name}</a>'
5
  # return f'<a target="_blank" href="{link}" rel="noopener noreferrer">{model_name}</a>'
6
- return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
 
 
 
 
 
 
 
 
7
 
8
 
9
  def make_clickable_model(model_name):
 
1
+ def model_hyperlink(model_link, code_link, model_name):
2
+ if model_link == "":
3
  return model_name
4
  # return f'<a target="_blank">{model_name}</a>'
5
  # return f'<a target="_blank" href="{link}" rel="noopener noreferrer">{model_name}</a>'
6
+ else:
7
+ model_url = f'<a target="_blank" href="{model_link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
8
+ if code_link == "":
9
+ return model_url
10
+ else:
11
+ code_url = f'<a target="_blank" href="{code_link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">code</a>'
12
+ return f"{model_url} ({code_url})"
13
+ # return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a> | ' \
14
+ # f'<a target="_blank" href="https://www.google.com" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}_link2</a>'
15
 
16
 
17
  def make_clickable_model(model_name):
src/leaderboard/read_evals.py CHANGED
@@ -19,6 +19,7 @@ class ModelConfig:
19
  model: str
20
  model_link: str = ""
21
  model_type: ModelType = ModelType.Unknown
 
22
  precision: Precision = Precision.Unknown
23
  license: str = "?"
24
  likes: int = 0
@@ -37,13 +38,14 @@ class ModelConfig:
37
  model_type = ModelType.from_str(data.get("model_type", ""))
38
  model = data.get("model", "")
39
  model_link = data.get("model_link", "")
40
- return cls(model=model, model_link=model_link, model_type=model_type, precision=precision)
 
41
 
42
  def to_dict(self):
43
  """Converts the model info to a dict compatible with our dataframe display"""
44
  data_dict = {
45
  ModelInfoColumn.model.name: self.model,
46
- 'model_w_link': model_hyperlink(self.model_link, self.model),
47
  ModelInfoColumn.precision.name: self.precision.value.name,
48
  ModelInfoColumn.model_type.name: self.model_type.value.name,
49
  ModelInfoColumn.model_type_symbol.name: self.model_type.value.symbol,
@@ -220,6 +222,7 @@ def get_model_info(results_path: str, requests_path: str) -> list[ModelConfig]:
220
  for model_result_filepath in model_result_filepaths:
221
  # Creation of result
222
  model_info = ModelConfig.init_from_json_file(model_result_filepath)
 
223
  # eval_result.update_with_request_file(requests_path)
224
 
225
  # Store results of same eval together
 
19
  model: str
20
  model_link: str = ""
21
  model_type: ModelType = ModelType.Unknown
22
+ code_link: str = ""
23
  precision: Precision = Precision.Unknown
24
  license: str = "?"
25
  likes: int = 0
 
38
  model_type = ModelType.from_str(data.get("model_type", ""))
39
  model = data.get("model", "")
40
  model_link = data.get("model_link", "")
41
+ code_link = data.get("code_link", "")
42
+ return cls(model=model, model_link=model_link, model_type=model_type, code_link=code_link, precision=precision)
43
 
44
  def to_dict(self):
45
  """Converts the model info to a dict compatible with our dataframe display"""
46
  data_dict = {
47
  ModelInfoColumn.model.name: self.model,
48
+ 'model_w_link': model_hyperlink(self.model_link, self.code_link, self.model),
49
  ModelInfoColumn.precision.name: self.precision.value.name,
50
  ModelInfoColumn.model_type.name: self.model_type.value.name,
51
  ModelInfoColumn.model_type_symbol.name: self.model_type.value.symbol,
 
222
  for model_result_filepath in model_result_filepaths:
223
  # Creation of result
224
  model_info = ModelConfig.init_from_json_file(model_result_filepath)
225
+ print(model_result_filepath)
226
  # eval_result.update_with_request_file(requests_path)
227
 
228
  # Store results of same eval together