LIN-SHANG / InstructERC

The offical realization of InstructERC
121 stars 7 forks source link

demonstration_short function not find #4

Closed linlongrd closed 9 months ago

linlongrd commented 10 months ago

Hi, I saw this module "Demonstration Retrieval" when reading the related paper, but I didn't check the module code in the repo. I found the function "demonstration_short" in line 82 of data_process.py. However, there is no definition. May I ask where is the "Demonstration Retrieval" module implemented in the repo?

LIN-SHANG commented 10 months ago

Thanks for your attention! As stated in README.md, due to Meituan's code review process, the repo of demonstration retrieval will not be released recently, I am trying my best to negotiate with my mentor... However, for the some part of the implementation of this module, you can refer to the following link: https://github.com/UKPLab/sentence-transformers. The number of implementation lines for the entire demonstration retrieval will not exceed 50 lines.

linlongrd commented 10 months ago

So the data_process.py code doesn't work because the demonstration_short function is undefined?

linlongrd commented 10 months ago

Therefore, in this repo, the training data that is finally sent to LLM fine-tuning is not realized in the Demonstration Retrieval module. However, when I run the data_process_mixed.py code, the data in the end has something like "target": "fear", so it replaces the Demonstration Retrieval module.

LIN-SHANG commented 10 months ago

I'm not quite sure what issue you're encountering, so let me explain my code folder. The files train_andinference(Mixed, Plain, Uni.sh) represent three different types of experiments. 'Mixed' refers to the experiments done with the final unified label mapping, 'Plain' refers to the experiments completed without the instructERC architecture, and 'Uni' refers to the experiments with lora, full-parameter tuning, speaker identification, and demons (not uploaded yet due to the code review).

In 'Uni', without speaker identification, the shell file first processes the original dataset using data_process.py, which then creates an initial data file ready to be inputted into the LLM. This data file includes the instructions, historical window, label statement, and demons (not uploaded), as well as the labels for the corresponding samples. The "target":"fear" you mentioned should be the label for an individual sample. If you want to implement demonstration retrieval, you can supplement and implement this in data_process.py. The shell file then initiates the LLM with the parameters you specified and starts the training process.

If you choose the speaker identification task, then before all these steps, there will be a process where you train and save the model parameters for speaker identification. After completing this process, the subsequent steps are the same as before.

LIN-SHANG commented 10 months ago

all my code can be reconstructed and conducted , which has been check by an another researcher in ERC, maybe some parameters just don't be set fine in the train_andinference*.sh, leading to your bugs.

linlongrd commented 10 months ago

many thx your feedback

linlongrd commented 10 months ago

another question about the repo of demonstration retrieval, Was it trained, or was it fine-tuned from your own data set?

LIN-SHANG commented 10 months ago

As stated in my paper, it wasn't trained from our own data set, we just used it.