Closed Tasqu closed 9 months ago
@Tasqu any chance you could reproduce this with simple steps? Otherwise I think I know what's going on...
@manuelma I can try, but no promises. I only have the afternoon before I leave for holidays.
Take it easy - it feels easy to solve anyways, we just need to figure out why that KeyError in spine_db_server.
Hmm, couldn't replicate this with a trivial example. I thought the issue was simply with parallel execution of scenarios, but seems like that works, at least for well-defined alternatives: where and results in no errors and almost the expected behaviour:
scen1
:
scen2
:
scen3
:
However, Base
results in something different than what I expected:
It seems that for whatever reason, Base
scenario returns entities identical to scen2
, although no object activity has been defined.
I extended the above test to parameters hoping it would cause an error like the one my old conference paper workflow, but it still works. However, Base
scenario and alternative output seems unreliable. I would expect that all entities would be assumed to exist by default, but this doesn't seem to be the case.
See the below file for the trivial example.
0.8-scenariotest.zip
Note that print_entities.jl
needs to be linked to a 0.8-dev SpineInterface
locally via the develop <spineinterface_path>
.
Closing this as obsolete. The issue still persists, but the old modelling workflow used for testing this no longer works as intended even with updated master
branches.
@Tasqu Just wondering why we are closing the issue if it's not solved? Are you saying the old workflow has issues because of other incompatibilities with latest toolbox? Even so, it looks like activity control is not working as expected?
@DillonJ I put it aside, as I don't think this issue is useful as is. All it demonstrates is unexpected behaviour when trying to update and run an old modelling workflow, but I couldn't identify the reason behind it. Furthermore, updating the workflow for current master
branches doesn't work either, so this might not even be a problem in 0.8-dev
, but in data migration or toolbox project updating.
Thanks @Tasqu. It was this that concerned me a little:
However,
Base
scenario and alternative output seems unreliable. I would expect that all entities would be assumed to exist by default, but this doesn't seem to be the case.
But I gether that this is to do with the old version of the workflow and when you test scenarios in parallel with a toy example in V0.8 , you see the correct Base
scenario and alternative output, right?
@DillonJ I thought I created a separate issue for that before the holidays, but seems like I didn't. I'll have to check if the inconsistency in the scenario and alternative output is still there, and create a new better issue for it.
At the behest of @manuelma, I've been testing the v0.8 branches of Toolbox, SpineInterface, and SpineOpt using a workflow I used for a conference paper earlier this year (doesn't really work as-is anymore, but can be updated).
WARNING! The full workflow can take 5-6 hours to finish, unless the SpineOpt model length is reduced from
spineopt_template.sqlite
! Theprocess_archetypes
tool still takes ~hour because of how cumbersome year-long daily weather data forecasts are to process.I've gotten the original version to work by updating Toolbox to latest
master
, but the0.8-dev
branch seems to have some problems with parallel execution of scenarios and entity activity control. I'm not yet sure if this is a problem with data migration, or with toolbox itself, I'm still looking into this. However, I thought I might as well post some tracebacks in case some Toolbox experts can figure them out.Error description
The workflow gets stuck when trying to execute SpineOpt. It doesn't fail properly, but just hangs forever:
This seems be because of the scenarios (which trigger different entity activity for SpineOpt). Only one of the scenarios runs into an error (
Perfect
for me, not sure if this is consistent), while the two others get stuck:The final things the SpineOpt executions do is the following, before either erroring or simply hanging forever:
Julia traceback from SpineOpt
SpineOpt execution with the
Perfect
scenario (for me) causes an error, which seems to be caused by an error when applying the scenario filter inspinedb_api
:Toolbox traceback in the underlying command prompt
Toolbox also prints tracebacks, but these I have no idea about