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

Why I can not import from torch_geometric.graphgym.optimizer import create_optimizer, \ # create_scheduler, OptimizerConfig, SchedulerConfig #1

Closed
123carmen opened this issue Jun 7, 2022 · 1 comment

Comments

@123carmen
Copy link

I want to use windows , pycharm to run your code, [If i use linux system, it has no problem at all]
I installed torch_geometric in window pc

--I can successfully import those packages from a console,(torch1.10.0, )
import torch
import torch_geometric 2.0.4
import torch_scatter 2.0.9
import torch_sparse 0.6.13
import torch_spline_conv 1.2.1
import torch_cluster 1.6.0

but this line
from torch_geometric.graphgym.optimizer import create_optimizer,
create_scheduler, OptimizerConfig, SchedulerConfig
it shows errors on .graphgym.optimizer (as unrecognized modules).
I can not import from torch_geometric.graphgym.optimizer import create_optimizer,
create_scheduler, OptimizerConfig, SchedulerConfig --- from console, it can not import

error--- module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'torch_geometric.graphgym.optimizer'

why linux system, it can import, and my window can not?

i try to replace from torch_geometric.graphgym.optimizer import
to from torch_geometric.graphgym.optim import ...

then when it goes to

optimizer = create_optimizer(model.parameters(),
new_optimizer_config(cfg))
it show errors, raise ValueError(f"'cfg.{arg_name}' undefined")
raise ValueError(f"'cfg.{arg_name}' undefined")
ValueError: 'cfg.optimizer_config' undefined

how can i solve this problem, thank you very much.

@123carmen
Copy link
Author

no problem now, I decrease the torch_geometric version. it is ok now. sorry to bother

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

1 participant