I am am relatively new to c# and the infer.net library. I was wondering how I could parallelize a simulation I was analyzing with infer.net
Currently I have
Parallel.ForEach(inputs, new ParallelOptions { MaxDegreeOfParallelism = 4 },
x => AssessSim(x.n, x.q, x.a, x.r));
where AssessSim creates and runs an infer.net model and inputs is some simulation settings. When I tried this I got:
System.InvalidOperationException: 'Object is currently in use elsewhere.'
What would be the best way to move forward?