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

Using Citesser dataset will raise this error: __init__() got an unexpected keyword argument 'silent' #123

Open
Felicialalala opened this issue Sep 8, 2022 · 0 comments

Comments

@Felicialalala
Copy link

The completed error meassage:
Traceback (most recent call last): File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/yitingyang/OpenNE-pytorch/src/openne/__main__.py", line 239, in <module> main(parse_args()) File "/yitingyang/OpenNE-pytorch/src/openne/__main__.py", line 226, in main graph = Graph(silent=train_args['silent']) # prepare dataset TypeError: __init__() got an unexpected keyword argument 'silent'
I looked into the code in "dataloaders/planetoid_dataset.py", found the class Citeseer lacked kwargs as input in the init method. I wonder whether this is a bug. Anyway, adding kwargs solved the problem.

class Cora(Planetoid):
    def __init__(self, **kwargs):
        super(Cora, self).__init__(**kwargs)

    @classmethod
    def weighted(cls):
        return False

    @classmethod
    def directed(cls):
        return False

class CiteSeer(Planetoid):
    def __init__(self):
        super(CiteSeer, self).__init__()

    @classmethod
    def weighted(cls):
        return False

    @classmethod
    def directed(cls):
        return False 
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