facebookresearch / TaBERT

This repository contains source code for the TaBERT model, a pre-trained language model for learning joint representations of natural language utterances and (semi-)structured tables for semantic parsing. TaBERT is pre-trained on a massive corpus of 26M Web tables and their associated natural language context, and could be used as a drop-in replacement of a semantic parsers original encoder to compute representations for utterances and table schemas (columns).
Other
580 stars 63 forks source link

ModuleNotFoundError: No module named 'utils.prepare_training_data' #19

Open akshatabhat opened 3 years ago

akshatabhat commented 3 years ago

I am trying to run generate_vanilla_tabert_training_data.sh, however, I get this error -

Traceback (most recent call last): File "/opt/conda/envs/tabert/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/opt/conda/envs/tabert/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/tabert/utils/generate_vanilla_tabert_training_data.py", line 42, in from utils.prepare_training_data import sample_context ModuleNotFoundError: No module named 'utils.prepare_training_data'

Am I missing something, or is the file "prepare_training_data.py'" missing from the repo?

YakZhang commented 3 years ago

I have the same issue

YakZhang commented 3 years ago

You can replace the “from utils.prepare_training_data import sample_context" into the "from generate_vertical_tabert_training_data import sample_context".

ASEXPIAO commented 11 months ago

You can replace the “from utils.prepare_training_data import sample_context" into the "from generate_vertical_tabert_training_data import sample_context".

You may encounter a "ModuleNotFoundError: No module named 'generate_vertical_tabert_training_data'" error. In that case, please modify the line "from generate_vertical_tabert_training_data import sample_context" to "from utils.generate_vertical_tabert_training_data import sample_context".