Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Melodic
morphemic-preprocessor
Commits
bf63e27e
Commit
bf63e27e
authored
Jun 08, 2021
by
Anna Warno
Browse files
prediction horizon units changed
parent
17e05436
Changes
4
Hide whitespace changes
Inline
Side-by-side
deployment/nbeats/predict.py
View file @
bf63e27e
...
...
@@ -86,17 +86,17 @@ def main():
influxdb_conn
=
InfluxdbPredictionsSender
(
METHOD
,
APP_NAME
)
logging
.
debug
(
f
"waiting
{
(
msg
[
'epoch_start'
]
-
int
(
time
.
time
())
*
1000
-
prediction_cycle
)
//
1000
}
seconds"
f
"waiting
{
(
msg
[
'epoch_start'
]
-
int
(
time
.
time
())
*
1000
-
prediction_cycle
*
1000
)
//
1000
}
seconds"
)
time
.
sleep
(
max
(
0
,
(
msg
[
"epoch_start"
]
-
int
(
time
.
time
())
*
1000
-
prediction_cycle
))
max
(
0
,
(
msg
[
"epoch_start"
]
-
int
(
time
.
time
())
*
1000
-
prediction_cycle
*
1000
))
//
1000
)
tl
=
Timeloop
()
@
tl
.
job
(
interval
=
timedelta
(
seconds
=
prediction_cycle
//
1000
))
@
tl
.
job
(
interval
=
timedelta
(
seconds
=
prediction_cycle
))
def
metric_predict
():
logging
.
debug
(
"prediction"
)
dataset_preprocessor
.
prepare_csv
()
...
...
@@ -139,7 +139,7 @@ if __name__ == "__main__":
}
for
m
in
msg
[
"all_metrics"
]
}
prediction_horizon
=
msg
[
"prediction_horizon"
]
prediction_horizon
=
msg
[
"prediction_horizon"
]
*
1000
predicted_metrics
=
set
(
msg
[
"metrics"
])
prediction_cycle
=
msg
[
"prediction_horizon"
]
...
...
deployment/nbeats/retrain.py
View file @
bf63e27e
...
...
@@ -49,7 +49,7 @@ if __name__ == "__main__":
}
for
m
in
msg
[
"all_metrics"
]
}
prediction_horizon
=
msg
[
"prediction_horizon"
]
//
msg
[
"publish_rate"
]
prediction_horizon
=
(
msg
[
"prediction_horizon"
]
*
1000
)
//
msg
[
"publish_rate"
]
predicted_metrics
=
set
(
metrics_info
.
keys
())
logging
.
debug
(
f
"Predicted metrics:
{
predicted_metrics
}
"
)
main
(
predicted_metrics
,
prediction_horizon
)
deployment/tft/predict.py
View file @
bf63e27e
...
...
@@ -86,17 +86,17 @@ def main():
influxdb_conn
=
InfluxdbPredictionsSender
(
METHOD
,
APP_NAME
)
logging
.
debug
(
f
"waiting
{
(
msg
[
'epoch_start'
]
-
int
(
time
.
time
())
*
1000
-
prediction_cycle
)
//
1000
}
seconds"
f
"waiting
{
(
msg
[
'epoch_start'
]
-
int
(
time
.
time
())
*
1000
-
prediction_cycle
*
1000
)
//
1000
}
seconds"
)
time
.
sleep
(
max
(
0
,
(
msg
[
"epoch_start"
]
-
int
(
time
.
time
())
*
1000
-
prediction_cycle
))
max
(
0
,
(
msg
[
"epoch_start"
]
-
int
(
time
.
time
())
*
1000
-
prediction_cycle
*
1000
))
//
1000
)
tl
=
Timeloop
()
@
tl
.
job
(
interval
=
timedelta
(
seconds
=
prediction_cycle
//
1000
))
@
tl
.
job
(
interval
=
timedelta
(
seconds
=
prediction_cycle
))
def
metric_predict
():
logging
.
debug
(
"prediction"
)
dataset_preprocessor
.
prepare_csv
()
...
...
@@ -139,7 +139,7 @@ if __name__ == "__main__":
}
for
m
in
msg
[
"all_metrics"
]
}
prediction_horizon
=
msg
[
"prediction_horizon"
]
prediction_horizon
=
msg
[
"prediction_horizon"
]
*
1000
predicted_metrics
=
set
(
msg
[
"metrics"
])
prediction_cycle
=
msg
[
"prediction_horizon"
]
...
...
deployment/tft/retrain.py
View file @
bf63e27e
...
...
@@ -49,7 +49,7 @@ if __name__ == "__main__":
}
for
m
in
msg
[
"all_metrics"
]
}
prediction_horizon
=
msg
[
"prediction_horizon"
]
//
msg
[
"publish_rate"
]
prediction_horizon
=
(
msg
[
"prediction_horizon"
]
*
1000
)
//
msg
[
"publish_rate"
]
predicted_metrics
=
set
(
metrics_info
.
keys
())
logging
.
debug
(
f
"Predicted metrics:
{
predicted_metrics
}
"
)
main
(
predicted_metrics
,
prediction_horizon
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment