deeppavlov / deeppavlov-gsoc-ideas

4 stars 7 forks source link

Implement prod-level default models for GO-pipeline: classifiers, labelers and slotfillers #9

Closed oserikov closed 2 years ago

oserikov commented 3 years ago

difficulty: easy mentor: @oserikov requirements: python, ML useful links: https://docs.deeppavlov.ai/en/master/features/skills/go_bot.html

Even though we hold sota for various NLP tasks in Russian, these are now available as jupyter notebooks. It still fully reproducible with the DP Library+Agent, but it's way too complicated for the end users to manually translate jupyter notebooks to DP components

Coding Challenge

MultiWOZ/other datasets: migrate intent classifiers & slot fillers to Go-Bot architecture

moksh-pathak commented 3 years ago

Hi, I would like to work on this issue

lakshayr31 commented 3 years ago

Hi @oserikov I would like to work on this issue. Could you help me with some steps on how to proceed? Thanking you, Lakshay.

oserikov commented 3 years ago

Hey! I will post some further details here ~ in the next 24hrs

Edith-panda commented 3 years ago

Hii @oserikov I want to work on this issue of this project for GSOC 2021. Could you please guide me on how to begin the contribution.

oserikov commented 3 years ago

Hey @Heisenberg403 @lakshayr31 @Edith-panda ! Great to see you here. I think that goal-oriented bot example notebooks are the best entry to this task: most interesting ones are these using slotfilling and intents classification techniques. You probably will see that they're pretty naive . If you've already familiarized with them, I would suggest you to try to replace these naive components I mentioned with some other models from DP stack to get more familiar with the framework

Edith-panda commented 3 years ago

Hii @oserikov Am I going the right way because I'm beginner so plz do check it and correct me if I'm wrong https://towardsdatascience.com/training-a-goal-oriented-chatbot-with-deep-reinforcement-learning-part-i-introduction-and-dce3af21d383

MRafaydev commented 3 years ago

Hey @oserikov I want to work on this issue, please guide me further what are the next steps and how to proceed.

ShantanuDube commented 3 years ago

Hi @oserikov I am a b.tech undergrad student from India. I would like to have the opportunity of working on this project in GSOC 2021 as it is aligned with my research interests and my experience of working on nlp of 2 years. Kindly suggest how to proceed. Regards Shantanu

ashishsun commented 3 years ago

hello @oserikov I want to contribute in this project. I have done one project earlier in ml. I am new to open source world please guide how to solve my first issue here.

oserikov commented 3 years ago

@Edith-panda , I suggest you to build a bot on top of deeppavlov's Goal-Oriented framework. See the example here: https://github.com/deepmipt/DeepPavlov/blob/master/examples/gobot_md_yaml_configs_tutorial.ipynb

vedantgoswami commented 3 years ago

@oserikov I had gone through your DeepPavlov's GO-bot ipynb and understand the framwork that is been used now can you suggest what we have to do next?

oserikov commented 3 years ago

@vedantgoswami I suggest you to give coding challenge a try. The task here is to take MultiWOz dataset and build intents classifiers and slotfillers using deeppavlov on top of this dataset.

tathagata-raha commented 3 years ago

@oserikov, I went through the MultiWOZ dataset and as I can understand for intent classifiers, we have to train the model on the utterances and the active_intent values. For the slotclassifier, I am not quite sure what has to be done. Like for example in the particular frame below, the entity types are attraction-area and attraction type and the entity values are center and entertainment. But according to here, there shouldn't be a lot of entity types but in this way, the dataset will have a lot of entity types. Also, the BIO tag is not provided. Can you let me know how to proceed with this?

          {
            "actions": [],
            "service": "attraction",
            "slots": [],
            "state": {
              "active_intent": "find_attraction",
              "requested_slots": [],
              "slot_values": {
                "attraction-area": [
                  "centre"
                ],
                "attraction-type": [
                  "entertainment"
                ]
              }
            }
          }

Apart from that, I tried to run the slot filling example in the docs:

from deeppavlov import build_model, configs

PIPELINE_CONFIG_PATH = configs.ner.slotfill_dstc2
slotfill_model = build_model(PIPELINE_CONFIG_PATH, download=True)
slotfill_model(['I would like some chinese food', 'The west part of the city would be nice'])

but ended up getting an error:

/usr/local/lib/python3.7/dist-packages/deeppavlov/core/layers/tf_layers.py in <module>()
     23 log = getLogger(__name__)
     24 
---> 25 INITIALIZER = tf.orthogonal_initializer
     26 
     27 

AttributeError: module 'tensorflow' has no attribute 'orthogonal_initializer'

Searching for this issue, I found this solution here and thus downgraded the version of TensorFlow to 1.14.0 but to no use. I guess the issue lies in named entity recognition because this works fine for DSTC raw.

oserikov commented 3 years ago

@tathagata-raha , you got it right with intents classification. On the slotfilling, could you also provide an utterance related to the json you posted?

And with tf, i strongly believe it will work with tf 1.14 (while actually 1.15.2 is probs better) but you need to ensure that you'd restarted the jupyter runtime after reinstelling tf, bc 2.0 will still be cached otherwise. If this still is a problem, could you share your code with me ? E.g. colab link.

tathagata-raha commented 3 years ago

@oserikov, yeahh I didnt restart the colab runtime and this was getting this error. However, I got a new error. You can check the error here.

You can take a look at the utterance here and here

vedantgoswami commented 3 years ago

Do you need this type of bot please confirm Untitled

aryasoni98 commented 3 years ago

Hey @oserikov I would like to work on this project of GSoC 2021. Could you help me with some steps on how to proceed? Thanking you,

iamPavanKrishna commented 3 years ago

Hi @oserikov I would like to work on this issue. Could you help me with some steps on how to proceed?

Thank you, Pavan.

oserikov commented 3 years ago

@tathagata-raha , well, attraction area, attractoin type and all the alike are not that much, so this will work.

BIO-tags can be restored from text if you tokenize it with the same tokenizer as used by NER model. Then you should just properly label tokens which are mentioned as slot values

oserikov commented 3 years ago

We're starting regular review sessions of your application proposals drafts.

Every Thursday you can submit Google doc with your proposal (remember the limit of 3 final proposals in total), enable commenter access in the provided link. You won't have to re-submit your proposal(s) if the link stays the same.

Proposals should follow our released template

Our mentors will review them and provide feedback on a weekly basis.

GForm for proposals review: https://forms.gle/2PoHAgv9rjR1fuug7

tathagata-raha commented 3 years ago

Hi @oserikov, can you share the link of those jupyter notebooks as mentioned in the issue. Also, if I am correct the task is to convert the notebooks into production level components or DeepPavlov like skills.

oserikov commented 3 years ago

Yeah. Well actually happened to be based on top of the DialoGLUE code (github.com/alexa/DialoGLUE). While the our DialoGlue isn't published yet, guys prefer not to share the code to avoid possible misinterpretation.

oserikov commented 3 years ago

So one could probably take Tripy from dialoGLUE and integrate it into the GO-bot as another NLU mechanism .

rushilpatra commented 3 years ago

hey @oserikov! I would like to work on this project for gsoc 2021.Could you please help me with some steps on how should I begin?

oserikov commented 3 years ago

Hey @rushilpatra ! You should begin with learning what deeppavlov is and what is a goal-oriented bot. Also, take a look at the coding challenge

rushilpatra commented 3 years ago

Hey @oserikov ! I have understood what deeppavlov is and what is a goal oriented bot as well.I have gone through https://docs.deeppavlov.ai/en/master/features/skills/go_bot.html this as well. What should I do next?

lotaa commented 3 years ago

Hi,@oserikov I have understood what is deeppavlov is and what is a goal oriented bot as well. What should I do next?...

oserikov commented 3 years ago

Hey @rushilpatra @lotaa ! You should proceed with building a template deeppavlov GO-bot , which will be trained on MultiWOz data.

oserikov commented 3 years ago

@lotaa, please, re-submit your proposal as a google doc.