AI4Finance-Foundation / FinGPT

FinGPT: Open-Source Financial Large Language Models! Revolutionize 🔥 We release the trained model on HuggingFace.
https://ai4finance.org
MIT License
12.75k stars 1.81k forks source link

Fine-tuning error. #160

Open rafaepires opened 5 months ago

rafaepires commented 5 months ago

Hey guys,

I'm trying to do finetunning using finGPT. According to the website https://medium.datadriveninvestor.com/introducing-fingpt-forecaster-the-future-of-robo-advisory-services-50add34e3d3c

it takes 2 steps such as: 1- Prepare Data (prepare_data.ipynb) 2- The Training Process (train_lora.py)

Executing the first step (prepare_data.ipynb) generates two folders, one containing the .csv files and the other containing the .json files, as in the image below

Screenshot from 2024-02-08 16-38-10

The problem is in the second step: When executing the train_lora.py file I have the following error AttributeError: 'NoneType' object has no attribute 'strip' , as in the image below

Screenshot from 2024-02-08 16-42-37

I don't know what else to do... please, could someone help me? Many thanks!!

ynjiun commented 5 months ago

this seems the 'answer' is empty. you might want to check prepare data to see if it generates 'answer' at all. did you setup your gpt4 API key correctly? otherwise there is no ground truth answer will be generated.

Weiyao-Li commented 4 months ago

Seems similar to a null pointer exception problem because the object itself does not exist. You should start from this and look for this "empty" object. It is possible that it is not generated at all.

Weiyao-Li commented 4 months ago

https://github.com/AI4Finance-Foundation/FinGPT-Research