{"id":18941143,"url":"https://github.com/gaussalgo/learning_to_learn","last_synced_at":"2026-03-23T15:30:19.876Z","repository":{"id":130589111,"uuid":"544819517","full_name":"gaussalgo/learning_to_learn","owner":"gaussalgo","description":"Training and evaluation testbed for few-shot learners on unseen tasks","archived":false,"fork":false,"pushed_at":"2022-10-03T11:38:57.000Z","size":8966,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-12-31T22:42:10.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaussalgo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-03T09:31:33.000Z","updated_at":"2022-10-03T11:35:44.000Z","dependencies_parsed_at":"2023-03-13T11:15:14.337Z","dependency_job_id":null,"html_url":"https://github.com/gaussalgo/learning_to_learn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaussalgo%2Flearning_to_learn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaussalgo%2Flearning_to_learn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaussalgo%2Flearning_to_learn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaussalgo%2Flearning_to_learn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaussalgo","download_url":"https://codeload.github.com/gaussalgo/learning_to_learn/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239940086,"owners_count":19721968,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T12:26:15.605Z","updated_at":"2026-03-23T15:30:19.836Z","avatar_url":"https://github.com/gaussalgo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Learning to Learn\nTraining and evaluation testbed for few-shot learners on unseen tasks\n\n## Training\n\nTo reproduce the training of our published models, clone this repository and run the following scripts:\n\n```shell\nexport PYTHONPATH=\"${PYTHONPATH}:$(pwd)\"\npip install -r train/requirements.txt\npip install -r evaluation/requirements.txt\n\npython train/train_mt5_qa_en+cs_hard_priming.py\n```\nDon't forget to prepend the execution of the training scripts with GPU configuration (`CUDA_VISIBLE_DEVICES`) or logging configuration allowing you to track the experiment (we use comet.ml, setting `COMET_API_KEY`).\n\n## Evaluation\n\nTo run the evaluation over selected SuperGLUE tasks, you can use `run_evaluator.py` script:\n\n```shell\ncd evaluation\npython run_evaluator.py\n```\nor from python interpreter (working dir `./evaluation`):\n```python\nfrom promptsource.templates import DatasetTemplates\nfrom transformers import AutoModelForSeq2SeqLM, AutoTokenizer\n\nfrom evaluation.tasks.en.superglue import Broadcoverage, BoolQ, WinogradSchema\nfrom evaluator import Evaluator\n\nmodel_path = \"gaussalgo/mt5-base-priming-QA_en-cs\"\n\n\nmodel = AutoModelForSeq2SeqLM.from_pretrained(model_path)\ntokenizer = AutoTokenizer.from_pretrained(model_path)\n\ntemplates = DatasetTemplates(\"super_glue/axb\")\n\ntasks = [\n    Broadcoverage(),\n    BoolQ(),\n    WinogradSchema()\n]\n\n\nevaluator = Evaluator()\nevaluations = evaluator.evaluate(model, tokenizer, tasks, firstn=50)\n\nprint(\"Evaluation done: %s\" % evaluations)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaussalgo%2Flearning_to_learn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaussalgo%2Flearning_to_learn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaussalgo%2Flearning_to_learn/lists"}