question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running the training scripts in Jupyter: Issues with arguments

See original GitHub issue

I translated part of the training script in train_botnet.py to jupyter notebook and while calling train with the parameters provided in the script, I get:

TypeError: scatter_add() takes from 2 to 5 positional arguments but 6 were given

This seems to happen during the forward pass in: x = model(batch.x, batch.edge_index) in train when aggr = 'add' but similar issue happens when aggr = 'mean' and error changes to TypeError: scatter_mean() takes from 2 to 5 positional arguments but 6 were given and in similar fashion for aggr = 'max'

Any ideas why this happens?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:23 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ioheldercommented, Jun 28, 2021

This is an issue with version-mismatch for pytorch_scatter

Thanks. Which version did you use?

2.0.7

That’s exactly the same I have been using and the issue prevails. 😮

1reaction
ioheldercommented, Jul 5, 2021

@jzhou316 that’s true. Might be related to environment variable issue. Will check it out, thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running python scripts with variable parser arguments from ...
I have a python script there, that takes arguments as input via argparse. Here is part of it: parser = argparse.ArgumentParser() parser.
Read more >
Runtime difference: Jupyter Notebook vs Python Script #643
I saw there is "EarlyStop handler" in MONAI which allows to stop the training if there is no improvement in dice score.
Read more >
From Jupyter Notebook To Scripts. Don't play toy models
The first step is to convert the notebook to scripts and it is the main theme of this article!
Read more >
Jupyter Notebook workflow — Modulus 22.09 documentation
Jupyter Notebook workflow¶. This tutorial builds a simple example in a jupyter notebook. This workflow is useful for interactive developement and rapid ...
Read more >
Notebooks Documentation | Kaggle
Explore and run machine learning code with Kaggle Notebooks, ... To start editing an RMarkdown script, click on “Create Notebook”, navigate to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found