-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MetaKD问题记录 #378
Comments
torch 版本 |
module 'oneflow.distributed' has no attribute 'is_initialized'复现代码import oneflow as torch
if torch.distributed.is_initialized():
pass 报错信息Traceback (most recent call last):
File "meta_teacher_train.py", line 20, in <module>
initialize_easynlp()
File "/workspace/models/KnowledgeDistillation/knowledge_distillation_metakd/metakd_oneflow/easynlp/utils/initializer.py", line 39, in initialize_easynlp
_initialize_distributed()
File "/workspace/models/KnowledgeDistillation/knowledge_distillation_metakd/metakd_oneflow/easynlp/utils/initializer.py", line 109, in _initialize_distributed
if torch.distributed.is_initialized():
AttributeError: module 'oneflow.distributed' has no attribute 'is_initialized' 运行环境onecloud平台,4core-14Gi-P40(1Card)机器。oneflow version: 0.8.1+cu112(nightly),python version:3.7.7 |
'Tensor' object has no attribute 'is_sparse'复现代码import oneflow as flow
tensor = flow.randn(2, 3)
print(tensor.is_sparse) 报错信息---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/tmp/ipykernel_54640/2438940525.py in <module>
1 import oneflow as flow
2 tensor = flow.randn(2, 3)
----> 3 print(tensor.is_sparse)
AttributeError: 'Tensor' object has no attribute 'is_sparse' 对比 torchimport torch as flow
tensor = flow.randn(2, 3)
print(tensor.is_sparse)
>>False 运行环境onecloud平台,4core-14Gi-P40(1Card)机器。oneflow version: 0.8.1+cu112(nightly),python version:3.7.7 |
对 0 维 tensor 进行 mean(-1) 操作, oneflow 会程序崩溃而 torch 不会复现代码import oneflow as flow
input = flow.randn(2, 3)
target = flow.randn(2, 3)
loss = flow.nn.functional.mse_loss(input, target) # 求loss
print(loss)
print(loss.shape)
loss_mean = loss.mean(-1)
print(loss_mean) 报错信息loaded library: /usr/lib/x86_64-linux-gnu/libibverbs.so.1
Canceled future for execute_request message before replies were done
The Kernel crashed while executing code in the the current cell or a previous cell. Please review the code in the cell(s) to identify a possible cause of the failure. Click [here](https://aka.ms/vscodeJupyterKernelCrash) for more info. View Jupyter [log](command:jupyter.viewOutput) for further details. 对比 torchimport torch as flow
input = flow.randn(2, 3)
target = flow.randn(2, 3)
loss = flow.nn.functional.mse_loss(input, target)
print(loss)
print(loss.shape)
loss_mean = loss.mean(-1)
print(loss_mean)
>>> tensor(1.3708)
>>> torch.Size([])
>>> tensor(1.3708) 运行环境onecloud平台,4core-14Gi-P40(1Card)机器。oneflow version: 0.8.1+cu112(nightly),python version:3.7.7 |
这个bug应该是 |
No description provided.
The text was updated successfully, but these errors were encountered: