-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* changes utility direction * order metrics * order metrics * add new profile page * modify badges * get the active tasks per user * get the active tasks per user * Fix hf * info for models * new user profile page * new user profile page * change label community * add user stats * stats endpoint * add task proposals * add task proposals * Implement new models * Debug HF * model all info * websocket * nibbler ws implementation * nibbler ws implementation * new login, model, and profile page * upload number of generated images * change amount of generated images * add longdesc model * update model info * update model info * model validation * authenticate methods * new auth * model info * Fix Typos * Typo fix * typo * ensure that there's is a file * solve publish model bug * new logic validation * just moving folders * solve a linter problem * fixing bugs * add no double validation * add no fooling * add no fooling * destructure validate samples * bug in orm * fix problem with login * fix typos * New packages * Merge changes * Fix forbidden images * Additional TS/JS packages * add control error --------- Co-authored-by: remg1997 <rafael.mosquera@factored.ai>
- Loading branch information
Showing
203 changed files
with
4,878 additions
and
1,069 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright (c) MLCommons and its affiliates. | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
from fastapi import APIRouter | ||
|
||
from app.domain.services.base.task_proposals import TaskProposalService | ||
|
||
|
||
router = APIRouter() | ||
|
||
|
||
@router.get("/validate_no_duplicate_task_code/{task_code}", response_model={}) | ||
async def validate_no_duplicate_task_code(task_code: str): | ||
return TaskProposalService().validate_no_duplicate_task_code(task_code) | ||
|
||
|
||
@router.post("/add_task_proposal", response_model={}) | ||
async def add_task_proposal( | ||
user_id: int, task_code: str, name: str, desc: str, longdesc: str | ||
): | ||
return TaskProposalService().add_task_proposal( | ||
user_id, task_code, name, desc, longdesc | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright (c) MLCommons and its affiliates. | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
from fastapi import APIRouter | ||
|
||
from app.domain.auth.authentication import LoginService | ||
from app.domain.schemas.auth.auth import CreateUserRequest, LoginRequest | ||
from app.domain.services.base.user import UserService | ||
|
||
|
||
router = APIRouter() | ||
|
||
|
||
@router.get("/get_user_with_badges/{user_id}", response_model={}) | ||
async def get_task_id_by_task_code(user_id: str): | ||
return UserService().get_user_with_badges(user_id) | ||
|
||
|
||
@router.get("/get_stats_by_user_id/{user_id}", response_model={}) | ||
async def get_stats_by_user_id(user_id: str): | ||
return UserService().get_stats_by_user_id(user_id) | ||
|
||
|
||
@router.post("/authenticate") | ||
async def authenticate(model: LoginRequest): | ||
return LoginService().login(model.email, model.password) | ||
|
||
|
||
@router.post("/create_user") | ||
async def create_user(model: CreateUserRequest): | ||
return LoginService().create_user(model.email, model.password, model.username) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
backend/app/domain/helpers/email_templates/model_evaluation_failed.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Hi there | ||
|
||
Your model $name has failed evaluating. Please check your model and try again. If you think this is a mistake, please contact | ||
the task organizer. | ||
|
||
Thanks, | ||
|
||
The Dynabench Team |
8 changes: 8 additions & 0 deletions
8
backend/app/domain/helpers/email_templates/model_evaluation_sucessful.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Hi there | ||
|
||
Your model $name has been successfully evaluated. | ||
You can find and publish the model at https://dynabench.org/models/$model_id. | ||
|
||
Thanks, | ||
|
||
The Dynabench Team |
7 changes: 7 additions & 0 deletions
7
backend/app/domain/helpers/email_templates/task_proposal_update.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Greetings, | ||
|
||
You're task $name with the code $code has been successfully created with the following description: $desc. | ||
|
||
Thanks, | ||
|
||
The Dynabench Team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.