Spaces:
Runtime error
Runtime error
Added test description
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
# Code adapted from: https://huggingface.co/spaces/RaoFoundation/pretraining-leaderboard/blob/main/app.py
|
|
|
|
| 2 |
import argparse
|
| 3 |
import functools
|
| 4 |
import traceback
|
|
@@ -21,11 +22,20 @@ import pandas as pd
|
|
| 21 |
|
| 22 |
load_dotenv()
|
| 23 |
|
|
|
|
|
|
|
| 24 |
FONT = (
|
| 25 |
"""<link href="https://fonts.cdnfonts.com/css/jmh-typewriter" rel="stylesheet">"""
|
| 26 |
)
|
| 27 |
TITLE = """<h1 align="center" id="space-title" class="typewriter">Subnet 9 Leaderboard</h1>"""
|
| 28 |
HEADER = """<h2 align="center" class="typewriter"><a href="https://github.com/macrocosm-os/pretraining" target="_blank">Subnet 9</a> is a <a href="https://bittensor.com/" target="_blank">Bittensor</a> subnet that rewards miners for producing pretrained Foundation-Models on the <a href="https://huggingface.co/datasets/tiiuae/falcon-refinedweb" target="_blank">Falcon Refined Web dataset</a>. It acts like a continuous benchmark whereby miners are rewarded for attaining the best losses on randomly sampled pages of Falcon.<br/>The models with the best head-to-head loss on the evaluation data receive a steady emission of TAO.</h3>"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
EVALUATION_DETAILS = """<ul><li><b>Name:</b> the 🤗 Hugging Face model name (click to go to the model card)</li><li><b>Rewards / Day:</b> the expected rewards per day based on current ranking.</li><li><b>Last Average Loss:</b> the last loss value on the evaluation data for the model as calculated by a validator (lower is better)</li><li><b>UID:</b> the Bittensor UID of the miner</li><li><b>Block:</b> the Bittensor block that the model was submitted in</li></ul><br/>More stats on <a href="https://taostats.io/subnets/netuid-9/" target="_blank">taostats</a>."""
|
| 30 |
EVALUATION_HEADER = """<h3 align="center">Shows the latest internal evaluation statistics as calculated by the Opentensor validator</h3>"""
|
| 31 |
VALIDATOR_WANDB_PROJECT = "opentensor-dev/pretraining-subnet"
|
|
@@ -435,6 +445,6 @@ def main():
|
|
| 435 |
scheduler.start()
|
| 436 |
|
| 437 |
demo.launch()
|
|
|
|
| 438 |
|
| 439 |
-
|
| 440 |
-
main()
|
|
|
|
| 1 |
# Code adapted from: https://huggingface.co/spaces/RaoFoundation/pretraining-leaderboard/blob/main/app.py
|
| 2 |
+
'''
|
| 3 |
import argparse
|
| 4 |
import functools
|
| 5 |
import traceback
|
|
|
|
| 22 |
|
| 23 |
load_dotenv()
|
| 24 |
|
| 25 |
+
'''
|
| 26 |
+
import gradio as gr
|
| 27 |
FONT = (
|
| 28 |
"""<link href="https://fonts.cdnfonts.com/css/jmh-typewriter" rel="stylesheet">"""
|
| 29 |
)
|
| 30 |
TITLE = """<h1 align="center" id="space-title" class="typewriter">Subnet 9 Leaderboard</h1>"""
|
| 31 |
HEADER = """<h2 align="center" class="typewriter"><a href="https://github.com/macrocosm-os/pretraining" target="_blank">Subnet 9</a> is a <a href="https://bittensor.com/" target="_blank">Bittensor</a> subnet that rewards miners for producing pretrained Foundation-Models on the <a href="https://huggingface.co/datasets/tiiuae/falcon-refinedweb" target="_blank">Falcon Refined Web dataset</a>. It acts like a continuous benchmark whereby miners are rewarded for attaining the best losses on randomly sampled pages of Falcon.<br/>The models with the best head-to-head loss on the evaluation data receive a steady emission of TAO.</h3>"""
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
gr.HTML(FONT)
|
| 35 |
+
gr.HTML(TITLE)
|
| 36 |
+
gr.HTML(HEADER)
|
| 37 |
+
demo.launch(share=True)
|
| 38 |
+
'''
|
| 39 |
EVALUATION_DETAILS = """<ul><li><b>Name:</b> the 🤗 Hugging Face model name (click to go to the model card)</li><li><b>Rewards / Day:</b> the expected rewards per day based on current ranking.</li><li><b>Last Average Loss:</b> the last loss value on the evaluation data for the model as calculated by a validator (lower is better)</li><li><b>UID:</b> the Bittensor UID of the miner</li><li><b>Block:</b> the Bittensor block that the model was submitted in</li></ul><br/>More stats on <a href="https://taostats.io/subnets/netuid-9/" target="_blank">taostats</a>."""
|
| 40 |
EVALUATION_HEADER = """<h3 align="center">Shows the latest internal evaluation statistics as calculated by the Opentensor validator</h3>"""
|
| 41 |
VALIDATOR_WANDB_PROJECT = "opentensor-dev/pretraining-subnet"
|
|
|
|
| 445 |
scheduler.start()
|
| 446 |
|
| 447 |
demo.launch()
|
| 448 |
+
'''
|
| 449 |
|
| 450 |
+
#main()
|
|
|