Giter Site home page Giter Site logo

RULEDST evaluation about convlab-2 HOT 9 OPEN

IreneSucameli avatar IreneSucameli commented on August 9, 2024
RULEDST evaluation

from convlab-2.

Comments (9)

zqwerty avatar zqwerty commented on August 9, 2024

We did not evaluate the rule DST solely since it needs dialog acts as input. If you want to compare rule DST with other DST models, you may use the golden dialog acts as input or use an NLU model such as BERTNLU to parse both user and system acts.

from convlab-2.

IreneSucameli avatar IreneSucameli commented on August 9, 2024

I would like to use the output of BERTNLU as the input for the dst; however, it is not clear for me how to pass the data from one module to another, and I haven't find any code for that in convlab, for the moment.

Could you kindly link the convlab's page where this is described, or provide me more information about this process?

from convlab-2.

zqwerty avatar zqwerty commented on August 9, 2024

You can refer to the Colab tutorial or the interface class for nlu and dst. You can see PipelineAgent for how to build an agent with modules. Example usage:
https://github.com/thu-coai/ConvLab-2/blob/master/tests/test_BERTNLU-RuleDST-RulePolicy-TemplateNLG.py

from convlab-2.

IreneSucameli avatar IreneSucameli commented on August 9, 2024

Thank you for the info. Nevertheless, the Colab tutorial refers to an overall evaluation (nlu + dst+ nlg).
What if I would like to evaluate the nlu+dst only, in order to analyze if the defined rules are ok or need some improvements? Is that possible? Thanks again

from convlab-2.

zqwerty avatar zqwerty commented on August 9, 2024

Sure. Just feed the output of NLU to DST:

self.input_action = self.nlu.predict(observation, context=[x[1] for x in self.history[:-1]])
else:
self.input_action = observation
self.input_action = deepcopy(self.input_action) # get rid of reference problem
# get state
if self.dst is not None:
if self.name is 'sys':
self.dst.state['user_action'] = self.input_action
else:
self.dst.state['system_action'] = self.input_action
state = self.dst.update(self.input_action)

from convlab-2.

IreneSucameli avatar IreneSucameli commented on August 9, 2024

From the code you posted it doesn't seem that the module is evaluated with F1 scores or a similar measure... perhaps I don't understand your point...

from convlab-2.

zqwerty avatar zqwerty commented on August 9, 2024

Sorry, I thought you need instruction about how to pass the output of NLU to DST. If you want to evaluate NLU+DST, you can write a script to: 1) read the original data; 2) pass utterances to NLU to get the user dialog acts; 3) pass user dialog acts to RuleDST to get predicted state; 4) compare predictions with references

from convlab-2.

zqwerty avatar zqwerty commented on August 9, 2024

refer to https://github.com/thu-coai/ConvLab-2/blob/master/convlab2/dst/evaluate.py for dst metric

from convlab-2.

IreneSucameli avatar IreneSucameli commented on August 9, 2024

Ok, thanks, I'll try in this way!

from convlab-2.

Related Issues (20)

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.