2121from datasmith .scrape .utils import _parse_commit_url
2222
2323# configure_agent_backends(PORTKEY_MODEL_NAME="@anthropic/claude-3-5-sonnet-latest")
24- configure_agent_backends (PORTKEY_MODEL_NAME = "@togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo" )
25-
24+ # configure_agent_backends(PORTKEY_MODEL_NAME="@togetherai/meta-llama/Llama-3.3-70B-Instruct-Turbo")
25+ configure_agent_backends ( PORTKEY_MODEL_NAME = "@togetherai/deepseek-ai/DeepSeek-V3" )
2626
2727# logger = configure_logging(level=10)
2828logger = configure_logging (level = 10 , stream = open (Path (__file__ ).with_suffix (".tiny.log" ), "w" )) # noqa: SIM115
@@ -98,7 +98,7 @@ def process_inputs(args: argparse.Namespace) -> dict[tuple[str, str], set[tuple[
9898 sha = row ["sha" ]
9999 has_asv = row .get ("has_asv" , True )
100100 if not has_asv :
101- logger .debug (f "Skipping { repo_name } commit { sha } as it does not have ASV benchmarks." )
101+ logger .debug ("Skipping %s commit %s as it does not have ASV benchmarks." , repo_name , sha )
102102 continue
103103 owner , repo = repo_name .split ("/" )
104104 commit_date_unix : float = (
@@ -117,13 +117,10 @@ def prepare_tasks(
117117 all_states : dict [tuple [str , str ], set [tuple [str , float ]]], limit_per_repo : int , context_registry : ContextRegistry
118118) -> list [Task ]:
119119 all_tasks : list [Task ] = []
120- for (owner , repo ), uniq in all_states .items ():
121- tasks = [ Task (owner , repo , sha , commit_date = date ) for sha , date in uniq ]
120+ for (owner , repo ), tup in all_states .items ():
121+ tasks = list ({ Task (owner , repo , sha , commit_date = date ) for sha , date in tup })
122122 tasks = list (filter (lambda t : t not in context_registry , tasks ))
123- if limit_per_repo < 0 :
124- limit_per_repo = len (tasks )
125- else :
126- # randomly choose limit_per_repo tasks from tasks
123+ if limit_per_repo > 0 :
127124 tasks = random .sample (tasks , min (limit_per_repo , len (tasks )))
128125 all_tasks .extend (tasks )
129126 return all_tasks
0 commit comments