You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#https://github.com/microsoft/torchscale/blob/main/examples/longvit/longvit.py
#L241 add these code
model = LongViT(img_size=1024)
import torch
out = model(torch.randn((2,3,102,4,1024)))
print(out)
↓
Traceback (most recent call last):
File "/home/user/ABE/torchscale/examples/longvit/longvit.py", line 26, in <module>
from torchscale.architecture.encoder import Encoder
File "/home/user/ABE/torchscale/torchscale/architecture/encoder.py", line 21, in <module>
from torchscale.component.xmoe.moe_layer import MOELayer
File "/home/user/ABE/torchscale/torchscale/component/xmoe/moe_layer.py", line 24, in <module>
from fairseq.modules.moe import MOELayer
File "/home/user/anaconda3/envs/longvit/lib/python3.11/site-packages/fairseq/__init__.py", line 20, in <module>
from fairseq.distributed import utils as distributed_utils
File "/home/user/anaconda3/envs/longvit/lib/python3.11/site-packages/fairseq/distributed/__init__.py", line 7, in <module>
from .fully_sharded_data_parallel import fsdp_enable_wrap, fsdp_wrap, FullyShardedDataParallel
File "/home/user/anaconda3/envs/longvit/lib/python3.11/site-packages/fairseq/distributed/fully_sharded_data_parallel.py", line 13, in <module>
from fairseq.dataclass.configs import DistributedTrainingConfig
File "/home/user/anaconda3/envs/longvit/lib/python3.11/site-packages/fairseq/dataclass/__init__.py", line 6, in <module>
from .configs import FairseqDataclass
File "/home/user/anaconda3/envs/longvit/lib/python3.11/site-packages/fairseq/dataclass/configs.py", line 973, in <module>
@dataclass
^^^^^^^^^
File "/home/user/anaconda3/envs/longvit/lib/python3.11/dataclasses.py", line 1221, in dataclass
return wrap(cls)
^^^^^^^^^
File "/home/user/anaconda3/envs/longvit/lib/python3.11/dataclasses.py", line 1211, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/anaconda3/envs/longvit/lib/python3.11/dataclasses.py", line 959, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/anaconda3/envs/longvit/lib/python3.11/dataclasses.py", line 816, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'fairseq.dataclass.configs.CommonConfig'> for field common is not allowed: use default_factory
what should i do next?
The text was updated successfully, but these errors were encountered:
I create new conda env and then
installed above.
however,I cant try using longvit
↓
what should i do next?
The text was updated successfully, but these errors were encountered: