Skip to content
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

Causal Classification Problem Type #449

Merged
merged 10 commits into from
Oct 23, 2023
Merged

Causal Classification Problem Type #449

merged 10 commits into from
Oct 23, 2023

Conversation

psinger
Copy link
Collaborator

@psinger psinger commented Oct 16, 2023

New Problem Type for supporting Causal Classification.

Workflow:

  • Answer column contains integer encoder binary or multiclass target
  • Problem Type is Causal Classification Modeling
  • Metrics are AUC and Accuracy
  • Number of classes need to be selected via cfg
  • Pushing to HF and subsequent loading with additional head supported

@psinger psinger marked this pull request as ready for review October 17, 2023 15:46
Copy link
Contributor

@maxjeblick maxjeblick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for adding the classification problem type! The code looks good (I've left some minor comments), and training also works as expected.

As the setup (loss-metric-num classes) is currently manual, I'd suggest to add some sanity checks (that raise an exception) in the code to check for user input errors. At some later point, we can potentially add automatic handling of the settings, based on the input data. I've ran into the following issues:

  • Using a dataset where target values are [1, 2, 3 ,4, 5]. num_classes needs to be set to 6, as they are 0-indexed.
  • Forgot to change metrics/loss accordingly. For metric, experiment will fail at 100%, only.

Apart from that, we probably want to show the predicted class in the validation prediction insights and also add it to validation_predictions.csv.

Some smaller things (can also be addressed later):

  • Tokenized input text also shows the classification label.
  • We probably want to hide the Chat Window (funny conversation though :D )

@psinger
Copy link
Collaborator Author

psinger commented Oct 19, 2023

Thanks @maxjeblick - will address.

I discussed with @pascal-pfeiffer that we can expect here for users to provide the correct inputs, but I agree that exceptions should be more clear.

Copy link
Contributor

@maxjeblick maxjeblick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot for the implementation!

I've left a small comment about ConfigNLPCausalClassificationPrediction, apart from that it looks good!

@psinger psinger merged commit 08475e3 into main Oct 23, 2023
5 checks passed
@psinger psinger deleted the psi/classification branch October 23, 2023 12:59
@samvelkoch
Copy link

Hello. I played a bit with LLM Studio in H20 Aquarium while solving H2O predict LLM Competition. Models fine-tuned for Casual Classification Problems have no classification_head.pth in downloaded or pushed to HF model files. Any ideas what I have missed in the settings or why that issue happens? Thank you!

@maxjeblick
Copy link
Contributor

Hi, @samvelkoch, I'll have a look into this.
Could you create a new issue for better tracking? Thanks!

@samvelkoch
Copy link

Hi, @samvelkoch, I'll have a look into this. Could you create a new issue for better tracking? Thanks!

Thanks for quick reply. I've published it here since I'm not sure that it is a real issue or just my lack of experience with LLM Studio. Could you please check? I'll publish an issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants