Take the update DataCollector code from khiem/simple_algo, prevent AI threads from getting InterruptedException