Skip to content
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

ImportError: cannot import name 'sampling' from 'utils' (unknown location) #9

Open
FHE027 opened this issue Jan 11, 2025 · 1 comment

Comments

@FHE027
Copy link

FHE027 commented Jan 11, 2025

在client.py和server.py中都引用了from utils import sampling模块,但在utils文件下的几个文件中都没有关于sampling的定义,以致于报错 File "E:\FHElibrary\FedPHE-main\main.py", line 11, in
from fed import run #包含run函数的自定义模块
File "E:\FHElibrary\FedPHE-main\fed.py", line 10, in
from server import server_process
File "E:\FHElibrary\FedPHE-main\server.py", line 21, in
from utils import sampling
ImportError: cannot import name 'sampling' from 'utils' (unknown location)
请问这个应该怎么解决?

@lunan0320
Copy link
Owner

@FHE027 抱歉,utils.sampling 已补充 https://github.com/lunan0320/FedPHE/blob/main/utils/sampling.py

感谢指正!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants