Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some code problems #1

Open
txy77 opened this issue Jul 17, 2023 · 9 comments
Open

some code problems #1

txy77 opened this issue Jul 17, 2023 · 9 comments

Comments

@txy77
Copy link

txy77 commented Jul 17, 2023

When I run bash codex_expmt_folder_runner.sh runs /codex/mw21_1p_train/python, it seems that I get the error.
image

@kingb12
Copy link
Collaborator

kingb12 commented Jul 17, 2023

Hi @txy77 !

I'm not at a computer now so I'll have to double check soon, but you'll want to make sure you run this from the directory which contains setup.cfg:

pip install -e .

This should install everything in src/refpydst as a module refpydst and fix the import issues.

Hope this helps!
Brendan

@txy77
Copy link
Author

txy77 commented Jul 17, 2023 via email

@txy77
Copy link
Author

txy77 commented Jul 18, 2023

Hey guy! I'm sorry to bother you again, but I wanted to ask how to handle this error.

image

@kingb12
Copy link
Collaborator

kingb12 commented Jul 23, 2023

Hi @txy77 ! Sorry for the delayed response. You'll probably need to follow the steps here to download and prepare the data. Specifically:

cd data
python create_data.py --main_dir mwz21 --mwz_ver 2.1 --target_path mwz2.1  # for MultiWOZ 2.1
python create_data.py --main_dir mwz24 --mwz_ver 2.4 --target_path mwz2.4  # for MultiWOZ 2.4
bash preprocess.sh
python sample.py --input_fn mwz2.1/train_dials.json --target_fn mw21_5p_train_seed0.json --ratio 0.05 --seed 0
bash download_mw23.sh
python build_coref_only_dataset.py

If you have already done that, I would make sure you set the environment variable for the data directory, like so:

export REFPYDST_DATA_DIR="/absolute/path/to/data"

Or from within the ./data directory:

export REFPYDST_DATA_DIR="`pwd`"

Hope this helps!

@txy77
Copy link
Author

txy77 commented Jul 24, 2023 via email

@txy77
Copy link
Author

txy77 commented Sep 6, 2023

image
image
There will still be some issues with this. What is the 'retriever_dir' needed on this side?

@kingb12
Copy link
Collaborator

kingb12 commented Sep 6, 2023

Hi! retriever_dir an argument needed to run the Codex runs, pointing to the directory containing the relevant trained retriever (e.g. the directory contents you'd get from saving a sentence-transformer after fine-tuning, as is done here.

It looks like the argument is defined, but the path does not exist. I had written some helper code that might be getting in the way here. In the run I pre-defined, retriever_dir is given as a relative path, which is relative to REFPYDST_OUTPUTS_DIR. To resolve you do one of these:

  • Change the run argument in .json file to the absolute path to the fine-tuned retriever OR
  • Set REFPYDST_OUTPUTS_DIR environment variable to point to the base output directory you used, so that when they are joined as done here, you get the same path.

Sorry you ran into this, this file-path parsing pattern was useful in my experiments but I probably should have simplified for the code release

@txy77
Copy link
Author

txy77 commented Sep 7, 2023

I am very interested in your work on "Diverse Retrieval-Augmented In-Context Learning for Dialogue State Tracking." I would like to know the following details:

  1. When evaluating JGA, did you use the FuzzyWuzzy library, and is a similarity score of 90 considered a threshold for considering a slot value match?
  2. In the zero-shot experiments, did you use "use_gold," which means evaluating the predicted dialogue state against the dialogue state from the previous turn?
    image

@kingb12
Copy link
Collaborator

kingb12 commented Sep 7, 2023

Hi!

  1. Sort of, the answer is slightly complicated but covered in Appendix A and a README in src/refpydst/normalization. In short:
    1. We take a raw predicted value for a slot like hotel-name: acron guest house, which may reflect typos in the dialogue.

    2. We use the original database released w/ MultiWOZ and fuzzy matching to try to find a matching entity name in the DB. This is done using the class defined in ontology.py, and would produce something like hotel-name: acorn guest house

    3. In the real-world, finding the DB entity is all you need to do, but MultiWOZ gold annotations use non-canonical surface forms of their own (not matching the DB entity name). So we take the canonical name and map back to the most frequently observed surface form in whatever labelled data is available for that experimental setting (none for zero-shot), as well as ontology.json (following its use in prior works for fair comparison). This whole process produces a 'normalized parse' from a 'raw parse' for a DST prediction. So if the annotations that we have available for training generally use hotel-name: the acorn guest house, we would return that instead of its true DB name.

    4. The final evaluation uses exact value match on the normalized parse as in prior work
      We chose to do this as many prior works use hand-crafted typo fixes and value replacements that imply knowledge of common typos in the dialogue data, and we wanted something more robust that was precise about the system/label knowledge it used. In Table 4 we also apply our normalization approach to the strongest baseline for fair comparison

  2. No, we evaluated under the same approach as the few-shot experiments, such that values in Table 1 and Table 3 are directly comparable, except for stated changes in % training data and model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants