Skip to content

Commit

Permalink
mvp ok
Browse files Browse the repository at this point in the history
  • Loading branch information
RawthiL committed Jun 20, 2024
1 parent e8ef9a1 commit 3c57c76
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions apps/go/requester/activities/update_task_tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package activities

import (
"context"
"requester/common"
"requester/types"

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"go.mongodb.org/mongo-driver/mongo"
"go.temporal.io/sdk/temporal"
"requester/common"
"requester/types"
)

type UpdateTaskTreeRequest struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ async def tokenizer_evaluate(args: PocketNetworkEvaluationTaskRequest) -> bool:
try:
async with mongo_client.start_transaction() as session:
await mongo_client.db["results"].find_one_and_update(
{"results_data.task_id": args.task_id},
{"result_data.task_id": args.task_id},
{"$set": result.model_dump(by_alias=True)},
session=session,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ db.createCollection('nodes');
db.nodes.createIndex({address: 1, service: 1}, {unique: true});

db.createCollection('results');
db.nodes.createIndex({'results_data.task_id': 1}, {unique: true});
db.nodes.createIndex({'result_data.task_id': 1}, {unique: true});

db.createCollection('buffers_numerical');
db.buffers_numerical.createIndex({"task_data.node_id": 1, "task_data.framework": 1, "task_data.task": 1}, {unique: true});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ sleep 3


all_services="A100,A101,A102,A103"
two_services="A100,A101"
one_services="A100,A102,A103"
two_services="A100,A103"
one_services="A100"
# change this if you want a different set of datasets, by default it create everything
keys_services=$one_services

Expand All @@ -16,7 +16,6 @@ keys_services_array=(${keys_services//,/ })
everything="arc_challenge,hellaswag,truthfulqa_mc2,mmlu_abstract_algebra,mmlu_anatomy,mmlu_astronomy,mmlu_business_ethics,mmlu_clinical_knowledge,mmlu_college_biology,mmlu_college_chemistry,mmlu_college_computer_science,mmlu_college_mathematics,mmlu_college_medicine,mmlu_college_physics,mmlu_computer_security,mmlu_conceptual_physics,mmlu_econometrics,mmlu_electrical_engineering,mmlu_elementary_mathematics,mmlu_formal_logic,mmlu_global_facts,mmlu_high_school_biology,mmlu_high_school_chemistry,mmlu_high_school_computer_science,mmlu_high_school_european_history,mmlu_high_school_geography,mmlu_high_school_government_and_politics,mmlu_high_school_macroeconomics,mmlu_high_school_mathematics,mmlu_high_school_microeconomics,mmlu_high_school_physics,mmlu_high_school_psychology,mmlu_high_school_statistics,mmlu_high_school_us_history,mmlu_high_school_world_history,mmlu_human_aging,mmlu_human_sexuality,mmlu_international_law,mmlu_jurisprudence,mmlu_logical_fallacies,mmlu_machine_learning,mmlu_management,mmlu_marketing,mmlu_medical_genetics,mmlu_miscellaneous,mmlu_moral_disputes,mmlu_moral_scenarios,mmlu_nutrition,mmlu_philosophy,mmlu_prehistory,mmlu_professional_accounting,mmlu_professional_law,mmlu_professional_medicine,mmlu_professional_psychology,mmlu_public_relations,mmlu_security_studies,mmlu_sociology,mmlu_us_foreign_policy,mmlu_virology,mmlu_world_religions,winogrande,gsm8k"
mmlu="mmlu_abstract_algebra,mmlu_anatomy,mmlu_astronomy,mmlu_business_ethics,mmlu_clinical_knowledge,mmlu_college_biology,mmlu_college_chemistry,mmlu_college_computer_science,mmlu_college_mathematics,mmlu_college_medicine,mmlu_college_physics,mmlu_computer_security,mmlu_conceptual_physics,mmlu_econometrics,mmlu_electrical_engineering,mmlu_elementary_mathematics,mmlu_formal_logic,mmlu_global_facts,mmlu_high_school_biology,mmlu_high_school_chemistry,mmlu_high_school_computer_science,mmlu_high_school_european_history,mmlu_high_school_geography,mmlu_high_school_government_and_politics,mmlu_high_school_macroeconomics,mmlu_high_school_mathematics,mmlu_high_school_microeconomics,mmlu_high_school_physics,mmlu_high_school_psychology,mmlu_high_school_statistics,mmlu_high_school_us_history,mmlu_high_school_world_history,mmlu_human_aging,mmlu_human_sexuality,mmlu_international_law,mmlu_jurisprudence,mmlu_logical_fallacies,mmlu_machine_learning,mmlu_management,mmlu_marketing,mmlu_medical_genetics,mmlu_miscellaneous,mmlu_moral_disputes,mmlu_moral_scenarios,mmlu_nutrition,mmlu_philosophy,mmlu_prehistory,mmlu_professional_accounting,mmlu_professional_law,mmlu_professional_medicine,mmlu_professional_psychology,mmlu_public_relations,mmlu_security_studies,mmlu_sociology,mmlu_us_foreign_policy,mmlu_virology,mmlu_world_religions"
heavy="arc_challenge,hellaswag,truthfulqa_mc2,winogrande,gsm8k"
some="mmlu_philosophy,mmlu_anatomy,mmlu_medical_genetics,mmlu_high_school_psychology,mmlu_human_sexuality,mmlu_professional_law,mmlu_moral_disputes,mmlu_virology,mmlu_international_law,mmlu_professional_psychology,mmlu_high_school_world_history,mmlu_professional_medicine,mmlu_professional_accounting,mmlu_miscellaneous,mmlu_us_foreign_policy,mmlu_high_school_chemistry,mmlu_security_studies,mmlu_high_school_european_history,mmlu_sociology,mmlu_high_school_us_history"
one="gsm8k"
# change this if you want a different set of datasets, by default it create everything
keys=$one
Expand Down
4 changes: 2 additions & 2 deletions packages/python/lmeh/utils/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,14 @@ async def save_results(
for result in insert_mongo_results:
bulk_op.append(
UpdateOne(
{'results_data.task_id': result['results_data']['task_id']},
{'result_data.task_id': result['result_data']['task_id']},
{'$set': result},
upsert=True
)
)
bulk_task_op.append(
UpdateOne(
{'_id': result['results_data']['task_id']},
{'_id': result['result_data']['task_id']},
{'$set': {"evaluated": True}},
)
)
Expand Down

0 comments on commit 3c57c76

Please sign in to comment.