Giter VIP home page Giter VIP logo

skywalker023 / focused-empathy Goto Github PK

View Code? Open in Web Editor NEW
71.0 3.0 4.0 1.21 MB

🤗 Code for our EMNLP 2021 paper: "Perspective-taking and Pragmatics for Generating Empathetic Responses Focused on Emotion Causes"

Home Page: https://aclanthology.org/2021.emnlp-main.170/

License: MIT License

Python 100.00%
nlp conference-paper empathy dialogue-systems chatbot pragmatics perspective-taking dataset deep-learning pytorch

focused-empathy's People

Contributors

bckim92 avatar skywalker023 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

focused-empathy's Issues

AssertionError: Checksum for gee_v1.tar.gz

I was trying to run the "eval_emocause.py", however, I got the following error:

AssertionError: Checksum for gee_v1.tar.gz from
1TEKp3YRowAZju4UPXOSufqzU6j6_Z4wy
does not match the expected checksum:
06d9b640bd7fa92528c6f3f4cd7715db593a0c1d3284151ba7f615f0d9c4989c != af0584e3c376dd364af0bbc122fea7303b9af52556f4dcbb0fbe8d6a136c0b2a

I followed all the instruction, including the environment creating. Not sure where it went wrong.

Btw, I'm really new to the ParlAI. Would you mind to give me some simple instructions for getting the emotional words with GEE?
For example, can I create the agent by using "DisplayModel.main"?
How to use the "reason_emotion_causes" function after creating the agent?

I am looking forward to your reply, many thanks!

How can I see predicted predicted emotion class when I evaluate Blender + Focused S1 to ED dataset?

When I evaluate Blender + Focused S1,
I can see this predicted information from that model.
How can I see predicted emotion class?
I can check emotional words from GEE now.

{'id': 'EmpatheticBlender', 'episode_done': False, 'text':
'that is horrible . i am so sorry to hear that .', 'token_losses': [('did', 3.5072498321533203), ('you', 2.192622184753418), ('suffer', 6.697482109069824), ('any', 0.485431969165802), ('injuries', 1.560391
902923584), ('?', 0.4341753125190735), ('end', 0.1666361540555954), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0),
('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.0), ('null', 0.
0), ('null', 0.0), ('null', 0.0)], 'emotional_words': ['horrifying', 'ran', 'barrels', 'fault', 'survived'], 'metrics': {'loss': AverageMetric(2.149), 'ppl': PPLMetric(8.577), 'token_acc': AverageM
etric(0.5714)}

how to start train

hi,how could i start train?can you support the Instructions for starting training!

Question on EPITOME (Emotional Reaction)

Hello,

First off, thank you for releasing and maintaining your work, it's very clean and things are working nicely, I know it's a lot of work.
I was just curious, my understanding is that EPITOME also has a Emotional Reaction dimension to empathy along with Exploration and Interpretation. Is there a reason that you only use the latter two? Do you have a pre-trained Emotional Reaction model by any chance?

Thank you!

The version of ParlAI?

Dear authors,

Thank you for your amazing work. However, some problems occurred when I tried to use your code:
`Job is running on ps
Traceback (most recent call last):
File "/data/lourenze/ECD/baseline/focused-empathy/parlai/core/params.py", line 852, in add_task_args
agent.add_cmdline_args(self, partial)
│ │ └ {'init_opt': None, 'allow_missing_init_opts': False, 'task': 'tasks.emocause', 'download_path': None, 'loglevel': 'info', 'datat...
│ └ ParlaiParser(prog='eval_emocause.py', usage=None, description='Evaluate a model', formatter_class=<class 'parlai.core.params.Cus...
└ <class 'tasks.emocause.DefaultTeacher'>
TypeError: add_cmdline_args() takes 2 positional arguments but 3 were given

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "eval_emocause.py", line 30, in
opt = parser.parse_args()
└ ParlaiParser(prog='eval_emocause.py', usage=None, description='Evaluate a model', formatter_class=<class 'parlai.core.params.Cus...
File "/data/lourenze/ECD/baseline/focused-empathy/parlai/core/params.py", line 1163, in parse_args
self.add_extra_args(args)
│ └ None
└ ParlaiParser(prog='eval_emocause.py', usage=None, description='Evaluate a model', formatter_class=<class 'parlai.core.params.Cus...
File "/data/lourenze/ECD/baseline/focused-empathy/parlai/core/params.py", line 940, in add_extra_args
self.add_task_args(task, partial)
│ │ └ {'init_opt': None, 'allow_missing_init_opts': False, 'task': 'tasks.emocause', 'download_path': None, 'loglevel': 'info', 'datat...
│ └ 'tasks.emocause'
└ ParlaiParser(prog='eval_emocause.py', usage=None, description='Evaluate a model', formatter_class=<class 'parlai.core.params.Cus...
File "/data/lourenze/ECD/baseline/focused-empathy/parlai/core/params.py", line 859, in add_task_args
) from typ
TypeError: Task 'tasks.emocause' appears to have signature add_cmdline_args(argparser) but we have updated the signature to add_cmdline_args(argparser, partial_opt). For details, see https://github.com/facebookresearch/ParlAI/pull/3328.`

It seems like the ParlAI had updated some signatures for 'add_cmdline_args', as can be seen at:
image

So, my question is what version of ParlAI did your work use? I try to use the latest version and v 1.0.0, it still didn't work.

Best regard

Training Code

Hello, is it possible that you share your code for training both gee model and empathetic dialog? I want to use your model as a baseline for comparison but our school's machines do not have cuda 10.2 (and therefore loading pretrained gee is failing now). I want retrain your model on newer packages (such as newest parlai, torch 1.9, cuda 11 etc) for further use. If there's no training code as well as training instruction, I'm afraid that the comparison will not be fair.

Training code

Is there any code for training the model? Because I cannot find any code that describe about how to train the model using empathicdialogue dataset.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.