[英]Python: how to read variables from another process?
So i'm building a custom machine learning simulation and wanting to read certain values from a training process, in another one to visualize real time training data. 因此,我正在构建一个自定义的机器学习模拟,并希望从训练过程中读取某些值,在另一个过程中以可视化方式显示实时训练数据。
So for example, the training simulation has an array of values under a data structure. 因此,例如,训练模拟在数据结构下具有一组值。 Let's say the data structure is an instantiated class called
data
. 假设数据结构是一个名为
data
的实例化类。 Inside this class, there is a list of values, let's call it values
. 在此类内,有一个值列表,我们称其为
values
。
This simulation has a training loop, so while that training loop is going, I would like to run another script that can query data.values
and do something with it. 该模拟有一个训练循环,因此在进行该训练循环时,我想运行另一个可以查询
data.values
并对其进行处理的脚本。
Is this possible? 这可能吗? - Ideally I would like to keep my simulation code as is so as to not add necessary bulk.
-理想情况下,我想保持仿真代码不变,以免增加必要的批量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.