sailthru / relay

A self-tuning thermostat for distributed systems that minimizes the error between some metric and a target
Apache License 2.0
40 stars 5 forks source link

some numpy something? #2

Open automaticgiant opened 5 years ago

automaticgiant commented 5 years ago

seen this with python2 or 3.

 relay --metric bash_echo_metric --warmer bash_echo_warmer --delay 2 --targe
t 200
INFO     Starting relay!    lookback=1000 warmer=<function bash_echo_warmer at 0x7f44c85ae730> target=<function targettype.<locals>.infinite_iterator at 0x7f44c85a5ea0> ramp=1 delay=2.0 cooler=None stop_condition=None metric=<function bash_echo_metric at 0x7f44c85ae6a8> sendstats=None
DEBUG    got metric value    PV=1 SP=200
DEBUG    adding heat    MV=199 err=199
DEBUG    got metric value    PV=200 SP=200
WARNING  no variation in the signal.  fft cannot continue
INFO     data    data=[0, 1, 0.0]
DEBUG    stabilized PV at setpoint    PV=200 SP=200 MV=0
DEBUG    got metric value    PV=200 SP=200
WARNING  no variation in the signal.  fft cannot continue
INFO     data    data=[0, 1, 0.0]
DEBUG    stabilized PV at setpoint    PV=200 SP=200 MV=0
DEBUG    got metric value    PV=181 SP=200
INFO     data    data=[19, 0.3333333333333333, 4.75]
DEBUG    adding heat    MV=17 err=19
DEBUG    got metric value    PV=94 SP=200
INFO     data    data=[106, 0.2360679774997897, 25.0]
DEBUG    adding heat    MV=100 err=106
DEBUG    got metric value    PV=118 SP=200
Traceback (most recent call last):
  File "/home/automaticgiant/.local/share/virtualenvs/work-tJEz75H6/bin/relay", line 11, in <module>
    sys.exit(go())
  File "/home/automaticgiant/.local/share/virtualenvs/work-tJEz75H6/lib/python3.6/site-packages/relay/__main__.py", line 9, in go
    main(NS)
  File "/home/automaticgiant/.local/share/virtualenvs/work-tJEz75H6/lib/python3.6/site-packages/relay/runner.py", line 161, in main
    weight = calc_weight(errdata)
  File "/home/automaticgiant/.local/share/virtualenvs/work-tJEz75H6/lib/python3.6/site-packages/relay/runner.py", line 57, in calc_weight
    p_k[not_idxs] = 0
IndexError: boolean index did not match indexed array along dimension 0; dimension is 2 but corresponding boolean dimension is 1