rusticluftig commited on
Commit
0d9018c
Β·
1 Parent(s): e3a1176

Add wandb token

Browse files
Files changed (2) hide show
  1. .gitignore +1 -0
  2. app.py +2 -2
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ .venv
app.py CHANGED
@@ -24,7 +24,7 @@ EVALUATION_HEADER = """<h3 align="center">Shows the latest internal evaluation s
24
  VALIDATOR_WANDB_PROJECT = "opentensor-dev/pretraining-subnet"
25
  H4_TOKEN = os.environ.get("H4_TOKEN", None)
26
  API = HfApi(token=H4_TOKEN)
27
- # TODO: Update.
28
  REPO_ID = "RusticLuftig/9-leaderboard"
29
  MAX_AVG_LOSS_POINTS = 1
30
  RETRIES = 5
@@ -136,7 +136,7 @@ def get_float_score(key: str, history) -> typing.Tuple[typing.Optional[float], b
136
  return None, False
137
 
138
  def get_scores(uids: typing.List[int]) -> typing.Dict[int, typing.Dict[str, typing.Optional[float]]]:
139
- api = wandb.Api()
140
  runs = list(api.runs(VALIDATOR_WANDB_PROJECT),
141
  filters={
142
  "type": "validator",
 
24
  VALIDATOR_WANDB_PROJECT = "opentensor-dev/pretraining-subnet"
25
  H4_TOKEN = os.environ.get("H4_TOKEN", None)
26
  API = HfApi(token=H4_TOKEN)
27
+ WANDB_TOKEN = os.environ.get("WANDB_API_KEY", None)
28
  REPO_ID = "RusticLuftig/9-leaderboard"
29
  MAX_AVG_LOSS_POINTS = 1
30
  RETRIES = 5
 
136
  return None, False
137
 
138
  def get_scores(uids: typing.List[int]) -> typing.Dict[int, typing.Dict[str, typing.Optional[float]]]:
139
+ api = wandb.Api(api_key=WANDB_TOKEN)
140
  runs = list(api.runs(VALIDATOR_WANDB_PROJECT),
141
  filters={
142
  "type": "validator",