Closed Efr0nd closed 10 months ago
And for this line of code:
predictions, labels, metrics = trainer.predict(val_dataset, metric_key_prefix="predict")
I found many 'Nan' in predictions, and the labels is None.
Sorry for the late reply. Have you solved the issue? The csv file has the field 'file' in it. If the 'file' key is not found, could you set a breakpoint after obtaining the val_dataset, https://github.com/TideDancer/interspeech21_emotion/blob/c36dcc0d2bd9a22602c081a5ab064ab5e9d4f019/run_emotion.py#L448, and see if the keys are correct ?
Sorry for the late reply. Have you solved the issue? The csv file has the field 'file' in it. If the 'file' key is not found, could you set a breakpoint after obtaining the val_dataset,
, and see if the keys are correct ?
Thanks for your reply! I will try that.
Sorry for the late reply. Have you solved the issue? The csv file has the field 'file' in it. If the 'file' key is not found, could you set a breakpoint after obtaining the val_dataset, https://github.com/TideDancer/interspeech21_emotion/blob/c36dcc0d2bd9a22602c081a5ab064ab5e9d4f019/run_emotion.py#L448
, and see if the keys are correct ?
Thanks for your reply! I will try that.
Hello, have you solved this problem
Thank you for providing the code! I encountered this issue while running the command 'prediction.sh output/tmp':
_File "run_emotion.py", line 599, in
main()
File "run_emotion.py", line 581, in main
f.write(val_dataset[i]['file'].split("/")[-1] + " " + str(len(val_dataset[i]['inputvalues'])/16000) + " ")
KeyError: 'file'
And I checked the keys of the val_dataset and found only 'input_value'. Why did this happen? After mapping, val_dataset[i] still has the key 'file'. It has truly been troubling me for quite a while.
I would greatly appreciate it if you could answer my question!