Comments (8)
Yes. Can we set default to debug = TRUE ?
Currently, we are all developers; very few R end users yet.
from spades.core.
I don't agree that setting the default to TRUE
is the correct behaviour, even if it might be what you want while in development. Setting the default to FALSE
is best/easiest for the user, and developers just need to change the option when they're in development mode.
from spades.core.
Every person I have talked too is confused by the spades
function because nothing happens. And there is no easily interpretable output of the spades
function for a beginner. So, if somebody runs it, then nothing happens, then they get a mega simList
output after some unknown amount of time, means that people just give up.
Thinking about visualizing the Event Queue as a debugging thing is the wrong way to see it. It should be considered as a component of the output/return of the function. So, really, debugging is not just showing the Event Queue, it is showing anything else in addition to the Event Queue, i.e., spades(simList, debug = "print(sim$objectValue)")
. The package is called Spatial Discrete Event Simulator. The Event Queue is not a tool for debugging; it is the entire point of SpaDES.
I guess, we can see what others think.
from spades.core.
Part of my issue with doing so is that printing it out after every event drastically reduces the speed of the simulation, especially in Rstudio. Perhaps we should look at minimizing the output displayed, or relegating the printing of output to a future/promise so it doesn't interfere with the main simulation process.
As far as the event queue being part of the output, it is. The simList
object contains the current and completed event queues. Strictly speaking the printing of the queue at each event is a side-effect. We are invoking this side-effect as part of the debugging mechanism, which I don't think should be enabled by default.
from spades.core.
Additionally, if users are getting confused that the spades()
call doesn't spit anything out right away, perhaps we should look at making a progress bar or similar the default (as long as it doesn't slow things down). Any simulation with plots, for example, will still produce plots, so that should indicate to the user that something is happening...
from spades.core.
If you are worried about speed, then you can set the debug = FALSE
. Speed is relatively low on the list for first time users of SpaDES
. Power users can do whatever they want. The default is not for power users. If is for average users.
I think using the futures package is good in principle, but currently, I believe it would be even slower for this use case than just printing the message. i.e., there is an overhead that is non trivial.
Progress bars are slow (graphical) or less useful that the Event Queue (text progress bar) and about the same speed. So, progress bars are not a great solution.
from spades.core.
per my commit message: I'm keeping FALSE
as the default for now because changing it to TRUE
will require additional work to update various tests. I want to come back to this discussion though.
from spades.core.
It is now TRUE
... may change to 2
, which shows elapsed time
from spades.core.
Related Issues (20)
- create .wrapup event to run at end of simulation HOT 1
- demo needs to be updated/deprecated -- currently broken HOT 1
- `paramCheckOtherMods` fails when parameter is a `call` HOT 2
- remove use of defunct 'gaussMap()' HOT 1
- add module package dependencies to module Rmd template HOT 4
- Plots throws error when trying to save `png` image from `sim`
- warn/stop if memoryUseInterval specified but future + future.callr packages not available
- update module template files to use https instead of http in urls
- moduleMetadata() behaviour for parent modules ?
- improved module code checks HOT 3
- reqdPkgs issue in new module template
- Release SpaDES.core 2.0.2 HOT 2
- saveSimList() doesn't respect option 'reproducible.tempPath'
- update tests based on changes in reproducible HOT 1
- Require::getPkgVersions() removed upstream HOT 4
- deprecate `.PlotInitialTime` argument in spades()
- Error "object ‘file.move’ is not exported by 'namespace:reproducible'" when installing the package HOT 2
- simulation caching issues in tests HOT 3
- sporadic download failures triggering test failure HOT 4
- don't install packages during tests HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spades.core.