But what's happening currently is that it throws KeyError even when passing all the necessary fields required to parse the dataset.
When analyzing using print statements I found that the axolotl.utils.config.validate_config removes some of the fields in ds_cfg[idx]["type"]. It only keeps the field field_system, interestingly it is also the only field that is common with custom SFT dataset types.
So we might have to fix the validator axolotl.utils.config.models.input.v0_4_1.AxolotlInputConfig in order to remove this behavior by forcefully casting custom types to UserDefinedDPOType instead of UserDefinedPrompterType when training type is DPO.
Please let me know if a PR on this would make sense, because I don't know if I'm doing something wrong by missing some important config that is leading to this issue.
Which Operating Systems are you using?
[X] Linux
[ ] macOS
[ ] Windows
Python Version
3.11
axolotl branch-commit
main
Acknowledgements
[X] My issue title is concise, descriptive, and in title casing.
[X] I have searched the existing issues to make sure this bug has not been reported yet.
[X] I am using the latest version of axolotl.
[X] I have provided enough information for the maintainers to reproduce and diagnose the issue.
Please check that this issue hasn't been reported before.
Expected Behavior
When defining a dataset like this, ideally axolotl should apply the custom config.
Current behaviour
But what's happening currently is that it throws
KeyError
even when passing all the necessary fields required to parse the dataset.When analyzing using print statements I found that the
axolotl.utils.config.validate_config
removes some of the fields inds_cfg[idx]["type"]
. It only keeps the fieldfield_system
, interestingly it is also the only field that is common with custom SFT dataset types.Steps to reproduce
Try custom configurations mentioned above.
Config yaml
Possible solution
So we might have to fix the validator
axolotl.utils.config.models.input.v0_4_1.AxolotlInputConfig
in order to remove this behavior by forcefully casting custom types toUserDefinedDPOType
instead ofUserDefinedPrompterType
when training type is DPO.And that is exactly what I did in my fork and it works now -> https://github.com/abhinand5/axolotl/commit/3b0873cc41ef057e7861c6a72ad258ba0d368e84
Please let me know if a PR on this would make sense, because I don't know if I'm doing something wrong by missing some important config that is leading to this issue.
Which Operating Systems are you using?
Python Version
3.11
axolotl branch-commit
main
Acknowledgements