thgaskin / neuralabm Goto Github PK
View Code? Open in Web Editor NEWNeural parameter calibration for multi-agent models. Uses neural networks to estimate marginal densities on parameters and networks
Neural parameter calibration for multi-agent models. Uses neural networks to estimate marginal densities on parameters and networks
Sorry not an issue but more of a general question!
I am a bit confused with the transition from the continuous probabilities referenced in the paper to the discrete probabilities evaluated. It seems here for the probabilities of the parameters at each iteration, you use the loss function to compute a discrete probability value. For the marginals of a parameter x, you bin the x values, sum over their probabilities, normalize, and then smooth, and then this is our approximation to the posterior distribution of that parameter. Is that correct?
Also just to check, you are assuming that the error in the time series from the ABM model with the NN's parameters and the true time series is normally distributed? Thanks so much!
Hello,
when following the recipe, I am getting a ruamel deprecation error when running:
$ utopya run Kuramoto models/Kuramoto/Kuramoto_cfg.yml
This is the Traceback:
HILIGHT logging Starting to work ...
╠ ╣ 0.0% | < 1s elapsed | ~ ∞ left
uni0 out: Traceback (most recent call last):
uni0 out: File "/home/joerg/repos/NeuralABM/models/Kuramoto/run.py", line 329, in <module>
uni0 out: cfg = yaml.load(cfg_file, Loader=yaml.Loader)
uni0 out: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
uni0 out: File "/home/joerg/miniforge3/envs/neuralabm/lib/python3.11/site-packages/ruamel/yaml/main.py", line 1085, in load
uni0 out: error_deprecation('load', 'load', arg=_error_dep_arg, comment=_error_dep_comment)
uni0 out: File "/home/joerg/miniforge3/envs/neuralabm/lib/python3.11/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
uni0 out: raise AttributeError(s, name=None)
uni0 out: AttributeError:
uni0 out: "load()" has been removed, use
uni0 out:
uni0 out: yaml = YAML(typ='rt')
uni0 out: yaml.load(...)
uni0 out:
uni0 out: and register any classes that you use, or check the tag attribute on the loaded data,
uni0 out: instead of file "/home/joerg/repos/NeuralABM/models/Kuramoto/run.py", line 329
uni0 out:
uni0 out: cfg = yaml.load(cfg_file, Loader=yaml.Loader)
uni0 out:
uni0 out:
╠░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╣ 0.0% | 1s elapsed | ~ ∞ left
CRITICAL workermanager Task 'uni0' exited with non-zero exit status: 1.
This may originate from the following signals: SIGHUP, SIG_IGN, SIG_UNBLOCK.
Googling these might help with identifying the error. Also, inspect the log and the log file for further error messages. To increase verbosity, run in debug mode, e.g. by passing the --debug flag to the CLI.
ERROR workermanager Last ≤24 lines of combined stdout and stderr:
Traceback (most recent call last):
File "/home/joerg/repos/NeuralABM/models/Kuramoto/run.py", line 329, in <module>
cfg = yaml.load(cfg_file, Loader=yaml.Loader)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/joerg/miniforge3/envs/neuralabm/lib/python3.11/site-packages/ruamel/yaml/main.py", line 1085, in load
error_deprecation('load', 'load', arg=_error_dep_arg, comment=_error_dep_comment)
File "/home/joerg/miniforge3/envs/neuralabm/lib/python3.11/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
raise AttributeError(s, name=None)
AttributeError:
"load()" has been removed, use
yaml = YAML(typ='rt')
yaml.load(...)
and register any classes that you use, or check the tag attribute on the loaded data,
instead of file "/home/joerg/repos/NeuralABM/models/Kuramoto/run.py", line 329
cfg = yaml.load(cfg_file, Loader=yaml.Loader)
CRITICAL workermanager Did not finish working! See above for error log.
HILIGHT logging Terminating active tasks ...
╠▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╣ 100.0% | finished in 1s
CRITICAL workermanager Exiting now ...
These are the ruamel versions in my environment:
$ conda list ruamel
# packages in environment at /home/joerg/miniforge3/envs/neuralabm:
#
# Name Version Build Channel
ruamel-base 1.0.0 pypi_0 pypi
ruamel-yaml 0.18.5 pypi_0 pypi
ruamel-yaml-clib 0.2.8 pypi_0 pypi
I will have a quick look if the hint fixes the error...
It would be nice to have a prediction and residual plot for the destination sizes so that the fit can be visualised :)
Hello everyone!
I apologize in advance as I am fairly new to the GitHub universe. I followed the step-by-step instructions described in the README file, including cloning the repository and installing the necessary packages. However, for some reason, I am receiving the following error when running the code: utopya projects register . --with-models
.
Below, I present the log with the error KeyError: 'SIGUSR1'
.
PS D:\Documents\GitHub\NeuralABM> utopya projects register . --with-models
Traceback (most recent call last):
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\Scripts\utopya.exe\__main__.py", line 7, in <module>
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\site-packages\utopya_cli\projects.py", line 229, in register
import utopya
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\site-packages\utopya\__init__.py", line 80, in <module>
from .model import Model
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\site-packages\utopya\model.py", line 17, in <module>
from .multiverse import FrozenMultiverse, Multiverse
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\site-packages\utopya\multiverse.py", line 28, in <module>
from .workermanager import WorkerManager
File "C:\Users\Microsoft Windows\AppData\Local\Programs\Python\Python310\lib\site-packages\utopya\workermanager.py", line 25, in <module>
-SIGMAP[SIG_STOPCOND],
KeyError: 'SIGUSR1'
I have no idea what this error is or how to solve it. I tried to research it on my own in the documentation, but had to resort to asking for help here (I don't even know if I did it correctly). Thank you in advance!
Edit: I use Microsoft Visual Studio Code.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.