Free cookie consent management tool by TermsFeed Policy Generator

Opened 7 years ago

Last modified 3 years ago

#2882 assigned enhancement

Deserialization of RegressionModels triggers a recalcuatlion of estimated values — at Version 3

Reported by: pfleck Owned by:
Priority: medium Milestone: HeuristicLab 3.3.17
Component: Problems.DataAnalysis Version:
Keywords: Cc:

Description (last modified by mkommend)

On deserializing a gradient boosted tree solution, the GBTSurrogateModel recaltulates the actual GBTModel even if the model is not yet used - which can be quite runtime expensive.

Instead, the model should only be created when the model is actually needed to estimate values.

Change History (3)

comment:1 Changed 7 years ago by mkommend

  • Component changed from Algorithms.DataAnalysis to Problems.DataAnalysis
  • Description modified (diff)
  • Priority changed from medium to high
  • Summary changed from Create GBT-model lazily after deserialization to Deserialization of RegressionModels triggers a recalcuatlion of estimated values
  • Type changed from enhancement to defect

comment:2 Changed 7 years ago by pfleck

For GBT to enable lazy loading, the Lazy<T>.IsValueCreated must be checked before checking for null in the cloning constructor. Otherwise, the check for null triggers the expensive model-creation.

if (original.actualModel.IsValueCreated && original.ActualModel != null) clonedModel = cloner.Clone(original.ActualModel);

However, this fix causes the GUI to freeze because recalculating is triggered later on the GUI-thread. In the future, a progress bar should indicate that the recalculation is ongoing.

comment:3 Changed 7 years ago by mkommend

  • Description modified (diff)

After further investigations on this issue the following conclusions can be drawn:

  • Philipp is right
  • Only GBT models are affected, because cloning of a GBT surrogate model trigges a recalculation of the model. The fix to check whether a value is created solves this issue, but has the described disadvantage of freezing the GUI.
  • CreateEnsembleMenuItem triggers cloning of solutions whenever a view is changed to check if it should be enabled. There must be a better way with less overhead to enable /disable the menu item.
  • For models that are not stored completely a special solution view should be created that allows explicitly to trigger the model recalculation and blocks access to the solution evaluation view until the recalculation is finished.
Note: See TracTickets for help on using tickets.