LUMIA-Group / rasat

The official implementation of the paper "RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQL"(EMNLP 2022)
https://arxiv.org/abs/2205.06983
Apache License 2.0
63 stars 18 forks source link

converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor #28

Open lllxf opened 7 months ago

lllxf commented 7 months ago

usr/local/lib/python3.7/site-packages/transformers/tokenization_utils_base.py:705: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:230.) tensor = as_tensor(value)

I am trying to load the model using a previously trained checkpoint file and it takes a long time to skip the previous data and has the above warning, how can I solve it?