leo19941227 commited on
Commit
c9d4907
1 Parent(s): fa98f1c

Upload Upstream: comit message: my best model

Browse files
{{cookiecutter.repo_name}}/cli.py CHANGED
@@ -37,24 +37,23 @@ def validate():
37
  for task in tasks:
38
  downsample_rate = upstream.get_downsample_rates(task)
39
  assert isinstance(downsample_rate, int)
40
- print(f"The upstream's representation for {task}"
41
- f" has the downsample rate of {downsample_rate}.")
42
  except:
43
  print("Please check the Upstream Specification on https://superbbenchmark.org/challenge")
44
  raise
45
 
46
  typer.echo("All submission files validated!")
47
- typer.echo("Now you can make a submission.")
48
 
49
 
50
  @app.command()
51
- def submit(submission_name: str):
52
  subprocess.call("git pull origin main".split())
53
  subprocess.call(["git", "add", "."])
54
- subprocess.call(["git", "commit", "-m", f"Submission: {submission_name} "])
55
  subprocess.call(["git", "push"])
56
- typer.echo("Submission successful!")
57
-
58
 
59
  if __name__ == "__main__":
60
  app()
 
37
  for task in tasks:
38
  downsample_rate = upstream.get_downsample_rates(task)
39
  assert isinstance(downsample_rate, int)
40
+
 
41
  except:
42
  print("Please check the Upstream Specification on https://superbbenchmark.org/challenge")
43
  raise
44
 
45
  typer.echo("All submission files validated!")
46
+ typer.echo("Now you can upload these files to huggingface's Hub.")
47
 
48
 
49
  @app.command()
50
+ def upload(submission_name: str):
51
  subprocess.call("git pull origin main".split())
52
  subprocess.call(["git", "add", "."])
53
+ subprocess.call(["git", "commit", "-m", f"Upload Upstream: {submission_name} "])
54
  subprocess.call(["git", "push"])
55
+ typer.echo("Upload successful!")
56
+ typer.echo("Now, please go to https://superbbenchmark.org/submit to make a submission.")
57
 
58
  if __name__ == "__main__":
59
  app()
{{cookiecutter.repo_name}}/expert.py CHANGED
@@ -25,7 +25,7 @@ class Model(nn.Module):
25
  return [hidden, feature]
26
 
27
  class UpstreamExpert(nn.Module):
28
- def __init__(self, ckpt: str = "model.pt", **kwargs):
29
  """
30
  Args:
31
  ckpt:
@@ -35,7 +35,7 @@ class UpstreamExpert(nn.Module):
35
  super().__init__()
36
  self.name = "[Example UpstreamExpert]"
37
 
38
- print(f"{self.name} - You can use ckpt to load your pretrained weights: {ckpt}")
39
  ckpt = torch.load(ckpt, map_location="cpu")
40
  self.model = Model()
41
  self.model.load_state_dict(ckpt)
 
25
  return [hidden, feature]
26
 
27
  class UpstreamExpert(nn.Module):
28
+ def __init__(self, ckpt: str = "./model.pt", **kwargs):
29
  """
30
  Args:
31
  ckpt:
 
35
  super().__init__()
36
  self.name = "[Example UpstreamExpert]"
37
 
38
+ # You can use ckpt to load your pretrained weights
39
  ckpt = torch.load(ckpt, map_location="cpu")
40
  self.model = Model()
41
  self.model.load_state_dict(ckpt)