Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/winner-selection-tests' into win…
Browse files Browse the repository at this point in the history
…ner-selection-tests
  • Loading branch information
MsRandom committed Dec 5, 2024
2 parents aac6ed8 + 0a9ce7d commit ef9394f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions miner/miner/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
from pathlib import Path
from tempfile import TemporaryDirectory

from base.config import get_config
from base.contest import Contest, find_contest, CONTESTS, ContestId, RepositoryInfo
from base.inputs_api import get_inputs_state
from base.submissions import CheckpointSubmission, make_submission
from fiber.chain.chain_utils import load_hotkey_keypair
from fiber.chain.interface import get_substrate
from fiber.logging_utils import get_logger
from git import GitCommandError, cmd
from substrateinterface import Keypair

from base.config import get_config
from base.contest import Contest, find_contest, CONTESTS, ContestId
from base.inputs_api import get_inputs_state
from base.submissions import CheckpointSubmission, make_submission
from testing.benchmarker import Benchmarker

VALID_REPO_REGEX = r"^https:\/\/[a-zA-Z0-9.-]+\/[a-zA-Z0-9._-]+\/[a-zA-Z0-9._-]+$"
Expand All @@ -31,9 +30,11 @@ def start_benchmarking(contest: Contest, keypair: Keypair, submission: Checkpoin
sandbox_args=[]
)

repository_info = RepositoryInfo(url=submission.repository, revision=submission.revision)

benchmarker.benchmark_submissions(
contest=contest,
submissions={keypair.ss58_address: submission},
submissions={keypair.ss58_address: repository_info},
)

print("\nBenchmarking results:")
Expand Down

0 comments on commit ef9394f

Please sign in to comment.