Open OrangeCat12352 opened 7 months ago
直接使用 pip 安装 selective_scan 就行了,不需要按照 visino mamba 的教程 一步步来,vmunet 那个库也提供了,离线版本的
看下vmunet的issue
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Collecting mamba_ssm==1.0.1 Downloading https://mirrors.aliyun.com/pypi/packages/c5/05/61d5d28786f41c7d3cc671a232b9f73e24c82fd23e8317da2b2ed36a5c73/mamba_ssm-1.0.1.tar.gz (28 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [11 lines of output]
Traceback (most recent call last):
File "
torch.__version__ = 1.13.1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed
I just want to konw how to deal with the problem. Thank you for your time and help.
我在安装代码环境的时候遇到这个问题。请问有人遇到过相同的问题吗? self.selective_scan = selective_scan_fn NameError: name 'selective_scan_fn' is not defined
我已经导入了这个包, try: from mamba_ssm.ops.selective_scan_interface import selective_scan_fn as selective_scan_fn except: pass
以及,我通过ctrl+左键点进去查看,mamba_ssm中的确存在这个函数 def selective_scan_fn(u, delta, A, B, C, D=None, z=None, delta_bias=None, delta_softplus=False, return_last_state=False): """if return_last_state is True, returns (out, last_state) last_state has shape (batch, dim, dstate). Note that the gradient of the last state is not considered in the backward pass. """ return SelectiveScanFn.apply(u, delta, A, B, C, D, z, delta_bias, delta_softplus, return_last_state)
想问下您解决了这个问题吗,如果解决了可以分享是如何解决的吗
我在安装代码环境的时候遇到这个问题。请问有人遇到过相同的问题吗? self.selective_scan = selective_scan_fn NameError: name 'selective_scan_fn' is not defined
我已经导入了这个包, try: from mamba_ssm.ops.selective_scan_interface import selective_scan_fn as selective_scan_fn except: pass
以及,我通过ctrl+左键点进去查看,mamba_ssm中的确存在这个函数 def selective_scan_fn(u, delta, A, B, C, D=None, z=None, delta_bias=None, delta_softplus=False, return_last_state=False): """if return_last_state is True, returns (out, last_state) last_state has shape (batch, dim, dstate). Note that the gradient of the last state is not considered in the backward pass. """ return SelectiveScanFn.apply(u, delta, A, B, C, D, z, delta_bias, delta_softplus, return_last_state)