- ago
WL7 Build 15: This message is seen for all optimizers in finantic.Optimizer Build 2.
1
1,412
Solved
31 Replies

Reply

Bookmark

Sort
- ago
#1
Also all optimizers throw this exception for me:

System.Collections.Generic.KeyNotFoundException: The given key '' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at OptResultViewer.UserControl1.RedrawLines(StrategyOptimizer stratOpt)
at OptResultViewer.UserControl1.Populate(StrategyOptimizer stratOpt)
at CreatorPolicy.ForgotException(Object , StrategyOptimizer , CreatorPolicy )
at WealthLab7.ucOptimization.MoveAdapter(Object reference, RunWorkerCompletedEventArgs pol)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
1
Glitch8
 ( 10.41% )
- ago
#2
Hmmm they are working for me in build 15 but let me try a fresh install and see if that makes a difference.
0
- ago
#3
I was also seeing the exception in Eugene's reply. However, that exception no longer appears in the Log, apparently replaced with the message identified by the topic.
0
Glitch8
 ( 10.41% )
- ago
#4
DrKoch just released a Build 3 of finantic.Optimizers, let's upgrade to this release and see if it helps resolve the remaining issue!

https://www.wealth-lab.com/extension/detail/finantic.Optimizer
1
- ago
#5
WL7 Build 15 (finantic.Optimizer Build 3): Clean install. Still getting "Object reference not set to an instance of an object."
0
Glitch8
 ( 10.41% )
- ago
#6
Did you try every Optimizer? The only one that is generating an error for me is:



I reached out to Rene Koch about this, the remaining optimizers in the extension are working fine on my machines.
0
- ago
#7
I tried all the optimizers provded by finantic.Optimer Build 3. I recieved the error for each. Each optimizer begins, then after 10-30 seconds it aborts with the afformentioned message.
1
- ago
#8
I tested finantic.Optimizer with several strategies and settings without any problems.

Can you please either explain what strategy you are using (along with strategy settings like DataSet etc.)

-or -

Try to reproduce this error with one of the publicly available Strategies and DataSets.

This would help in improving things tremendously.
0
- ago
#9
WL7: Build 15
Optimizers: Build 3
Strategy: Gap Closer
Dataset DOW30
Period: 10 Years of EOD

Grid Search, and Random Search completed with no issues.

Bayesian Optimization, Globalized Bounded Nelder-Mead, and Particle Swarm experienced an exception (see below).

SMAC completed then threw the same exception.

Log details:

8/17/2021 13:03:51:155
TypeLoader
Error loading finantic.Optimizer.dll: Unable to load one or more of the requested types.
Could not load file or assembly 'finantic.SharpLearning, Version=0.31.8.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
ReflectionTypeLoadException
Unable to load one or more of the requested types.
Could not load file or assembly 'finantic.SharpLearning, Version=0.31.8.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at PolicyParam.CountStub(Object , PolicyParam )
at WealthLab.Core.TypeLoader.LoadTypes(Assembly asm)
at WealthLab.Core.TypeLoader.ConductSearch(String path, String searchPattern)
--------
8/17/2021 13:04:05:816
Dummy Broker
Welcome bengh80503, you are now connected to our Dummy Broker!

--------
8/17/2021 13:04:48:257
WL7
The given key 'NULL' was not present in the dictionary.
KeyNotFoundException
The given key 'NULL' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at OptResultViewer.UserControl1.RedrawLines(StrategyOptimizer stratOpt)
at OptResultViewer.UserControl1.Populate(StrategyOptimizer stratOpt)
at CreatorPolicy.ForgotException(Object , StrategyOptimizer , CreatorPolicy )
at WealthLab7.ucOptimization.MoveAdapter(Object reference, RunWorkerCompletedEventArgs pol)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
--------
8/17/2021 13:05:16:612
Grid Search
Requested 30 iterations, executed 30 backtests in 00:00:05.9584997 on 16 processors
min.duration: 00:00:01.2076358, avg.duration: 00:00:02.8120000, max.duration: 00:00:05.9469665

--------
8/17/2021 13:05:28:213
WL7
The given key 'NULL' was not present in the dictionary.
KeyNotFoundException
The given key 'NULL' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at OptResultViewer.UserControl1.RedrawLines(StrategyOptimizer stratOpt)
at OptResultViewer.UserControl1.Populate(StrategyOptimizer stratOpt)
at CreatorPolicy.ForgotException(Object , StrategyOptimizer , CreatorPolicy )
at WealthLab7.ucOptimization.MoveAdapter(Object reference, RunWorkerCompletedEventArgs pol)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
--------
8/17/2021 13:05:48:118
Random Search
Requested 100 iterations, executed 64 backtests in 00:00:10.8127886 on 16 processors
min.duration: 00:00:01.0549218, avg.duration: 00:00:01.8560000, max.duration: 00:00:08.0178543

--------
8/17/2021 13:06:18:417
SMAC
Requested 60 iterations, executed 25 backtests in 00:00:16.5542096 on 16 processors
min.duration: 00:00:00.4391052, avg.duration: 00:00:00.6550000, max.duration: 00:00:04.1426471

--------
8/17/2021 13:06:19:223
WL7
The given key '' was not present in the dictionary.
KeyNotFoundException
The given key '' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at OptResultViewer.UserControl1.RedrawLines(StrategyOptimizer stratOpt)
at OptResultViewer.UserControl1.Populate(StrategyOptimizer stratOpt)
at CreatorPolicy.ForgotException(Object , StrategyOptimizer , CreatorPolicy )
at WealthLab7.ucOptimization.MoveAdapter(Object reference, RunWorkerCompletedEventArgs pol)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
--------
0
- ago
#10
WL7: Build 15
Optimizers: Build 3
Strategy: BeMultiStrategy
Dataset DOW30
Period: 10 Years of EOD

All finantic optizers do not complete. The message "Object reference is not set to an instance of an object" is displayed next to the "Start Optimization" button. The optimizer "KeyNotFound" exceptions do not appear in the log.
1
- ago
#11
finantic.optimizers worked in WL7-17B for about 2 hrs, now having "One or more errors occurred (The given key 'NULL' was not present in the dictionary) with Bayesian Optimization and Globalized Bounded. i have restarted WL7 with no improvement

1
Glitch8
 ( 10.41% )
- ago
#12
i know Rene is working hard on a new release to fix this!
1
- ago
#13
I'm running into the same error, where I see "The given key 'NULL' was not present in the dictionary". I am using the latest version of WealthLab and the latest version of the Optimizer extension. Looking forward to a fix when it becomes available!
0
Glitch8
 ( 10.41% )
- ago
#14
Should be out later this week!
2
- ago
#15
Unfortunately, I still have the same error, even after updating to the latest version of WealthLab and the latest version of the extension.

Whenever I attempt to configure one of the optimization methods, the dropdown list of metric names is always completely empty. Is this related to the bug?

The problem doesn't occur for standard optimization methods like "Shrinking Window".
0
- ago
#16
Yes it is related to the "Metric Name" ComboBox.

We have a fix, I sent it to WL, but it will take a moment before it appears on the "Extensions" page.

I am very sorry for the inconvenience.
1
- ago
#17
Hello DrKoch and Glitch,

Any chance we could get a brief update on the latest status of this fix? Thank you for all of your efforts, I'm really looking forward to being able to use SMAC and the other optimizers again at some point in the future.
0
- ago
#18
In a combined effort we found and fixed some bugs caused by incompatibilities between different builds.

I created Build 5 of finantic.Optimizers. This should appear on the Extensions page soon.

If you can't wait:
(for advanced users only)
With Build 4 of finantic.Optimizers you could improve the situation by cleaning the Settings.txt file in (typically)
C:\Users\<yourName>\AppData\Roaming\WealthLab7

AppData is a hidden folder, so you need to adapt the settings of Windows explorer to see it.

Just remove the line starting with "SMACSettings" (it is a very long line) and restart WL.

1
- ago
#19
@mdosey

Simply choose "Open Wealth-Lab User Data Folder" from Wealth-Lab's File menu (requires build 22) and follow DrKoch's suggestion re: Windows Explorer.
1
- ago
#20
Thank you both for the suggestion. I followed the instructions very carefully, but still get the same error. I will wait until Build 5 is available, and see if that makes any difference.

EDIT: I just tried doing a clean installation of Wealth Lab onto an entirely separate computer, and SMAC seems to be working there. So it must be some cached data on my main workstation, or a particular plugin, or some custom extension code that is causing the conflict. But at least I have a way to move forward and continue using SMAC, now.
0
- ago
#21
mdosey, could you send me an email: rene dot koch at finantic dot de. Probably we can speed up things...
0
mrsic8
 ( 9.54% )
- ago
#22
Hello,

i have two problems.
First:
and second:


can someone please help me?

10 Years EOD data
Strategy using: ConsecUpDown, StochD, ATR and TBX for long and short.
The same errors, except at "Shrinking Window."

Kind regard

0
Glitch8
 ( 10.41% )
- ago
#23
Show us your Optimization Parameters?
0
mrsic8
 ( 9.54% )
- ago
#24
Okay, here.
0
Glitch8
 ( 10.41% )
- ago
#25
It looks like the finantic optimizer and perhaps shrinking window are having a problem with the parameter with the start and stop values set equally to 1. Try changing the stop value to 2 and see if that helps. I’m away from the computer for a bit but can confirm later tonight.
0
mrsic8
 ( 9.54% )
- ago
#26
Hi Glitch,

Thanks. It seems that was the error in the settings of parameters.
SMAC is working. Until now is fine.

Kind regard
0
mrsic8
 ( 9.54% )
- ago
#27
Hello,

is that only by me?

I got the error "Object reference not set to an instance..." if I only test short!

otherwise it works.


Does anyone know, is that normal?

Kind regard


0
- ago
#28
Hmm....
This is probably an ugly bug triggered if you restart an optimization with a different set of active parameters.

Could you please (for now) try to restart WL between optimizer runs if you activate/deactivate parameters?
0
mrsic8
 ( 9.54% )
- ago
#29
I restarted wl7 and immediately removed the parameters for long, but the same error.
0
mrsic8
 ( 9.54% )
- ago
#30
Hello DrKoch,

will the error be fixed?

Kind regard
0
- ago
#31
I fixed this bug in Build 8 of finantic.Optimizers. This build is now available on WL's extension page.
1
Best Answer

Reply

Bookmark

Sort