Changes:增加了自动生成修改数据变csv的格式
This commit is contained in:
22
average.py
Normal file
22
average.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from algorithm import algorithm
|
||||
import json
|
||||
import ray
|
||||
|
||||
@ray.remote
|
||||
class step(algorithm):
|
||||
def __init__(self):
|
||||
self.config_dict_ = None
|
||||
self.config_ = None
|
||||
self.average_number_ = 10
|
||||
self.window_1_ = None
|
||||
|
||||
def set_config(self, config):
|
||||
self.config_ = config
|
||||
self.config_dict_ = json.loads(self.config_)
|
||||
self.average_number_ = self.config_dict_["AVERAGE_NUMBER"]
|
||||
|
||||
def config(self):
|
||||
return self.config_
|
||||
|
||||
def eval(self, value):
|
||||
return value * self.amplitude_base_
|
||||
3
average_func_test.py
Normal file
3
average_func_test.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from algorithm import algorithm
|
||||
import json
|
||||
import ray
|
||||
Reference in New Issue
Block a user