Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open parameter optimization BB #1109

Closed
teutonicod opened this issue Feb 22, 2019 · 10 comments
Closed

Unable to open parameter optimization BB #1109

teutonicod opened this issue Feb 22, 2019 · 10 comments
Assignees
Projects
Milestone

Comments

@teutonicod
Copy link
Member

Dear all,

I am not anymore able to open the results of a parameter identification in PK-Sim. This already occurred me a couple of times, but I not sure which behavior generates this issue. I typically run the optimization, I rename the optimization BB and then I keep working with the model, opening and closing several simulations and optimization and everything works fine. Later on, I think when reopening the PK-Sim project, the optimization does not open anymore and gives me an error. But this does not happe systematically, with all the optimizations. Here below are the details of the error generated; do you have any clue what can generate this behavior?

By the way, the link provided in the error window (http://www.open-systems-pharmacology.org/pk-sim/issues) is not active, I think it should be updated.

Thanks a lot in advance for your suggestion!

Best,

Donato

Application:
PK-Sim® 7.4.0.127

Object reference not set to an instance of an object.

Stack trace:

at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationConfidenceIntervalPresenter.confidenceIntervalDTOFrom(ICache`2 confidenceInterval, IdentificationParameter identificationParameter, OptimizedParameterValue optimizedParameter)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationConfidenceIntervalPresenter.<>c__DisplayClass3_0.<mapFrom>b__2(<>f__AnonymousType0`2 <>h__TransparentIdentifier0)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationConfidenceIntervalPresenter.CalculateConfidenceIntervalFor(ParameterIdentification parameterIdentification, ParameterIdentificationRunResult runResult)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationCovarianceAnalysisPresenter.UpdateAnalysis()
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationMatrixAnalysisPresenter`1.set_SelectedRunResults(ParameterIdentificationRunResult value)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationMatrixAnalysisPresenter`1.UpdateAnalysisBasedOn(IAnalysable analysable)
   at OSPSuite.Presentation.Presenters.ParameterIdentifications.ParameterIdentificationMatrixAnalysisPresenter`1.InitializeAnalysis(ISimulationAnalysis simulationAnalysis, IAnalysable analysable)
   at OSPSuite.Presentation.Presenters.EditAnalyzablePresenter`4.createAnalysis(ISimulationAnalysis simulationAnalysis)
   at OSPSuite.Utility.Extensions.EnumerableExtensions.Each[T](IEnumerable`1 list, Action`1 action)
   at OSPSuite.Presentation.Presenters.EditAnalyzablePresenter`4.Edit(TAnalyzable analyzable)
   at OSPSuite.Presentation.Presenters.SubjectPresenter`3.Edit(Object objectToEdit)
   at PKSim.Presentation.Core.SingleStartPresenterTask.StartForSubject[T](T subject)
   at OSPSuite.Presentation.UICommands.EditParameterIdentificationUICommand.PerformExecute()
   at OSPSuite.Presentation.UICommands.ObjectUICommand`1.Execute()
   at OSPSuite.Presentation.UICommands.UICommandExtensions.ExecuteWithinExceptionHandler(IUICommand uiCommand, IEventPublisher eventPublisher, IChangePropagator changePropagator)
@Yuri05
Copy link
Member

Yuri05 commented Feb 22, 2019

Hi Donato, I guess it's not possible to upload the project?

If so, can you describe your PI configuration as precise as possible:

  • Simulations and Observed data used
  • Which parameters were optimized? Incl. optimization settings (bounds, linked parameters, scale, ...)
  • Algorithm configuration (single/multiple start values/Calc methods variation; used algorithm, ...)
  • Which plots were created in the PI before the project was saved

Which project parts used in the PI (simulations, observed data, ...) did you modify (delete/rename/...) AFTER the PI was completed?

Can you also try to export the project to snapshot? (will result in the same error I guess)

@teutonicod
Copy link
Member Author

Hi Juri,

Thanks for your reply. No, unfortunately I cannot upload the project file.
So I was using detasets for 3 different species, with IV and PO for each species (6 datasets in total).
The data I used were individual profiles, and not average data, with 3 profiles for each dataset.
I used the default method for Monte Carlo and I tried to estimate Lipophilicity and clearance for all data, using the automatic test of different distribution model. Later I did not change anything in the building block but I just renamed the building block itself after the PI was completed.

I saved several snapshot in the last weeks, but I cannot load any of them (except just the first one created) since I get again the same error. I thought that snapshot could be used as backup, but if one component of the model is corrupt (simulation, PI,...) the whole upload gives an error?

Thanks again and sorry if I cannot provide more details about this issue. I will keep an eye on the next PIs :-).

Donato

@msevestre msevestre transferred this issue from Open-Systems-Pharmacology/Forum Feb 22, 2019
@msevestre
Copy link
Member

@teutonicod @Yuri05 I have moved this issue to the PK-Sim repo as it is a bug report related to PK-Sim

@msevestre
Copy link
Member

I saved several snapshot in the last weeks, but I cannot load any of them (except just the first one created) since I get again the same error.

At least with the snapshot, we could try to understand WHAT is missing

I thought that snapshot could be used as backup, but if one component of the model is corrupt (simulation, PI,...) the whole upload gives an error?

Snapshot are used to recreate model from scratch based on user inputs. IT will recreate brand new Building blocks, simulations etc.. That means that snapshot will always be using the latest and greatest internal structure of a simulation. More specifically, if the internal structure changes between two versions, the snapshot will create a newer model that might be completely equivalent to the old one

In short a snapshot recreates a NEW project as if the user were to enter everything by hand again. If the PK-Sim versions differs, you might get different output. So I would NOT use this system as backup

@Yuri05
Copy link
Member

Yuri05 commented Feb 22, 2019

@teutonicod So what are the error messages with loading from snapshot? Same as here (PI issue)?
Would it be possible to extract only the problematic PI node(s) from project snapshots and attach them here?

@teutonicod
Copy link
Member Author

teutonicod commented Feb 22, 2019

@msevestre Thank you very much for the clarification, indeed the snapshot would do the job on a short term (within the same PK-Sim version if I gig it right) but not on the long term
@Yuri05 This is the error I get loading the snapshot

Information: Loading Project from snapshot file 
Error: Object reference not set to an instance of an object.

For more information or questions, please visit the Open Systems Pharmacology Forum (forum.open-systems-pharmacology.org).

Stack trace:
at OSPSuite.Core.Domain.Services.ParameterIdentifications.IdentificationParameterFactory.<>c.<ensureThatDimensionsAreEqual>b__8_0(IParameter x)
   at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
   at System.Linq.Enumerable.<DistinctIterator>d__64`1.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at OSPSuite.Core.Domain.Services.ParameterIdentifications.IdentificationParameterFactory.ensureThatDimensionsAreEqual(IEnumerable`1 parameters)
   at OSPSuite.Core.Domain.Services.ParameterIdentifications.IdentificationParameterFactory.CreateFor(IEnumerable`1 parameterSelections, ParameterIdentification parameterIdentification)
   at PKSim.Core.Snapshots.Mappers.IdentificationParameterMapper.<MapToModel>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Core.Snapshots.Mappers.SnapshotMapperBaseExtensions.<MapTo>d__9`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Core.Snapshots.Mappers.ParameterIdentificationMapper.<MapToModel>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Core.Snapshots.Mappers.SnapshotMapperBaseExtensions.<MapTo>d__9`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Core.Snapshots.Mappers.ProjectMapper.<MapToModel>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Core.Snapshots.Mappers.SnapshotMapperBase`2.<MapToModel>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Core.Snapshots.Services.SnapshotTask.<LoadModelFromSnapshot>d__14`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Core.Snapshots.Services.SnapshotTask.<LoadProjectFromSnapshot>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Presentation.Presenters.Snapshots.LoadProjectFromSnapshotPresenter.<LoadModelAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at PKSim.Presentation.Presenters.Snapshots.LoadFromSnapshotPresenter`1.<PerformLoad>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at PKSim.Presentation.Presenters.Snapshots.LoadFromSnapshotPresenter`1.<Start>d__14.MoveNext()

@msevestre
Copy link
Member

Ok I could reproduce the issue
Bug in PKSim, but also slight user nonsense :)

@msevestre
Copy link
Member

closing in favor of the issue in core

@msevestre msevestre reopened this Feb 22, 2019
@msevestre
Copy link
Member

actually will keep it open until we implement it in core

@msevestre msevestre added this to the Version 9 milestone Feb 10, 2020
@msevestre msevestre added this to Accepted in Version 9 via automation Feb 10, 2020
@msevestre msevestre self-assigned this Feb 10, 2020
msevestre added a commit that referenced this issue Feb 10, 2020
Version 9 automation moved this from Accepted to Fixed Feb 10, 2020
@msevestre
Copy link
Member

@teutonicod Can you verify that the issue is fixed with v9? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Version 9
  
Fixed
Development

No branches or pull requests

3 participants