transformers
2383f3fc - Fix graphormer model compilation with Cython 3.1.4 (#41671)

Commit
71 days ago
Fix graphormer model compilation with Cython 3.1.4 (#41671) Hitting this kind of error when running: ``` cython src/transformers/models/deprecated/graphormer/algos_graphormer.pyx ``` ``` Error compiling Cython file: ------------------------------------------------------------ ... (nrows, ncols) = path.shape assert nrows == ncols cdef unsigned int n = nrows cdef unsigned int max_dist_copy = max_dist path_copy = path.astype(long, order='C', casting='safe', copy=True) ^ ------------------------------------------------------------ src/transformers/models/deprecated/graphormer/algos_graphormer.pyx:88:28: undeclared name not builtin: long ``` This appears to have changed between cython==3.0 and cython==3.1. AFAICT the correct type to use here would be `int`. Switching to it makes the command succeed and generate an algos_graphormer.c file.
Author
Parents
Loading