From a471f4ed1fb6e1bd26c0a18429d3a311a6e82a6e Mon Sep 17 00:00:00 2001 From: zqwerty <zhuq96@hotmail.com> Date: Wed, 30 Nov 2022 10:45:37 +0800 Subject: [PATCH] replace azure hosted model to hugging face hub --- convlab/deploy/dep_config.json | 4 ++-- convlab/dst/comer/multiwoz/comer.py | 4 ++-- convlab/dst/comer/multiwoz/function.py | 2 +- convlab/dst/mdbt/multiwoz/dst.py | 2 +- convlab/dst/sumbt/multiwoz/sumbt.py | 4 ++-- convlab/dst/trade/crosswoz/trade.py | 4 ++-- convlab/dst/trade/crosswoz/train.py | 2 +- convlab/dst/trade/multiwoz/trade.py | 4 ++-- convlab/dst/trade/multiwoz/train.py | 2 +- convlab/e2e/damd/multiwoz/damd.py | 4 ++-- convlab/e2e/rnn_rollout/deal_or_not/README.md | 2 +- convlab/e2e/rnn_rollout/deal_or_not/model.py | 4 ++-- convlab/e2e/sequicity/camrest/README.md | 4 ++-- convlab/e2e/sequicity/camrest/sequicity.py | 6 +++--- convlab/e2e/sequicity/multiwoz/README.md | 4 ++-- convlab/e2e/sequicity/multiwoz/sequicity.py | 6 +++--- convlab/laug/Text_Paraphrasing/Text_Paraphrasing.py | 2 +- convlab/nlg/scgpt/multiwoz/scgpt.py | 2 +- convlab/nlg/sclstm/camrest/README.md | 2 +- convlab/nlg/sclstm/camrest/sc_lstm.py | 2 +- convlab/nlg/sclstm/crosswoz/sc_lstm.py | 2 +- convlab/nlg/sclstm/multiwoz/README.md | 2 +- convlab/nlg/sclstm/multiwoz/sc_lstm.py | 2 +- convlab/nlu/jointBERT/crosswoz/README.md | 4 ++-- convlab/nlu/jointBERT/crosswoz/nlu.py | 4 ++-- convlab/nlu/jointBERT/multiwoz/README.md | 4 ++-- convlab/nlu/jointBERT/multiwoz/nlu.py | 4 ++-- convlab/nlu/milu/multiwoz/nlu.py | 4 ++-- convlab/nlu/svm/camrest/README.md | 6 +++--- convlab/nlu/svm/camrest/nlu.py | 8 ++++---- convlab/nlu/svm/multiwoz/README.md | 6 +++--- convlab/nlu/svm/multiwoz/nlu.py | 8 ++++---- convlab/policy/dqn/dqn.py | 2 +- convlab/policy/dqn/multiwoz/dqn_policy.py | 2 +- convlab/policy/gdpl/gdpl.py | 2 +- convlab/policy/gdpl/multiwoz/README.md | 2 +- convlab/policy/gdpl/multiwoz/gdpl_policy.py | 2 +- convlab/policy/hdsa/multiwoz/hdsa.py | 2 +- convlab/policy/larl/multiwoz/larl.py | 2 +- convlab/policy/mdrg/multiwoz/auto_download.py | 6 +++--- convlab/policy/mdrg/multiwoz/utils/dbPointer.py | 6 +++--- convlab/policy/mdrg/multiwoz/utils/dbquery.py | 6 +++--- convlab/policy/mle/mle.py | 4 ++-- convlab/policy/pg/multiwoz/README.md | 2 +- convlab/policy/pg/multiwoz/pg_policy.py | 2 +- convlab/policy/pg/pg.py | 2 +- convlab/policy/ppo/multiwoz/README.md | 2 +- convlab/policy/ppo/multiwoz/ppo_policy.py | 2 +- convlab/policy/rule/multiwoz/policy_agenda_multiwoz.py | 4 ++-- convlab/policy/vhus/camrest/vhus.py | 2 +- convlab/policy/vhus/multiwoz/README.md | 2 +- convlab/policy/vhus/multiwoz/vhus.py | 2 +- .../test_BERTNLU-RuleDST-DQNPolicy-TemplateNLG.py | 2 +- .../test_BERTNLU-RuleDST-GDPLPolicy-TemplateNLG.py | 2 +- examples/agent_examples/test_BERTNLU-RuleDST-HDSA.py | 2 +- examples/agent_examples/test_BERTNLU-RuleDST-LaRL.py | 2 +- examples/agent_examples/test_BERTNLU-RuleDST-MDRG.py | 2 +- .../test_BERTNLU-RuleDST-MLEPolicy-TemplateNLG.py | 2 +- .../test_BERTNLU-RuleDST-PGPolicy-TemplateNLG.py | 2 +- .../test_BERTNLU-RuleDST-PPOPolicy-TemplateNLG.py | 2 +- .../test_BERTNLU-RuleDST-RulePolicy-SCLSTM.py | 2 +- .../test_BERTNLU-RuleDST-RulePolicy-TemplateNLG.py | 2 +- .../agent_examples/test_COMER_RulePolicy_TemplateNLG.py | 2 +- examples/agent_examples/test_DAMD.py | 2 +- examples/agent_examples/test_LAVA.py | 2 +- .../agent_examples/test_MDBT_RulePolicy_TemplateNLG.py | 2 +- .../test_MILU-RuleDST-RulePolicy-TemplateNLG.py | 2 +- examples/agent_examples/test_NLG_end2end.py | 2 +- examples/agent_examples/test_SUMBT-LaRL.py | 2 +- .../test_SVMNLU-RuleDST-RulePolicy-TemplateNLG.py | 2 +- examples/agent_examples/test_Sequicity.py | 2 +- .../agent_examples/test_TRADE_RulePolicy_TemplateNLG.py | 2 +- examples/agent_examples/test_end2end.py | 2 +- tutorials/Train_RL_Policies/lava_train.py | 2 +- tutorials/Train_RL_Policies/lava_train_TUS.py | 2 +- 75 files changed, 111 insertions(+), 111 deletions(-) diff --git a/convlab/deploy/dep_config.json b/convlab/deploy/dep_config.json index 5b0bea7a..b9cb0b67 100755 --- a/convlab/deploy/dep_config.json +++ b/convlab/deploy/dep_config.json @@ -33,7 +33,7 @@ "ini_params": { "mode": "all", "config_file": "crosswoz_all.json", - "model_file": "https://convlab.blob.core.windows.net/convlab-2/bert_crosswoz_all.zip" + "model_file": "https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_crosswoz_all.zip" }, "model_name": "bert-cro", "max_core": 1, @@ -46,7 +46,7 @@ "ini_params": { "mode": "all", "config_file": "multiwoz_all.json", - "model_file": "https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_all.zip" + "model_file": "https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_all.zip" }, "model_name": "bert-mul", "max_core": 1, diff --git a/convlab/dst/comer/multiwoz/comer.py b/convlab/dst/comer/multiwoz/comer.py index 4ec56814..598c1bb0 100755 --- a/convlab/dst/comer/multiwoz/comer.py +++ b/convlab/dst/comer/multiwoz/comer.py @@ -44,8 +44,8 @@ def revert_state(model_output:dict, reversed_vocab:dict): class ComerTracker(DST): - def __init__(self, model_file='https://convlab.blob.core.windows.net/convlab-2/comer.zip', - embed_file='https://convlab.blob.core.windows.net/convlab-2/comer_embed.zip'): + def __init__(self, model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/comer.zip', + embed_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/comer_embed.zip'): super().__init__() parser = argparse.ArgumentParser(description='predict.py') parser.add_argument('-config', default='config.yaml', type=str, diff --git a/convlab/dst/comer/multiwoz/function.py b/convlab/dst/comer/multiwoz/function.py index ac376794..9999d950 100755 --- a/convlab/dst/comer/multiwoz/function.py +++ b/convlab/dst/comer/multiwoz/function.py @@ -107,7 +107,7 @@ class ComerTracker(DST): self.state = None self.init_session() - def download_data(self, data_url="https://convlab.blob.core.windows.net/convlab-2/comer.zip"): + def download_data(self, data_url="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/comer.zip"): """Automatically download the pretrained model and necessary data.""" if os.path.exists(os.path.join(self.multiwoz_root, 'data/mwoz2_dm.dict')) and \ os.path.exists(os.path.join(self.multiwoz_root, 'data/mwoz2_sl.dict')) and \ diff --git a/convlab/dst/mdbt/multiwoz/dst.py b/convlab/dst/mdbt/multiwoz/dst.py index 78218e3e..84d79b1e 100755 --- a/convlab/dst/mdbt/multiwoz/dst.py +++ b/convlab/dst/mdbt/multiwoz/dst.py @@ -28,7 +28,7 @@ class MultiWozMDBT(MDBT): if data is None: loader = AgentDSTDataloader(MultiWOZDataloader()) data = loader.load_data() - self.file_url = 'https://convlab.blob.core.windows.net/convlab-2/mdbt_multiwoz_sys.zip' + self.file_url = 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdbt_multiwoz_sys.zip' local_path = os.path.dirname(os.path.abspath(__file__)) self.data_dir = os.path.join(local_path, data_dir) # abstract data path diff --git a/convlab/dst/sumbt/multiwoz/sumbt.py b/convlab/dst/sumbt/multiwoz/sumbt.py index bb9da7b1..506ea358 100755 --- a/convlab/dst/sumbt/multiwoz/sumbt.py +++ b/convlab/dst/sumbt/multiwoz/sumbt.py @@ -75,7 +75,7 @@ class SUMBTTracker(DST): """ - def __init__(self, data_dir=DATA_PATH, model_file='https://convlab.blob.core.windows.net/convlab-2/sumbt.tar.gz', eval_slots=multiwoz_slot_list): + def __init__(self, data_dir=DATA_PATH, model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sumbt.tar.gz', eval_slots=multiwoz_slot_list): DST.__init__(self) @@ -153,7 +153,7 @@ class SUMBTTracker(DST): # model_file = os.path.join(DOWNLOAD_DIRECTORY, 'pytorch_model.zip') # if not os.path.isfile(model_file): - model_file = 'https://convlab.blob.core.windows.net/convlab-2/sumbt.tar.gz' + model_file = 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sumbt.tar.gz' import tarfile if not os.path.isfile(os.path.join(DOWNLOAD_DIRECTORY, 'pytorch_model.bin')): diff --git a/convlab/dst/trade/crosswoz/trade.py b/convlab/dst/trade/crosswoz/trade.py index 68c38193..d2dcc8aa 100755 --- a/convlab/dst/trade/crosswoz/trade.py +++ b/convlab/dst/trade/crosswoz/trade.py @@ -108,7 +108,7 @@ class CrossWOZTRADE(TRADE, nn.Module): def init_session(self): self.state = default_state() - def download_model(self, model_url="https://convlab.blob.core.windows.net/convlab-2/trade_crosswoz_model.zip"): + def download_model(self, model_url="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/trade_crosswoz_model.zip"): """Automatically download the pretrained model and necessary data.""" if os.path.exists(os.path.join(self.crosswoz_root, 'model/TRADE-multiwozdst')): return @@ -134,7 +134,7 @@ class CrossWOZTRADE(TRADE, nn.Module): print('unzipping model file ...') zip_ref.extractall(model_dir) - def download_data(self, data_url="https://convlab.blob.core.windows.net/convlab-2/trade_crosswoz_data.zip"): + def download_data(self, data_url="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/trade_crosswoz_data.zip"): """Automatically download the pretrained model and necessary data.""" if os.path.exists(os.path.join(self.crosswoz_root, 'data/crosswoz')) and \ os.path.exists(os.path.join(self.crosswoz_root, 'data/dev_dials.json')): diff --git a/convlab/dst/trade/crosswoz/train.py b/convlab/dst/trade/crosswoz/train.py index 41291094..ffbf374e 100755 --- a/convlab/dst/trade/crosswoz/train.py +++ b/convlab/dst/trade/crosswoz/train.py @@ -16,7 +16,7 @@ python train.py ''' -def download_data(data_url="https://convlab.blob.core.windows.net/convlab-2/trade_crosswoz_data.zip"): +def download_data(data_url="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/trade_crosswoz_data.zip"): """Automatically download the pretrained model and necessary data.""" crosswoz_root = os.path.dirname(os.path.abspath(__file__)) if os.path.exists(os.path.join(crosswoz_root, 'data/crosswoz')) and \ diff --git a/convlab/dst/trade/multiwoz/trade.py b/convlab/dst/trade/multiwoz/trade.py index cbc6e8ec..11bbf28e 100755 --- a/convlab/dst/trade/multiwoz/trade.py +++ b/convlab/dst/trade/multiwoz/trade.py @@ -116,7 +116,7 @@ class MultiWOZTRADE(TRADE, nn.Module): def init_session(self): self.state = default_state() - def download_model(self, model_url="https://convlab.blob.core.windows.net/convlab-2/trade_multiwoz_model.zip"): + def download_model(self, model_url="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/trade_multiwoz_model.zip"): """Automatically download the pretrained model and necessary data.""" if os.path.exists(os.path.join(self.multiwoz_root, 'model/TRADE-multiwozdst')): return @@ -143,7 +143,7 @@ class MultiWOZTRADE(TRADE, nn.Module): print('unzipping model file ...') zip_ref.extractall(model_dir) - def download_data(self, data_url="https://convlab.blob.core.windows.net/convlab-2/trade_multiwoz_data.zip"): + def download_data(self, data_url="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/trade_multiwoz_data.zip"): """Automatically download the pretrained model and necessary data.""" if os.path.exists(os.path.join(self.multiwoz_root, 'data/multi-woz')) and \ os.path.exists(os.path.join(self.multiwoz_root, 'data/dev_dials.json')): diff --git a/convlab/dst/trade/multiwoz/train.py b/convlab/dst/trade/multiwoz/train.py index b5e1b01d..cf8eb9ba 100755 --- a/convlab/dst/trade/multiwoz/train.py +++ b/convlab/dst/trade/multiwoz/train.py @@ -17,7 +17,7 @@ python train.py ''' -def download_data(data_url="https://convlab.blob.core.windows.net/convlab-2/trade_multiwoz_data.zip"): +def download_data(data_url="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/trade_multiwoz_data.zip"): """Automatically download the pretrained model and necessary data.""" multiwoz_root = os.path.dirname(os.path.abspath(__file__)) if os.path.exists(os.path.join(multiwoz_root, 'data/multi-woz')) and \ diff --git a/convlab/e2e/damd/multiwoz/damd.py b/convlab/e2e/damd/multiwoz/damd.py index 0bba5814..3f105390 100755 --- a/convlab/e2e/damd/multiwoz/damd.py +++ b/convlab/e2e/damd/multiwoz/damd.py @@ -16,8 +16,8 @@ from convlab.e2e.damd.multiwoz.ontology import eos_tokens from convlab.dialog_agent import Agent DEFAULT_DIRECTORY = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -DEFAULT_ARCHIVE_FILE_URL = "https://convlab.blob.core.windows.net/convlab-2/damd_multiwoz_data.zip" -DEFAULT_MODEL_URL = "https://convlab.blob.core.windows.net/convlab-2/damd_multiwoz.zip" +DEFAULT_ARCHIVE_FILE_URL = "https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/damd_multiwoz_data.zip" +DEFAULT_MODEL_URL = "https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/damd_multiwoz.zip" class Damd(Agent): def __init__(self, diff --git a/convlab/e2e/rnn_rollout/deal_or_not/README.md b/convlab/e2e/rnn_rollout/deal_or_not/README.md index 95692a21..a693ef69 100755 --- a/convlab/e2e/rnn_rollout/deal_or_not/README.md +++ b/convlab/e2e/rnn_rollout/deal_or_not/README.md @@ -12,7 +12,7 @@ license when using the code and datasets. ## Data preparation To use this model, you have to first download the pre-trained models -from [here](https://convlab.blob.core.windows.net/convlab-2/rnnrollout_dealornot.zip), and put the *.th +from [here](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/rnnrollout_dealornot.zip), and put the *.th files under ```convlab/e2e/rnn_rullout/deal_or_not/configs```. ## Run the Model diff --git a/convlab/e2e/rnn_rollout/deal_or_not/model.py b/convlab/e2e/rnn_rollout/deal_or_not/model.py index 08b079fc..5263af8a 100755 --- a/convlab/e2e/rnn_rollout/deal_or_not/model.py +++ b/convlab/e2e/rnn_rollout/deal_or_not/model.py @@ -12,7 +12,7 @@ import shutil class DealornotAgent(RNNRolloutAgent): """The Rnn Rollout model for DealorNot dataset.""" def __init__(self, name, args, sel_args, train=False, diverse=False, max_total_len=100, - model_url='https://convlab.blob.core.windows.net/convlab-2/rnnrollout_dealornot.zip'): + model_url='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/rnnrollout_dealornot.zip'): self.config_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'configs') self.file_url = model_url @@ -75,7 +75,7 @@ def get_context_generator(context_file): # os.path.exists(os.path.join(config_path, 'selection_model_state_dict.th')): # exit() # models_dir = os.path.join(config_path, 'models') -# file_url = 'https://convlab.blob.core.windows.net/convlab-2/rnnrollout_dealornot.zip' +# file_url = 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/rnnrollout_dealornot.zip' # cached_path(file_url, models_dir) # files = os.listdir(models_dir) # target_file = '' diff --git a/convlab/e2e/sequicity/camrest/README.md b/convlab/e2e/sequicity/camrest/README.md index 9b55faad..a10a856a 100755 --- a/convlab/e2e/sequicity/camrest/README.md +++ b/convlab/e2e/sequicity/camrest/README.md @@ -11,7 +11,7 @@ We adapt the code from [github](https://github.com/WING-NUS/sequicity) to work i ### Prepare data -Download [data](https://convlab.blob.core.windows.net/convlab-2/sequicity_camrest_data.zip) and unzip here. +Download [data](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_camrest_data.zip) and unzip here. ### Training with default parameters @@ -36,7 +36,7 @@ $ python model.py -mode rl -model camrest -cfg camrest/configs/camrest.json ### Trained model -Trained model can be download on [here](https://convlab.blob.core.windows.net/convlab-2/sequicity_camrest.zip). Place it under `output` dir. +Trained model can be download on [here](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_camrest.zip). Place it under `output` dir. ### Predict diff --git a/convlab/e2e/sequicity/camrest/sequicity.py b/convlab/e2e/sequicity/camrest/sequicity.py index da819d20..38614a19 100755 --- a/convlab/e2e/sequicity/camrest/sequicity.py +++ b/convlab/e2e/sequicity/camrest/sequicity.py @@ -25,8 +25,8 @@ from convlab.dialog_agent import Agent # DEFAULT_CUDA_DEVICE = -1 DEFAULT_DIRECTORY = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEFAULT_CONFIG_FILE = os.path.join(DEFAULT_DIRECTORY, "camrest/configs/camrest.json") -DEFAULT_ARCHIVE_FILE_URL = "https://convlab.blob.core.windows.net/convlab-2/sequicity_camrest_data.zip" -DEFAULT_MODEL_URL = "https://convlab.blob.core.windows.net/convlab-2/sequicity_camrest.zip" +DEFAULT_ARCHIVE_FILE_URL = "https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_camrest_data.zip" +DEFAULT_MODEL_URL = "https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_camrest.zip" def denormalize(uttr): @@ -44,7 +44,7 @@ class Sequicity(Agent): Args: model_file (str): - trained model path or url. default="https://convlab.blob.core.windows.net/convlab-2/sequicity_camrest.zip" + trained model path or url. default="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_camrest.zip" Example: sequicity = Sequicity() diff --git a/convlab/e2e/sequicity/multiwoz/README.md b/convlab/e2e/sequicity/multiwoz/README.md index b91b8be3..c2538661 100755 --- a/convlab/e2e/sequicity/multiwoz/README.md +++ b/convlab/e2e/sequicity/multiwoz/README.md @@ -11,7 +11,7 @@ We adapt the code from [github](https://github.com/WING-NUS/sequicity) to work i ### Prepare data -Download [data](https://convlab.blob.core.windows.net/convlab-2/sequicity_multiwoz_data.zip) and unzip here. +Download [data](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_multiwoz_data.zip) and unzip here. ### Training with default parameters @@ -36,7 +36,7 @@ $ python model.py -mode rl -model multiwoz -cfg multiwoz/configs/multiwoz.json ### Trained model -Trained model can be download on [here](https://convlab.blob.core.windows.net/convlab-2/sequicity_multiwoz.zip). Place it under `output` dir. +Trained model can be download on [here](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_multiwoz.zip). Place it under `output` dir. ### Predict diff --git a/convlab/e2e/sequicity/multiwoz/sequicity.py b/convlab/e2e/sequicity/multiwoz/sequicity.py index 30017b20..1e50904d 100755 --- a/convlab/e2e/sequicity/multiwoz/sequicity.py +++ b/convlab/e2e/sequicity/multiwoz/sequicity.py @@ -26,8 +26,8 @@ from convlab.dialog_agent import Agent # DEFAULT_CUDA_DEVICE = -1 DEFAULT_DIRECTORY = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DEFAULT_CONFIG_FILE = os.path.join(DEFAULT_DIRECTORY, "multiwoz/configs/multiwoz.json") -DEFAULT_ARCHIVE_FILE_URL = "https://convlab.blob.core.windows.net/convlab-2/sequicity_multiwoz_data.zip" -DEFAULT_MODEL_URL = "https://convlab.blob.core.windows.net/convlab-2/sequicity_multiwoz.zip" +DEFAULT_ARCHIVE_FILE_URL = "https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_multiwoz_data.zip" +DEFAULT_MODEL_URL = "https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_multiwoz.zip" def denormalize(uttr): @@ -46,7 +46,7 @@ class Sequicity(Agent): Args: model_file (str): - trained model path or url. default="https://convlab.blob.core.windows.net/convlab-2/sequicity_multiwoz.zip" + trained model path or url. default="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/sequicity_multiwoz.zip" Example: sequicity = Sequicity() diff --git a/convlab/laug/Text_Paraphrasing/Text_Paraphrasing.py b/convlab/laug/Text_Paraphrasing/Text_Paraphrasing.py index 961692f3..3b24968f 100644 --- a/convlab/laug/Text_Paraphrasing/Text_Paraphrasing.py +++ b/convlab/laug/Text_Paraphrasing/Text_Paraphrasing.py @@ -6,7 +6,7 @@ class Text_Paraphrasing: if dataset=='multiwoz': self.model=SCGPT() if dataset=='frames': - self.model=SCGPT(model_file='https://convlab.blob.core.windows.net/convlab-2/nlg-gpt-frames.zip') + self.model=SCGPT(model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/nlg-gpt-frames.zip') self.model.init_session() def aug(self,text,span_info): t=span2tuple(span_info) diff --git a/convlab/nlg/scgpt/multiwoz/scgpt.py b/convlab/nlg/scgpt/multiwoz/scgpt.py index 2c4b1021..304e97e9 100644 --- a/convlab/nlg/scgpt/multiwoz/scgpt.py +++ b/convlab/nlg/scgpt/multiwoz/scgpt.py @@ -19,7 +19,7 @@ class SCGPT(NLG): # If no filename is mentioned then set to default if not model_file: if is_user: - model_file = 'https://convlab.blob.core.windows.net/convlab-2/nlg-gpt-multiwoz.zip' + model_file = 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/nlg-gpt-multiwoz.zip' else: model_file = 'https://zenodo.org/record/5767426/files/neo_scgpt_system.zip' diff --git a/convlab/nlg/sclstm/camrest/README.md b/convlab/nlg/sclstm/camrest/README.md index 1961cee0..9e74c0e0 100755 --- a/convlab/nlg/sclstm/camrest/README.md +++ b/convlab/nlg/sclstm/camrest/README.md @@ -11,7 +11,7 @@ The code derives from [github](https://github.com/andy194673/nlg-sclstm-multiwoz ### Prepare the data -unzip [zip](https://convlab.blob.core.windows.net/convlab-2/nlg_sclstm_camrest.zip) here +unzip [zip](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/nlg_sclstm_camrest.zip) here ### Train diff --git a/convlab/nlg/sclstm/camrest/sc_lstm.py b/convlab/nlg/sclstm/camrest/sc_lstm.py index 52085df8..4fd4e5fa 100755 --- a/convlab/nlg/sclstm/camrest/sc_lstm.py +++ b/convlab/nlg/sclstm/camrest/sc_lstm.py @@ -43,7 +43,7 @@ class SCLSTM(NLG): archive_file=DEFAULT_ARCHIVE_FILE, use_cuda=False, is_user=False, - model_file='https://convlab.blob.core.windows.net/convlab-2/nlg_sclstm_camrest.zip'): + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/nlg_sclstm_camrest.zip'): if not os.path.isfile(archive_file): if not model_file: diff --git a/convlab/nlg/sclstm/crosswoz/sc_lstm.py b/convlab/nlg/sclstm/crosswoz/sc_lstm.py index 993b531e..439576e9 100755 --- a/convlab/nlg/sclstm/crosswoz/sc_lstm.py +++ b/convlab/nlg/sclstm/crosswoz/sc_lstm.py @@ -45,7 +45,7 @@ class SCLSTM(NLG): archive_file=DEFAULT_ARCHIVE_FILE, use_cuda=False, is_user=False, - model_file='https://convlab.blob.core.windows.net/convlab-2/nlg_sclstm_crosswoz.zip'): + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/nlg_sclstm_crosswoz.zip'): if not os.path.isfile(archive_file): if not model_file: diff --git a/convlab/nlg/sclstm/multiwoz/README.md b/convlab/nlg/sclstm/multiwoz/README.md index 19dd7350..b530dc1a 100755 --- a/convlab/nlg/sclstm/multiwoz/README.md +++ b/convlab/nlg/sclstm/multiwoz/README.md @@ -11,7 +11,7 @@ The code derives from [github](https://github.com/andy194673/nlg-sclstm-multiwoz ### Prepare the data -unzip [zip](https://convlab.blob.core.windows.net/convlab-2/nlg_sclstm_multiwoz.zip) here +unzip [zip](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/nlg_sclstm_multiwoz.zip) here ### Train diff --git a/convlab/nlg/sclstm/multiwoz/sc_lstm.py b/convlab/nlg/sclstm/multiwoz/sc_lstm.py index 7cfb6a65..54a225b9 100755 --- a/convlab/nlg/sclstm/multiwoz/sc_lstm.py +++ b/convlab/nlg/sclstm/multiwoz/sc_lstm.py @@ -43,7 +43,7 @@ class SCLSTM(NLG): archive_file=DEFAULT_ARCHIVE_FILE, use_cuda=False, is_user=False, - model_file='https://convlab.blob.core.windows.net/convlab-2/nlg_sclstm_multiwoz.zip', + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/nlg_sclstm_multiwoz.zip', unk_suppress=False): if not os.path.isfile(archive_file): diff --git a/convlab/nlu/jointBERT/crosswoz/README.md b/convlab/nlu/jointBERT/crosswoz/README.md index 022cc437..d0abd133 100755 --- a/convlab/nlu/jointBERT/crosswoz/README.md +++ b/convlab/nlu/jointBERT/crosswoz/README.md @@ -56,9 +56,9 @@ We have trained two models: one use context information (last 3 utterances)(`con Models can be download form: -Without context: https://convlab.blob.core.windows.net/convlab-2/bert_crosswoz_all.zip +Without context: https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_crosswoz_all.zip -With context: https://convlab.blob.core.windows.net/convlab-2/bert_crosswoz_all_context.zip +With context: https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_crosswoz_all_context.zip diff --git a/convlab/nlu/jointBERT/crosswoz/nlu.py b/convlab/nlu/jointBERT/crosswoz/nlu.py index 3716a359..4b58c9f0 100755 --- a/convlab/nlu/jointBERT/crosswoz/nlu.py +++ b/convlab/nlu/jointBERT/crosswoz/nlu.py @@ -13,7 +13,7 @@ from convlab.nlu.jointBERT.crosswoz.preprocess import preprocess class BERTNLU(NLU): def __init__(self, mode='all', config_file='crosswoz_all_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_crosswoz_all_context.zip'): + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_crosswoz_all_context.zip'): assert mode == 'usr' or mode == 'sys' or mode == 'all' config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'configs/{}'.format(config_file)) config = json.load(open(config_file)) @@ -77,5 +77,5 @@ class BERTNLU(NLU): if __name__ == '__main__': nlu = BERTNLU(mode='all', config_file='crosswoz_all_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_crosswoz_all_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_crosswoz_all_context.zip') print(nlu.predict("北京布提克精品酒店酒店是什么类型,有健身房吗?", ['你好,给我推荐一个评分是5分,价格在100-200元的酒店。', '推荐您去北京布提克精品酒店。'])) diff --git a/convlab/nlu/jointBERT/multiwoz/README.md b/convlab/nlu/jointBERT/multiwoz/README.md index 5e576b8b..20206b67 100755 --- a/convlab/nlu/jointBERT/multiwoz/README.md +++ b/convlab/nlu/jointBERT/multiwoz/README.md @@ -56,9 +56,9 @@ We have trained two models: one use context information (`configs/multiwoz_all_c Models can be download form: -Without context: https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_all.zip +Without context: https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_all.zip -With context: https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_all_context.zip +With context: https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_all_context.zip diff --git a/convlab/nlu/jointBERT/multiwoz/nlu.py b/convlab/nlu/jointBERT/multiwoz/nlu.py index 1373919e..eb776fca 100755 --- a/convlab/nlu/jointBERT/multiwoz/nlu.py +++ b/convlab/nlu/jointBERT/multiwoz/nlu.py @@ -19,7 +19,7 @@ from spacy.symbols import ORTH, LEMMA, POS class BERTNLU(NLU): def __init__(self, mode='all', config_file='multiwoz_all_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_all_context.zip'): + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_all_context.zip'): assert mode == 'usr' or mode == 'sys' or mode == 'all' self.mode = mode config_file = os.path.join(os.path.dirname( @@ -122,7 +122,7 @@ class BERTNLU(NLU): if __name__ == '__main__': text = "How about rosa's bed and breakfast ? Their postcode is cb22ha." nlu = BERTNLU(mode='all', config_file='multiwoz_all_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_all_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_all_context.zip') print(nlu.predict(text)) # text = "I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant.I don't care about the Price of the restaurant." # print(nlu.predict(text)) diff --git a/convlab/nlu/milu/multiwoz/nlu.py b/convlab/nlu/milu/multiwoz/nlu.py index cf7c2195..f6312c01 100755 --- a/convlab/nlu/milu/multiwoz/nlu.py +++ b/convlab/nlu/milu/multiwoz/nlu.py @@ -28,7 +28,7 @@ class MILU(NLU): def __init__(self, archive_file=DEFAULT_ARCHIVE_FILE, cuda_device=DEFAULT_CUDA_DEVICE, - model_file="https://convlab.blob.core.windows.net/convlab-2/new_milu(20200922)_multiwoz_all_context.tar.gz", + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/new_milu(20200922)_multiwoz_all_context.tar.gz", context_size=3): """ Constructor for NLU class. """ @@ -88,7 +88,7 @@ class MILU(NLU): if __name__ == "__main__": - nlu = MILU(model_file="https://convlab.blob.core.windows.net/convlab-2/milu.tar.gz") + nlu = MILU(model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/milu.tar.gz") test_contexts = [ "SENT_END", "SENT_END", diff --git a/convlab/nlu/svm/camrest/README.md b/convlab/nlu/svm/camrest/README.md index 64993664..474b7a21 100755 --- a/convlab/nlu/svm/camrest/README.md +++ b/convlab/nlu/svm/camrest/README.md @@ -33,9 +33,9 @@ The model will be saved on `model/svm_camrest_[mode].pickle`. Also, it will be z Trained models can be download on: -- Trained on all data: [mode=all](https://convlab.blob.core.windows.net/convlab-2/svm_camrest_all.zip) -- Trained on user utterances only: [mode=usr](https://convlab.blob.core.windows.net/convlab-2/svm_camrest_usr.zip) -- Trained on system utterances only: [mode=sys](https://convlab.blob.core.windows.net/convlab-2/svm_multiwoz_usr.zip) +- Trained on all data: [mode=all](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_camrest_all.zip) +- Trained on user utterances only: [mode=usr](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_camrest_usr.zip) +- Trained on system utterances only: [mode=sys](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_multiwoz_usr.zip) #### Evaluate diff --git a/convlab/nlu/svm/camrest/nlu.py b/convlab/nlu/svm/camrest/nlu.py index e5a8ceb7..66c6d3fc 100755 --- a/convlab/nlu/svm/camrest/nlu.py +++ b/convlab/nlu/svm/camrest/nlu.py @@ -4,9 +4,9 @@ For more information, please refer to ``convlab/nlu/svm/camrest/README.md`` Trained models can be download on: -- https://convlab.blob.core.windows.net/convlab-2/svm_camrest_all.zip -- https://convlab.blob.core.windows.net/convlab-2/svm_camrest_sys.zip -- https://convlab.blob.core.windows.net/convlab-2/svm_camrest_usr.zip +- https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_camrest_all.zip +- https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_camrest_sys.zip +- https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_camrest_usr.zip Reference: @@ -34,7 +34,7 @@ class SVMNLU(NLU): nlu = SVMNLU(mode='usr') """ assert mode == 'usr' or mode == 'sys' or mode == 'all' - model_file = 'https://convlab.blob.core.windows.net/convlab-2/svm_camrest_{}.zip'.format(mode) + model_file = 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_camrest_{}.zip'.format(mode) config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'configs/camrest_{}.cfg'.format(mode)) self.config = configparser.ConfigParser() self.config.read(config_file) diff --git a/convlab/nlu/svm/multiwoz/README.md b/convlab/nlu/svm/multiwoz/README.md index a0363e35..f2a9c50b 100755 --- a/convlab/nlu/svm/multiwoz/README.md +++ b/convlab/nlu/svm/multiwoz/README.md @@ -33,9 +33,9 @@ The model will be saved on `model/svm_multiwoz_[mode].pickle`. Also, it will be Trained models can be download on: -- Trained on all data: [mode=all](https://convlab.blob.core.windows.net/convlab-2/svm_multiwoz_all.zip) -- Trained on user utterances only: [mode=usr](https://convlab.blob.core.windows.net/convlab-2/svm_multiwoz_usr.zip) -- Trained on system utterances only: [mode=sys](https://convlab.blob.core.windows.net/convlab-2/svm_multiwoz_usr.zip) +- Trained on all data: [mode=all](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_multiwoz_all.zip) +- Trained on user utterances only: [mode=usr](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_multiwoz_usr.zip) +- Trained on system utterances only: [mode=sys](https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_multiwoz_usr.zip) #### Evaluate diff --git a/convlab/nlu/svm/multiwoz/nlu.py b/convlab/nlu/svm/multiwoz/nlu.py index 3ac21509..4695777f 100755 --- a/convlab/nlu/svm/multiwoz/nlu.py +++ b/convlab/nlu/svm/multiwoz/nlu.py @@ -4,9 +4,9 @@ For more information, please refer to ``convlab/nlu/svm/multiwoz/README.md`` Trained models can be download on: -- https://convlab.blob.core.windows.net/convlab-2/svm_multiwoz_all.zip -- https://convlab.blob.core.windows.net/convlab-2/svm_multiwoz_sys.zip -- https://convlab.blob.core.windows.net/convlab-2/svm_multiwoz_usr.zip +- https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_multiwoz_all.zip +- https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_multiwoz_sys.zip +- https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_multiwoz_usr.zip Reference: @@ -34,7 +34,7 @@ class SVMNLU(NLU): nlu = SVMNLU(mode='all') """ assert mode == 'usr' or mode == 'sys' or mode == 'all' - model_file = 'https://convlab.blob.core.windows.net/convlab-2/svm_multiwoz_{}.zip'.format(mode) + model_file = 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/svm_multiwoz_{}.zip'.format(mode) config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'configs/multiwoz_{}.cfg'.format(mode)) self.config = configparser.ConfigParser() self.config.read(config_file) diff --git a/convlab/policy/dqn/dqn.py b/convlab/policy/dqn/dqn.py index ff808e4e..eca90f53 100644 --- a/convlab/policy/dqn/dqn.py +++ b/convlab/policy/dqn/dqn.py @@ -179,7 +179,7 @@ class DQN(Policy): @classmethod def from_pretrained(cls, archive_file="", - model_file="https://convlab.blob.core.windows.net/convlab-2/dqn_policy_multiwoz.zip", + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/dqn_policy_multiwoz.zip", is_train=False, dataset='Multiwoz'): with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: diff --git a/convlab/policy/dqn/multiwoz/dqn_policy.py b/convlab/policy/dqn/multiwoz/dqn_policy.py index c8fab2c9..313fe524 100644 --- a/convlab/policy/dqn/multiwoz/dqn_policy.py +++ b/convlab/policy/dqn/multiwoz/dqn_policy.py @@ -7,7 +7,7 @@ class DQNPolicy(DQN): is_train=False, dataset="Multiwoz", archive_file="", - model_file="https://convlab.blob.core.windows.net/convlab-2/dqn_policy_multiwoz.zip"): + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/dqn_policy_multiwoz.zip"): super().__init__(is_train=is_train, dataset=dataset) with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: cfg = json.load(f) diff --git a/convlab/policy/gdpl/gdpl.py b/convlab/policy/gdpl/gdpl.py index eacf80ef..9931aa57 100755 --- a/convlab/policy/gdpl/gdpl.py +++ b/convlab/policy/gdpl/gdpl.py @@ -271,7 +271,7 @@ class GDPL(Policy): @classmethod def from_pretrained(cls, archive_file="", - model_file="https://convlab.blob.core.windows.net/convlab-2/gdpl_policy_multiwoz.zip", + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/gdpl_policy_multiwoz.zip", is_train=False, dataset='Multiwoz'): with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: diff --git a/convlab/policy/gdpl/multiwoz/README.md b/convlab/policy/gdpl/multiwoz/README.md index c79fdc71..a4ddac1d 100755 --- a/convlab/policy/gdpl/multiwoz/README.md +++ b/convlab/policy/gdpl/multiwoz/README.md @@ -32,7 +32,7 @@ Performance: The model can be downloaded from: -https://convlab.blob.core.windows.net/convlab-2/gdpl_policy_multiwoz.zip +https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/gdpl_policy_multiwoz.zip ## Reference diff --git a/convlab/policy/gdpl/multiwoz/gdpl_policy.py b/convlab/policy/gdpl/multiwoz/gdpl_policy.py index f7f82fd6..a3fdd1fa 100755 --- a/convlab/policy/gdpl/multiwoz/gdpl_policy.py +++ b/convlab/policy/gdpl/multiwoz/gdpl_policy.py @@ -7,7 +7,7 @@ class GDPLPolicy(GDPL): is_train=False, dataset='Multiwoz', archive_file="", - model_file="https://convlab.blob.core.windows.net/convlab-2/gdpl_policy_multiwoz.zip"): + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/gdpl_policy_multiwoz.zip"): super().__init__(is_train=is_train, dataset=dataset) with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: cfg = json.load(f) diff --git a/convlab/policy/hdsa/multiwoz/hdsa.py b/convlab/policy/hdsa/multiwoz/hdsa.py index 6335fa8c..2d2e941a 100755 --- a/convlab/policy/hdsa/multiwoz/hdsa.py +++ b/convlab/policy/hdsa/multiwoz/hdsa.py @@ -10,7 +10,7 @@ DEFAULT_ARCHIVE_FILE = os.path.join(DEFAULT_DIRECTORY, "hdsa.zip") class HDSA(Policy): - def __init__(self, archive_file=DEFAULT_ARCHIVE_FILE, model_file="https://convlab.blob.core.windows.net/convlab-2/hdsa.zip", use_cuda=False): + def __init__(self, archive_file=DEFAULT_ARCHIVE_FILE, model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/hdsa.zip", use_cuda=False): self.predictor = HDSA_predictor(archive_file, model_file, use_cuda) self.generator = HDSA_generator(archive_file, model_file, use_cuda) diff --git a/convlab/policy/larl/multiwoz/larl.py b/convlab/policy/larl/multiwoz/larl.py index 207be827..f98e948c 100755 --- a/convlab/policy/larl/multiwoz/larl.py +++ b/convlab/policy/larl/multiwoz/larl.py @@ -238,7 +238,7 @@ class LaRL(Policy): def __init__(self, archive_file=DEFAULT_ARCHIVE_FILE, cuda_device=DEFAULT_CUDA_DEVICE, - model_file="https://convlab.blob.core.windows.net/convlab-2/larl.zip"): + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/larl.zip"): if not os.path.isfile(archive_file): if not model_file: diff --git a/convlab/policy/mdrg/multiwoz/auto_download.py b/convlab/policy/mdrg/multiwoz/auto_download.py index 6533ae50..4c3d9503 100755 --- a/convlab/policy/mdrg/multiwoz/auto_download.py +++ b/convlab/policy/mdrg/multiwoz/auto_download.py @@ -11,9 +11,9 @@ def auto_download(): db_path = os.path.join(os.path.dirname(__file__), 'db') root_path = os.path.dirname(__file__) - urls = {model_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_model.zip', - data_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_data.zip', - db_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_db.zip'} + urls = {model_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_model.zip', + data_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_data.zip', + db_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_db.zip'} for path in [model_path, data_path, db_path]: if not os.path.exists(path): diff --git a/convlab/policy/mdrg/multiwoz/utils/dbPointer.py b/convlab/policy/mdrg/multiwoz/utils/dbPointer.py index 4f4cbf39..efa49e2b 100755 --- a/convlab/policy/mdrg/multiwoz/utils/dbPointer.py +++ b/convlab/policy/mdrg/multiwoz/utils/dbPointer.py @@ -13,9 +13,9 @@ def auto_download(): db_path = os.path.join(os.path.dirname(__file__), os.pardir, 'db') root_path = os.path.join(os.path.dirname(__file__), os.pardir) - urls = {model_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_model.zip', - data_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_data.zip', - db_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_db.zip'} + urls = {model_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_model.zip', + data_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_data.zip', + db_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_db.zip'} for path in [model_path, data_path, db_path]: if not os.path.exists(path): diff --git a/convlab/policy/mdrg/multiwoz/utils/dbquery.py b/convlab/policy/mdrg/multiwoz/utils/dbquery.py index 6e791101..10cd1845 100755 --- a/convlab/policy/mdrg/multiwoz/utils/dbquery.py +++ b/convlab/policy/mdrg/multiwoz/utils/dbquery.py @@ -11,9 +11,9 @@ def auto_download(): db_path = os.path.join(os.path.dirname(__file__), os.pardir, 'db') root_path = os.path.join(os.path.dirname(__file__), os.pardir) - urls = {model_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_model.zip', - data_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_data.zip', - db_path: 'https://convlab.blob.core.windows.net/convlab-2/mdrg_db.zip'} + urls = {model_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_model.zip', + data_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_data.zip', + db_path: 'https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mdrg_db.zip'} for path in [model_path, data_path, db_path]: if not os.path.exists(path): diff --git a/convlab/policy/mle/mle.py b/convlab/policy/mle/mle.py index 5dbfe113..ee7fafb4 100755 --- a/convlab/policy/mle/mle.py +++ b/convlab/policy/mle/mle.py @@ -88,7 +88,7 @@ class MLE(MLEAbstract): @classmethod def from_pretrained(cls, archive_file=DEFAULT_ARCHIVE_FILE, - model_file='https://convlab.blob.core.windows.net/convlab-2/mle_policy_multiwoz.zip'): + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mle_policy_multiwoz.zip'): with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: cfg = json.load(f) model = cls() @@ -99,7 +99,7 @@ class MLE(MLEAbstract): class MLEPolicy(MLE): def __init__(self, archive_file=DEFAULT_ARCHIVE_FILE, - model_file='https://convlab.blob.core.windows.net/convlab-2/mle_policy_multiwoz.zip'): + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/mle_policy_multiwoz.zip'): super().__init__() if model_file: with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: diff --git a/convlab/policy/pg/multiwoz/README.md b/convlab/policy/pg/multiwoz/README.md index 921838af..d6461616 100755 --- a/convlab/policy/pg/multiwoz/README.md +++ b/convlab/policy/pg/multiwoz/README.md @@ -30,7 +30,7 @@ Performance: The model can be downloaded from: -https://convlab.blob.core.windows.net/convlab-2/pg_policy_multiwoz.zip +https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/pg_policy_multiwoz.zip ## Reference diff --git a/convlab/policy/pg/multiwoz/pg_policy.py b/convlab/policy/pg/multiwoz/pg_policy.py index 12c95048..5a090786 100755 --- a/convlab/policy/pg/multiwoz/pg_policy.py +++ b/convlab/policy/pg/multiwoz/pg_policy.py @@ -4,7 +4,7 @@ import json class PGPolicy(PG): def __init__(self, is_train=False, dataset='Multiwoz', archive_file="", - model_file="https://convlab.blob.core.windows.net/convlab-2/pg_policy_multiwoz.zip"): + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/pg_policy_multiwoz.zip"): super().__init__(is_train=is_train, dataset=dataset) with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: cfg = json.load(f) diff --git a/convlab/policy/pg/pg.py b/convlab/policy/pg/pg.py index dd47f44f..060be694 100755 --- a/convlab/policy/pg/pg.py +++ b/convlab/policy/pg/pg.py @@ -203,7 +203,7 @@ class PG(Policy): @classmethod def from_pretrained(cls, archive_file="", - model_file="https://convlab.blob.core.windows.net/convlab-2/pg_policy_multiwoz.zip"): + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/pg_policy_multiwoz.zip"): with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: cfg = json.load(f) model = cls() diff --git a/convlab/policy/ppo/multiwoz/README.md b/convlab/policy/ppo/multiwoz/README.md index 648b7479..ea6560cb 100755 --- a/convlab/policy/ppo/multiwoz/README.md +++ b/convlab/policy/ppo/multiwoz/README.md @@ -32,7 +32,7 @@ Performance: The model can be downloaded from: -https://convlab.blob.core.windows.net/convlab-2/ppo_policy_multiwoz.zip +https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/ppo_policy_multiwoz.zip ## Reference diff --git a/convlab/policy/ppo/multiwoz/ppo_policy.py b/convlab/policy/ppo/multiwoz/ppo_policy.py index 42e3b353..d8ebcf5e 100755 --- a/convlab/policy/ppo/multiwoz/ppo_policy.py +++ b/convlab/policy/ppo/multiwoz/ppo_policy.py @@ -6,7 +6,7 @@ class PPOPolicy(PPO): def __init__(self, is_train=False, dataset='Multiwoz', archive_file="", - model_file="https://convlab.blob.core.windows.net/convlab-2/ppo_policy_multiwoz.zip" + model_file="https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/ppo_policy_multiwoz.zip" ): super().__init__(is_train=is_train, dataset=dataset) with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: diff --git a/convlab/policy/rule/multiwoz/policy_agenda_multiwoz.py b/convlab/policy/rule/multiwoz/policy_agenda_multiwoz.py index a1b372f5..625fbb9f 100755 --- a/convlab/policy/rule/multiwoz/policy_agenda_multiwoz.py +++ b/convlab/policy/rule/multiwoz/policy_agenda_multiwoz.py @@ -983,7 +983,7 @@ if __name__ == '__main__': # sys_agent = PipelineAgent(sys_nlu, sys_dst, sys_policy, sys_nlg, name='sys') # user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - # model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + # model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # user_dst = None # user_policy = RulePolicy(character='usr') # user_nlg = TemplateNLG(is_user=True) @@ -1002,7 +1002,7 @@ if __name__ == '__main__': dst = RuleDST() # # user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - # model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + # model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # goal_generator = GoalGenerator() # while True: diff --git a/convlab/policy/vhus/camrest/vhus.py b/convlab/policy/vhus/camrest/vhus.py index d0403592..65a6568b 100755 --- a/convlab/policy/vhus/camrest/vhus.py +++ b/convlab/policy/vhus/camrest/vhus.py @@ -16,7 +16,7 @@ class UserPolicyVHUS(UserPolicyVHUSAbstract): def __init__(self, archive_file=DEFAULT_ARCHIVE_FILE, - model_file='https://convlab.blob.core.windows.net/convlab-2/vhus_simulator_camrest.zip'): + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/vhus_simulator_camrest.zip'): with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: config = json.load(f) manager = UserDataManager() diff --git a/convlab/policy/vhus/multiwoz/README.md b/convlab/policy/vhus/multiwoz/README.md index a0c23a0a..1b3a6f1d 100755 --- a/convlab/policy/vhus/multiwoz/README.md +++ b/convlab/policy/vhus/multiwoz/README.md @@ -31,7 +31,7 @@ Performance: The model can be downloaded from: -https://convlab.blob.core.windows.net/convlab-2/vhus_simulator_multiwoz.zip +https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/vhus_simulator_multiwoz.zip ## Reference diff --git a/convlab/policy/vhus/multiwoz/vhus.py b/convlab/policy/vhus/multiwoz/vhus.py index 85cd999e..fc582bab 100755 --- a/convlab/policy/vhus/multiwoz/vhus.py +++ b/convlab/policy/vhus/multiwoz/vhus.py @@ -18,7 +18,7 @@ class UserPolicyVHUS(UserPolicyVHUSAbstract): def __init__(self, load_from_zip=False, archive_file=DEFAULT_ARCHIVE_FILE, - model_file='https://convlab.blob.core.windows.net/convlab-2/vhus_simulator_multiwoz.zip'): + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/vhus_simulator_multiwoz.zip'): with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'config.json'), 'r') as f: config = json.load(f) manager = UserDataManager() diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-DQNPolicy-TemplateNLG.py b/examples/agent_examples/test_BERTNLU-RuleDST-DQNPolicy-TemplateNLG.py index 03c8b3e2..33611888 100644 --- a/examples/agent_examples/test_BERTNLU-RuleDST-DQNPolicy-TemplateNLG.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-DQNPolicy-TemplateNLG.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-GDPLPolicy-TemplateNLG.py b/examples/agent_examples/test_BERTNLU-RuleDST-GDPLPolicy-TemplateNLG.py index f6527305..f722a85c 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-GDPLPolicy-TemplateNLG.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-GDPLPolicy-TemplateNLG.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-HDSA.py b/examples/agent_examples/test_BERTNLU-RuleDST-HDSA.py index 0b0e35ad..984c1f05 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-HDSA.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-HDSA.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-LaRL.py b/examples/agent_examples/test_BERTNLU-RuleDST-LaRL.py index b394c9ae..b2683737 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-LaRL.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-LaRL.py @@ -56,7 +56,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-MDRG.py b/examples/agent_examples/test_BERTNLU-RuleDST-MDRG.py index 21b2b8ff..c2637a3a 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-MDRG.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-MDRG.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-MLEPolicy-TemplateNLG.py b/examples/agent_examples/test_BERTNLU-RuleDST-MLEPolicy-TemplateNLG.py index 935ded7d..f9b8fe27 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-MLEPolicy-TemplateNLG.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-MLEPolicy-TemplateNLG.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-PGPolicy-TemplateNLG.py b/examples/agent_examples/test_BERTNLU-RuleDST-PGPolicy-TemplateNLG.py index 8eff5789..72455ed7 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-PGPolicy-TemplateNLG.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-PGPolicy-TemplateNLG.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-PPOPolicy-TemplateNLG.py b/examples/agent_examples/test_BERTNLU-RuleDST-PPOPolicy-TemplateNLG.py index 309dd4f3..a6d8713c 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-PPOPolicy-TemplateNLG.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-PPOPolicy-TemplateNLG.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-RulePolicy-SCLSTM.py b/examples/agent_examples/test_BERTNLU-RuleDST-RulePolicy-SCLSTM.py index d9f48546..aac3ee71 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-RulePolicy-SCLSTM.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-RulePolicy-SCLSTM.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_BERTNLU-RuleDST-RulePolicy-TemplateNLG.py b/examples/agent_examples/test_BERTNLU-RuleDST-RulePolicy-TemplateNLG.py index 31f9ca26..51d666ba 100755 --- a/examples/agent_examples/test_BERTNLU-RuleDST-RulePolicy-TemplateNLG.py +++ b/examples/agent_examples/test_BERTNLU-RuleDST-RulePolicy-TemplateNLG.py @@ -56,7 +56,7 @@ def test_end2end(seed=20200202, n_dialogues=1000): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_COMER_RulePolicy_TemplateNLG.py b/examples/agent_examples/test_COMER_RulePolicy_TemplateNLG.py index 4db45060..6ed81508 100755 --- a/examples/agent_examples/test_COMER_RulePolicy_TemplateNLG.py +++ b/examples/agent_examples/test_COMER_RulePolicy_TemplateNLG.py @@ -57,7 +57,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_DAMD.py b/examples/agent_examples/test_DAMD.py index e1f47d2a..dd5b128d 100755 --- a/examples/agent_examples/test_DAMD.py +++ b/examples/agent_examples/test_DAMD.py @@ -55,7 +55,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_LAVA.py b/examples/agent_examples/test_LAVA.py index d5b592c2..4172ef5a 100755 --- a/examples/agent_examples/test_LAVA.py +++ b/examples/agent_examples/test_LAVA.py @@ -72,7 +72,7 @@ def test_end2end(args, model_dir): elif args.dst_type=="trippy": sys_dst = TRIPPY(model_type='roberta', model_path='/gpfs/project/lubis/convlab-2/pre-trained-models/trippy-checkpoint-10647', - nlu_path='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_all_context.zip') + nlu_path='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_all_context.zip') elif args.dst_type=="setsumbt": sys_dst = SetSUMBTTracker(model_type='roberta', model_path='/gpfs/project/lubis/convlab-2/pre-trained-models/end2') diff --git a/examples/agent_examples/test_MDBT_RulePolicy_TemplateNLG.py b/examples/agent_examples/test_MDBT_RulePolicy_TemplateNLG.py index 388f8332..f7f42c17 100755 --- a/examples/agent_examples/test_MDBT_RulePolicy_TemplateNLG.py +++ b/examples/agent_examples/test_MDBT_RulePolicy_TemplateNLG.py @@ -55,7 +55,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_MILU-RuleDST-RulePolicy-TemplateNLG.py b/examples/agent_examples/test_MILU-RuleDST-RulePolicy-TemplateNLG.py index fbe8f082..c869b3f0 100755 --- a/examples/agent_examples/test_MILU-RuleDST-RulePolicy-TemplateNLG.py +++ b/examples/agent_examples/test_MILU-RuleDST-RulePolicy-TemplateNLG.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_NLG_end2end.py b/examples/agent_examples/test_NLG_end2end.py index a1b0e0c0..67039fcc 100644 --- a/examples/agent_examples/test_NLG_end2end.py +++ b/examples/agent_examples/test_NLG_end2end.py @@ -57,7 +57,7 @@ def test_end2end(seed=20200202, n_dialogues=1000, nlg='TemplateNLG'): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_SUMBT-LaRL.py b/examples/agent_examples/test_SUMBT-LaRL.py index 6c8cea06..3f2e9a28 100755 --- a/examples/agent_examples/test_SUMBT-LaRL.py +++ b/examples/agent_examples/test_SUMBT-LaRL.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_SVMNLU-RuleDST-RulePolicy-TemplateNLG.py b/examples/agent_examples/test_SVMNLU-RuleDST-RulePolicy-TemplateNLG.py index 5158532b..5dbf7d68 100755 --- a/examples/agent_examples/test_SVMNLU-RuleDST-RulePolicy-TemplateNLG.py +++ b/examples/agent_examples/test_SVMNLU-RuleDST-RulePolicy-TemplateNLG.py @@ -54,7 +54,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_Sequicity.py b/examples/agent_examples/test_Sequicity.py index 8d1bbfab..49eb7c7a 100755 --- a/examples/agent_examples/test_Sequicity.py +++ b/examples/agent_examples/test_Sequicity.py @@ -55,7 +55,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_TRADE_RulePolicy_TemplateNLG.py b/examples/agent_examples/test_TRADE_RulePolicy_TemplateNLG.py index a67e6fb0..2afe0894 100755 --- a/examples/agent_examples/test_TRADE_RulePolicy_TemplateNLG.py +++ b/examples/agent_examples/test_TRADE_RulePolicy_TemplateNLG.py @@ -55,7 +55,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/examples/agent_examples/test_end2end.py b/examples/agent_examples/test_end2end.py index 5b0ad3f6..38e144f8 100755 --- a/examples/agent_examples/test_end2end.py +++ b/examples/agent_examples/test_end2end.py @@ -60,7 +60,7 @@ def test_end2end(): # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='usr') # user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - # model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + # model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = RuleDST() # user_dst = None diff --git a/tutorials/Train_RL_Policies/lava_train.py b/tutorials/Train_RL_Policies/lava_train.py index 3ccf8a6d..ff6d823a 100755 --- a/tutorials/Train_RL_Policies/lava_train.py +++ b/tutorials/Train_RL_Policies/lava_train.py @@ -260,7 +260,7 @@ if __name__ == '__main__': ##USER## # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # rule policy diff --git a/tutorials/Train_RL_Policies/lava_train_TUS.py b/tutorials/Train_RL_Policies/lava_train_TUS.py index 3eee925a..22a1f96b 100755 --- a/tutorials/Train_RL_Policies/lava_train_TUS.py +++ b/tutorials/Train_RL_Policies/lava_train_TUS.py @@ -279,7 +279,7 @@ if __name__ == '__main__': ##USER## # BERT nlu trained on sys utterance user_nlu = BERTNLU(mode='sys', config_file='multiwoz_sys_context.json', - model_file='https://convlab.blob.core.windows.net/convlab-2/bert_multiwoz_sys_context.zip') + model_file='https://huggingface.co/ConvLab/ConvLab-2_models/resolve/main/bert_multiwoz_sys_context.zip') # not use dst user_dst = None # specify the user config -- GitLab