alibaba / alibaba/GraphTranslator

AttributeError: 'Tensor' object has no attribute 'coo'. Did you mean: 'cos'?

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
122
Forks
20
PR merge metrics
No merged PRs in 30d

Description

运行`./data/arxiv/sample_neighbor.py`脚本,报错如下:
```
Traceback (most recent call last):
File "C:\Program Files (x86)\PyCharm 2023.1.4\plugins\python\helpers\pydev\pydevd.py", line 1527, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files (x86)\PyCharm 2023.1.4\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:\PythonProjects\GraphTranslator\data\arxiv\sample_neighbor.py", line 17, in
row = dataset[0].adj_t.coo()[0]
AttributeError: 'Tensor' object has no attribute 'coo'. Did you mean: 'cos'?
```
看这意思应该是稀疏矩阵转coo格式时函数调用出错,可否看看怎么改?谢谢。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with data/arxiv/sample_neighbor.py, especially line 17 where dataset[0].adj_t.coo() is called, and run the script to inspect the reported Tensor type. Check how this dataset exposes adjacency data and confirm the script completes without the AttributeError while producing the intended neighbor rows.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.