Comments (4)
I think this is bit more generic issue. We have a similar problem when running a workflow where there is some post-processing of results. The scenarios don't yet necessarily exist in the result database when selecting/executing a workflow that contains both model execution and result post-processing.
I think the solution is to have inheritance of scenario selections. That should be an option in the "arrow scenario filter" (when this "inherit scenario choices from upstream" is activated, the scenario filter choices should be greyed out as they become overruled). In your case, the trouble is that DS1 -> "Some Tool" cannot inherit the choice from DS1 -> "Run SpineOpt1", since they are parallel and not serial. The easy solution is to put a Merger right after DS1, so that there is only one "arrow scenario filter" after DS1. All the dependents get their data from the Merger instead of DS1. The downside is that it's not obvious for the user that this should be done when this is needed. The upside is that it could be made to work much faster than more fundamental changes (would just require this inheritance choice).
I believe there is a further issue in your example - how to compare two specific scenarios in "Some Tool" (with_transmission and without_transmission). I think that's a different issue, since they are truly different scenarios. The quick fix is that you provide some information in DS1 that indicates which scenarios to compare and in what way. "Some Tool" should then use the information to deduce what to do. That way you don't need to it manually but once. However, we could also think about supporting something like that more natively. If so, it needs it's own issue and is further down the road.
from spine-toolbox.
The inheritance is not a bad idea... I wouldn't take my example too literally as the real workflow is more complex and I was trying to identify some generic functionality that would be useful. As you identify though, the trouble is that scenarios are being used for different things - 1. to identify a type of run and 2 to identify an actual scenario... being able to "tie" a scenario to a project level scenario would be nice in this regard. Maybe also, something higher level than scenario is needed which would offer quite a lot of flexibility.
Definitely not expecting anything in a timeframe that allows us to solve this issue - more trying to provide some feedback from some real use cases.
from spine-toolbox.
One workaround is to not select any scenarios in the arrows pointing to Some Tool, but instead give the scenario as a command line argument to Some Tool which then manually applies the correct scenario filters to the database mappings. This way there would be only one place where the post-processing scenario is defined.
from spine-toolbox.
Not a bad idea at all @soininen
from spine-toolbox.
Related Issues (20)
- Filter checkbox list doesn't update when parameter values change
- Execute project shortcut F5
- Help with regex in Importer
- Traceback from tool main file manipulation
- Stopping Tool execution makes Toolbox very slow and choppy
- Checkbox to a not ask about upgrading databases HOT 1
- Traceback when closing db editor
- Configure isort in toolbox repos
- Update precommit hooks to include isort
- Live preview in exporter editor freezes Toolbox
- Importer creates unexpected entity classes
- Save state in db editor doesn't work
- Drop support for Python 3.8 by the end of October
- Single column mappings
- Graph view export image crops the image too much
- "Table name" option effects export selection
- Mapping "table name" in exporter
- "Error installing spinetoolbox." using pipx
- "Fatal error from pip prevented installation." on Kaggle environment HOT 3
- Canceling database update keeps opening new dialogs
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 spine-toolbox.