Comments (4)
It seems you did not download the T5 checkpoints we provided.
![image](https://private-user-images.githubusercontent.com/45526716/246818397-5befc292-e380-420d-bc18-b72889de821e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3MTM4MjgsIm5iZiI6MTcyMTcxMzUyOCwicGF0aCI6Ii80NTUyNjcxNi8yNDY4MTgzOTctNWJlZmMyOTItZTM4MC00MjBkLWJjMTgtYjcyODg5ZGU4MjFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDA1NDUyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4MTJmMzQ1ZDljYzJkZjczZTIxZTRjMzQ0ZmRjMGVkYWEzYjkyMjhlM2NiYjA1MzFlMmI3OTNiM2MzYzc5N2UmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.EwbAINPsjy9h6dKwsltPGANcvBuEoa-FCckpd98E7kw)
from resdsql.
Ohh!! Thanks for pointing it out...
Actually is it possible to run inference script on cpu, I am having only 12 GB GPU and its showing Cuda out of memory error
(RESDSQL) [husainmalwat@localhost RESDSQL]$ sh scripts/inference/infer_text2sql.sh base spider
366it [00:22, 16.43it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 23/23 [00:20<00:00, 1.12it/s]
Namespace(batch_size=16, db_path='./database', dev_filepath='./data/preprocessed_data/resdsql_test.json', device='0,1', epochs=128, gradient_descent_step=4, learning_rate=3e-05, mode='eval', model_name_or_path='t5-3b', num_beams=8, num_return_sequences=8, original_dev_filepath='./data/spider/dev.json', output='./predictions/Spider-dev/resdsql_base/pred.sql', save_path='./models/text2sql-t5-base/checkpoint-39312', seed=42, tables_for_natsql='NatSQL/NatSQLv1_6/tables_for_natsql.json', target_type='sql', tensorboard_save_path='tensorboard_log/text2sql', train_filepath='data/preprocessed_data/resdsql_train_spider.json', use_adafactor=False)
0%| | 0/23 [00:00<?, ?it/s]
Traceback (most recent call last):
File "text2sql.py", line 352, in <module>
_test(opt)
File "text2sql.py", line 293, in _test
model_outputs = model.generate(
File "/home/husainmalwat/anaconda3/envs/RESDSQL/lib/python3.8/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/husainmalwat/anaconda3/envs/RESDSQL/lib/python3.8/site-packages/transformers/generation/utils.py", line 1524, in generate
return self.beam_search(
File "/home/husainmalwat/anaconda3/envs/RESDSQL/lib/python3.8/site-packages/transformers/generation/utils.py", line 2883, in beam_search
model_kwargs["past_key_values"] = self._reorder_cache(model_kwargs["past_key_values"], beam_idx)
File "/home/husainmalwat/anaconda3/envs/RESDSQL/lib/python3.8/site-packages/transformers/models/t5/modeling_t5.py", line 1815, in _reorder_cache
layer_past_state.index_select(0, beam_idx.to(layer_past_state.device)),
RuntimeError: CUDA out of memory. Tried to allocate 192.00 MiB (GPU 0; 10.76 GiB total capacity; 9.69 GiB already allocated; 65.12 MiB free; 9.79 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
from resdsql.
Maybe you can reduce the text2natsql_model_bs
in the inference script.
from resdsql.
thanks, working now
from resdsql.
Related Issues (20)
- Execuse me. What happened to paper CodeS? Isn't this article open source before? HOT 9
- Low training metrics HOT 14
- Support for Historical Conversation in RESDSQL HOT 4
- Question about evaluation scripts HOT 2
- 请问推理方法 HOT 2
- 最低支持的GPU内存是多少,我怎么跑不起来。
- Dev result file?
- 部分带有别名的sql在经过normalization处理后出现错误 HOT 2
- Inference script not working HOT 5
- CoSQL HOT 1
- 训练Cross-Encoder的时候为什么24G的显存还不够用? HOT 1
- 关于RESDSQL在BIRD上的运行时间 HOT 2
- Training cross-coder error HOT 1
- xlm_roberta_text2natsql_schema_item_classifier HOT 3
- Evaluation detail on CSpider HOT 1
- 你好,请问如何将自己的数据集处理成CSpider的形式? HOT 3
- 你好,请问如何SQL2NatSQL?我想用自己的数据集跑text2NatSQL的方法。 HOT 2
- 请问模型训练有多gpu并行支持吗 HOT 1
- Can the ranking-filter successfully choose all the right schema items? HOT 1
- 为什么我使用对bird训练的classifier时出现了truncated_dataset.json文件,而且陷入了循环无法结束运行 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resdsql.