无法导入名称' isin' python和jax

发布于 2025-01-26 00:33:05 字数 430 浏览 4 评论 0原文

我想制作一个深度学习模型以在我的PC上运行,但是虽然下载它会停止,因为错误消息无法从'jax._src.numpy.lax_numpy

'拥有numpyjax已安装,但仍然给我这个错误消息。我错过了任何软件包吗?(还有更多)

编辑:dalle-flow-server https:https:https: //github.com/jina-ai/dalle-flow 和写作jina flow -uses flow.yml它试图执行文件并下载预训练的模型,而在这样做 - >出现错误。

I wanted to make a deep learning model to run on my PC, but while it’s downloading it stops, because of the error message cannot import name 'isin' from 'jax._src.numpy.lax_numpy'

I have numpy and jax installed but it still gives me this error message. Is there any package I missed.(and some more)

EDIT: The dalle-flow-server https://github.com/jina-ai/dalle-flow and after writing jina flow --uses flow.yml it tries to execute a file and download a pre trained model and while it's doing that --> the Error appears.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

舟遥客 2025-02-02 00:33:05

JAX版本的版本0.3.5重新排列了一些私有实现,isin不再是私人jax._src._src.numpy.lax_numpy subsodoule的一部分。

无论您使用哪种JAX版本,推荐的导入是

from jax.numpy import isin

自首先添加isin函数以来,在过去几年中发布的任何JAX版本都可以正常工作。

通常,您应该避免从任何私有子模块中导入,例如jax._src._src.numpy(即以下划线开头的那些),因为这些内容可能会在没有任何警告的情况下更改任何版本。对于jax.numpy等公共子模型,任何此类更改都将随着进口移动之前的几个发行版的弃用警告。请参阅JAX的 api兼容策略提供更多信息。

如果您使用的是取决于私有子模块导入的第三方软件包,则可能需要固定特定的JAX& Jaxlib版本可以正常工作。在这种情况下,看起来您需要以下内容:

$ pip install jax==0.3.4 jaxlib==0.3.2

您可能希望向Dalle-Flow的维护者报告此问题,并建议他们不再依靠从私人子模型中进口。

The version 0.3.5 release of JAX rearranged some of the private implementation, and isin is no longer part of the private jax._src.numpy.lax_numpy submodule.

Regardless of which JAX version you are using, the recommended import is

from jax.numpy import isin

This will work correctly in any JAX version released in the last several years since the isin function was first added.

In general, you should avoid imports from any private submodule like jax._src.numpy (i.e. those starting with an underscore) because the contents may be subject to change in any release without warning. For public submodules like jax.numpy, any such changes will come with deprecation warnings for several releases before the imports are moved. See JAX's API Compatibility Policy for more information.

If you are using a third party package that depends on private submodule imports, you may need to pin a particular jax & jaxlib version for it to work correctly. In this case it looks like you'll need the following:

$ pip install jax==0.3.4 jaxlib==0.3.2

You may wish to report this issue to the maintainers of dalle-flow, and suggest that they no longer rely on imports from private submodules.

只是偏爱你 2025-02-02 00:33:05

尝试重新运行PIP install -R Euncess.txt。看起来它可能未成功完成

Try re-running pip install -r requirements.txt. It looks like it might not have completed successfully

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文