Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.
This repository was archived by the owner on Jul 15, 2022. It is now read-only.

Improve error message when the "label" column is missing in the dataset #425

@dcfidalgo

Description

@dcfidalgo

At the moment, if the dataset is missing the "label" column (or whatever column is necessary to train the model) and you want to train the model with it, the error message is:

RuntimeError: The model you are trying to optimize does not contain a 'loss' key in the output of model.forward(inputs).

I think we should catch this failure earlier and print out a more precise error message.

One idea would be to have a bool argument for_training in the Dataset.to_instance method. Depending on this argument, it checks for the necessary columns.
Edit: This idea is actually bull**** since we only call to_instance when we want to create the vocab or train the pipeline ...

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions