in trending_deploy/models.py [0:0]
def trending_models(tasks: list[str], max_models_per_task: int = 200) -> List[Model]:
"""
Fetches the trending models for the specified tasks.
Args:
tasks (list[str] | None): A list of task names. If None, defaults to DEFAULT_TASKS.
max_models_per_task (int): The maximum number of models to fetch per task.
budget (int | None): The budget for the tasks in monthly dollar spend.
Returns:
List[Model]: A list of Model objects containing model information and viable instance.
"""
models_to_consider: list[Model] = []
tasks_iterator = tqdm(tasks, leave=False)
for task in tasks_iterator:
tasks_iterator.set_description(f"Loading trending models for {task}")
models_to_consider.extend(trending_models_for_task(task, max_models_per_task))
return models_to_consider