-
Notifications
You must be signed in to change notification settings - Fork 488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to support new ICL task types in own codebase #848
Comments
Hey @sanjari-orb, admittedly this is not the most straightforward thing to do at the moment. We're working on some refactors that would make it easier. You will need to make your own copy of I think this is what is required:
(3) Copy the ICL evaluator building function into your modified train.py, and add code to create your Evaluator . To avoid a fork of composer, you may need to copy a bit of code from composer into that function as well.
|
However I want to be able to specify a suite of evaluation tasks, like tasks_light.yaml and add sections like
to my mcli finetuning yaml. Thus, I would like to reuse the preexisting datasets of tasks_light.yaml and add my own to it. I need to have 3rd party dataset-specific evaluations (eg, jeopardy, wikipedia) and this data can look very different from the train/validation split of the training loop. My understanding is that model's eval metrics (
|
The eval metrics on the model are used for all |
But how will the evaluator know that the new metric I introduce should only be computed on data corresponding to my new task, and not all the icl tasks? I thought that was the kind of mapping the following was doing: llm-foundry/llmfoundry/utils/builders.py Lines 213 to 237 in 54cbb8b
|
Ah, in (3) from my original message, you'll be constructing the evaluator yourself, so you can pass the metric name you want. |
I see, got it. I was patching the evaluator building code but wanted to verify if there was another way or not. Thank you for confirming! |
|
Yeah, I was just suggesting that instead of monkeypatching the library itself, you just copy it over to your train.py script, so that you only have to make changes to the launcher script. something like
and sorry, I can't give an ETA on that right now. |
Understood. Thanks a lot! |
Hi, I want to add a custom ICL task type which corresponds to a new ICL metric in my codebase. Currently we have created our own patch of the training entry point file [link].
I was considering monkey patching the code for mapping the new task type to a new metric for this method However I will have to add support for a new DataLoader corresponding to the new ICL task as well.
Is there any recommendation around how I should support new ICL task types? I would prefer to not maintain my own fork of the MosaicML repo is possible.
The text was updated successfully, but these errors were encountered: