iryna-kondr / scikit-llm

Seamlessly integrate LLMs into scikit-learn.
https://beastbyte.ai/
MIT License
2.98k stars 235 forks source link

AttributeError: 'MultiLabelZeroShotGPTClassifier' object has no attribute 'key' #100

Closed hasanhuz closed 3 weeks ago

hasanhuz commented 3 weeks ago

Hi

I got this error "AttributeError: 'MultiLabelZeroShotGPTClassifier' object has no attribute 'key'" while using below code:

from skllm import MultiLabelZeroShotGPTClassifier from skllm.datasets import get_multilabel_classification_dataset

X, y = get_multilabel_classification_dataset()

clf = MultiLabelZeroShotGPTClassifier(max_labels=3) clf.fit(X, y) labels = clf.predict(X)

Thanks,

OKUA1 commented 3 weeks ago

Hi @hasanhuz.

I believe this problem is the same as https://github.com/iryna-kondr/scikit-llm/issues/93, hence I am going to close this issue to track it in one place.

I assume you are using a jupyter notebook. As a short term fix, you can add anything after the last line (e.g. print("done")).