{"action":"created","issue":{"url":"https://api.github.com/repos/regel/loudml/issues/103","repository_url":"https://api.github.com/repos/regel/loudml","labels_url":"https://api.github.com/repos/regel/loudml/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/regel/loudml/issues/103/comments","events_url":"https://api.github.com/repos/regel/loudml/issues/103/events","html_url":"https://github.com/regel/loudml/issues/103","id":417704659,"node_id":"MDU6SXNzdWU0MTc3MDQ2NTk=","number":103,"title":"Documentation: Unclear the difference between predict and forecast","user":{"login":"AicyDC","id":30808129,"node_id":"MDQ6VXNlcjMwODA4MTI5","avatar_url":"https://avatars3.githubusercontent.com/u/30808129?v=4","gravatar_id":"","url":"https://api.github.com/users/AicyDC","html_url":"https://github.com/AicyDC","followers_url":"https://api.github.com/users/AicyDC/followers","following_url":"https://api.github.com/users/AicyDC/following{/other_user}","gists_url":"https://api.github.com/users/AicyDC/gists{/gist_id}","starred_url":"https://api.github.com/users/AicyDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AicyDC/subscriptions","organizations_url":"https://api.github.com/users/AicyDC/orgs","repos_url":"https://api.github.com/users/AicyDC/repos","events_url":"https://api.github.com/users/AicyDC/events{/privacy}","received_events_url":"https://api.github.com/users/AicyDC/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-03-06T09:32:13Z","updated_at":"2019-03-06T10:57:41Z","closed_at":null,"author_association":"NONE","body":"Predict command: The predict command will return model predictions for a given time range, and a given model.\r\nForecast command: The forecast command will return a time series forecast for a given time range, and a given model. \r\n\r\nI don't understand the difference between these two?\r\n\r\nAlso I have been unable to use either to make predictions. When I use both the CLI and the chronograf interface to predict a day in the future, or press the play button, the resulting graph I can view does not go past the present.\r\n\r\nThis is an example of one of the models I am using:\r\n`\r\n{\r\n    \"offset\": \"30s\",\r\n    \"features\": {\r\n        \"io\": [\r\n            {\r\n                \"metric\": \"avg\",\r\n                \"field\": \"usage_system\",\r\n                \"name\": \"used\",\r\n                \"default\": 0,\r\n                \"measurement\": \"cpu\",\r\n                \"anomaly_type\": \"high\"\r\n            }\r\n        ]\r\n    },\r\n    \"bucket_interval\": \"40s\",\r\n    \"name\": \"high_bucket\",\r\n    \"default_datasource\": \"influx\",\r\n    \"interval\": \"20s\",\r\n    \"max_evals\": 5,\r\n    \"type\": \"donut\",\r\n    \"span\": 10,\r\n    \"forecast\": 5,\r\n    \"seasonality\": {\r\n        \"daytime\": true,\r\n        \"weekday\": true\r\n    }\r\n}\r\n`\r\n"},"comment":{"url":"https://api.github.com/repos/regel/loudml/issues/comments/470063966","html_url":"https://github.com/regel/loudml/issues/103#issuecomment-470063966","issue_url":"https://api.github.com/repos/regel/loudml/issues/103","id":470063966,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MDA2Mzk2Ng==","user":{"login":"AicyDC","id":30808129,"node_id":"MDQ6VXNlcjMwODA4MTI5","avatar_url":"https://avatars3.githubusercontent.com/u/30808129?v=4","gravatar_id":"","url":"https://api.github.com/users/AicyDC","html_url":"https://github.com/AicyDC","followers_url":"https://api.github.com/users/AicyDC/followers","following_url":"https://api.github.com/users/AicyDC/following{/other_user}","gists_url":"https://api.github.com/users/AicyDC/gists{/gist_id}","starred_url":"https://api.github.com/users/AicyDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AicyDC/subscriptions","organizations_url":"https://api.github.com/users/AicyDC/orgs","repos_url":"https://api.github.com/users/AicyDC/repos","events_url":"https://api.github.com/users/AicyDC/events{/privacy}","received_events_url":"https://api.github.com/users/AicyDC/received_events","type":"User","site_admin":false},"created_at":"2019-03-06T10:57:41Z","updated_at":"2019-03-06T10:57:41Z","author_association":"NONE","body":"Training CLI output:\r\n```\r\nroot@919535c3b6bc:/# loudml train --from \"now-18h\" --to \"now\" high_bucket\r\nINFO:root:connecting to influxdb on influxdb:8086, using database 'chronograf'\r\nINFO:root:train(high_bucket) range=2019-03-05T16:37:20.000Z-2019-03-06T10:38:00.000Z train_size=0.670000 batch_size=256 epochs=100)\r\nINFO:root:connecting to influxdb on influxdb:8086, using database 'telegraf'\r\nINFO:root:found 1621 time periods\r\nINFO:hyperopt.tpe:tpe_transform took 0.001926 seconds\r\nINFO:hyperopt.tpe:TPE using 0 trials\r\nINFO:hyperopt.tpe:tpe_transform took 0.002852 seconds\r\nINFO:hyperopt.tpe:TPE using 1/1 trials with best loss 11.363714\r\nINFO:hyperopt.tpe:tpe_transform took 0.002176 seconds\r\nINFO:hyperopt.tpe:TPE using 1/2 trials with best loss 11.363714\r\nINFO:hyperopt.tpe:tpe_transform took 0.002942 seconds\r\nINFO:hyperopt.tpe:TPE using 2/3 trials with best loss 11.363714\r\nINFO:hyperopt.tpe:tpe_transform took 0.002163 seconds\r\nINFO:hyperopt.tpe:TPE using 3/4 trials with best loss 9.021168\r\nTraceback (most recent call last):\r\n  File \"/usr/bin/loudml\", line 11, in <module>\r\n    load_entry_point('loudml==1.5.0', 'console_scripts', 'loudml')()\r\n  File \"/usr/lib/python3/dist-packages/loudml/cli.py\", line 867, in main\r\n    args.exec(args)\r\n  File \"/usr/lib/python3/dist-packages/loudml/cli.py\", line 538, in exec\r\n    windows=windows,\r\n  File \"/usr/lib/python3/dist-packages/loudml/donut.py\", line 974, in train\r\n    abnormal=abnormal,\r\n  File \"/usr/lib/python3/dist-packages/loudml/donut.py\", line 736, in _train_on_dataset\r\n    trials=trials,\r\n  File \"/usr/lib/loudml/vendor/hyperopt/fmin.py\", line 307, in fmin\r\n    return_argmin=return_argmin,\r\n  File \"/usr/lib/loudml/vendor/hyperopt/base.py\", line 635, in fmin\r\n    return_argmin=return_argmin)\r\n  File \"/usr/lib/loudml/vendor/hyperopt/fmin.py\", line 322, in fmin\r\n    return trials.argmin\r\n  File \"/usr/lib/loudml/vendor/hyperopt/base.py\", line 590, in argmin\r\n    best_trial = self.best_trial\r\n  File \"/usr/lib/loudml/vendor/hyperopt/base.py\", line 584, in best_trial\r\n    assert not np.any(np.isnan(losses))\r\nAssertionError\r\n```\r\n\r\nTraining log output:\r\n```\r\nINFO:root:job[93162bf9-5ca2-4f87-8290-c33f93a3f10a] starting, nice=0\r\nINFO:root:predict(high_bucket) range=2019-03-06T10:36:40.000Z-2019-03-06T10:38:00.000Z\r\nINFO:root:setting threshold range min=68.000000 max=99.700000\r\nINFO:root:extracting data for range=2019-03-06T10:30:40.000Z-2019-03-06T10:38:00.000Z\r\nINFO:root:connecting to influxdb on influxdb:8086, using database 'telegraf'\r\nINFO:root:found 11 time periods\r\nINFO:root:generating prediction\r\nINFO:root:job[93162bf9-5ca2-4f87-8290-c33f93a3f10a] predicted values for 2 time buckets\r\nINFO:root:saving 'high_bucket' prediction to 'influx'\r\nINFO:root:job[93162bf9-5ca2-4f87-8290-c33f93a3f10a] done\r\nINFO:root:job[5bf18a2b-4b93-41fd-a75f-050dad6908b8] starting, nice=0\r\nINFO:root:predict(used_mem1) range=2019-03-06T10:36:00.000Z-2019-03-06T10:38:00.000Z\r\nINFO:root:setting threshold range min=68.000000 max=99.700000\r\nINFO:root:extracting data for range=2019-03-06T10:27:00.000Z-2019-03-06T10:38:00.000Z\r\nINFO:root:connecting to influxdb on influxdb:8086, using database 'telegraf'\r\nINFO:root:found 11 time periods\r\nINFO:root:generating prediction\r\nINFO:root:job[5bf18a2b-4b93-41fd-a75f-050dad6908b8] predicted values for 2 time buckets\r\nWARNING:root:anomaly still in progress for model 'used_mem1' at 2019-03-06T10:36:00.000Z (score = 99.9)\r\nINFO:root:saving 'used_mem1' prediction to 'influx'\r\nINFO:root:job[5bf18a2b-4b93-41fd-a75f-050dad6908b8] done\r\nINFO:root:job[67978f56-5f20-45cb-86aa-b3f2cb704f1c] starting, nice=0\r\nINFO:root:predict(disk_used_percent) range=2019-03-06T10:37:00.000Z-2019-03-06T10:38:20.000Z\r\nINFO:root:setting threshold range min=68.000000 max=99.700000\r\nINFO:root:extracting data for range=2019-03-06T10:30:40.000Z-2019-03-06T10:38:20.000Z\r\nINFO:root:connecting to influxdb on influxdb:8086, using database 'telegraf'\r\nINFO:root:found 23 time periods\r\nINFO:root:generating prediction\r\nINFO:root:job[67978f56-5f20-45cb-86aa-b3f2cb704f1c] predicted values for 4 time buckets\r\nWARNING:root:anomaly still in progress for model 'disk_used_percent' at 2019-03-06T10:37:00.000Z (score = 100.0)\r\nWARNING:root:anomaly still in progress for model 'disk_used_percent' at 2019-03-06T10:37:20.000Z (score = 100.0)\r\nWARNING:root:anomaly still in progress for model 'disk_used_percent' at 2019-03-06T10:37:40.000Z (score = 100.0)\r\nWARNING:root:anomaly still in progress for model 'disk_used_percent' at 2019-03-06T10:38:00.000Z (score = 100.0)\r\nINFO:root:saving 'disk_used_percent' prediction to 'influx'\r\nINFO:root:job[67978f56-5f20-45cb-86aa-b3f2cb704f1c] done\r\nINFO:root:job[6d929cad-4917-48e6-a4c5-e382c3657f14] starting, nice=0\r\nINFO:root:predict(high_bucket) range=2019-03-06T10:37:20.000Z-2019-03-06T10:38:00.000Z\r\nINFO:root:setting threshold range min=68.000000 max=99.700000\r\nINFO:root:extracting data for range=2019-03-06T10:31:20.000Z-2019-03-06T10:38:00.000Z\r\nINFO:root:connecting to influxdb on influxdb:8086, using database 'telegraf'\r\nINFO:root:found 10 time periods\r\nINFO:root:generating prediction\r\nINFO:root:job[6d929cad-4917-48e6-a4c5-e382c3657f14] predicted values for 1 time buckets\r\nINFO:root:saving 'high_bucket' prediction to 'influx'\r\nINFO:root:job[6d929cad-4917-48e6-a4c5-e382c3657f14] done\r\nINFO:root:job[74596cf6-f49c-45d1-af29-3cd3d590ad42] starting, nice=0\r\nINFO:root:predict(high_bucket) range=2019-03-06T10:37:20.000Z-2019-03-06T10:38:40.000Z\r\nINFO:root:setting threshold range min=68.000000 max=99.700000\r\nINFO:root:extracting data for range=2019-03-06T10:31:20.000Z-2019-03-06T10:38:40.000Z\r\nINFO:root:connecting to influxdb on influxdb:8086, using database 'telegraf'\r\nINFO:root:found 11 time periods\r\nINFO:root:generating prediction\r\nINFO:root:job[74596cf6-f49c-45d1-af29-3cd3d590ad42] predicted values for 2 time buckets\r\nWARNING:root:detected anomaly for model 'high_bucket' at 2019-03-06T10:38:00.000Z (score = 100.0)\r\nINFO:root:saving 'high_bucket' prediction to 'influx'\r\nINFO:root:job[74596cf6-f49c-45d1-af29-3cd3d590ad42] done\r\n```\r\n\r\nForecast CLI output:\r\n```\r\nroot@919535c3b6bc:/# loudml forecast --from \"now\" --to \"now+1d\" high_bucket -s\r\nINFO:root:forecast(high_bucket) range=2019-03-06T10:51:20.000Z-2019-03-07T10:52:00.000Z\r\nINFO:root:setting threshold range min=68.000000 max=99.700000\r\nINFO:root:extracting data for range=2019-03-06T10:45:20.000Z-2019-03-07T10:52:00.000Z\r\nINFO:root:connecting to influxdb on influxdb:8086, using database 'telegraf'\r\nINFO:root:missing data: field 'usage_system', metric 'avg', bucket: 2019-03-06T10:52:00Z\r\nINFO:root:missing data: field 'usage_system', metric 'avg', bucket: 2019-03-06T10:52:40Z\r\nINFO:root:missing data: field 'usage_system', metric 'avg', bucket: 2019-03-06T10:53:20Z\r\n.\r\n.\r\n. Lots of the same with different times\r\n.\r\nINFO:root:missing data: field 'usage_system', metric 'avg', bucket: 2019-03-07T10:50:00Z\r\nINFO:root:missing data: field 'usage_system', metric 'avg', bucket: 2019-03-07T10:50:40Z\r\nINFO:root:missing data: field 'usage_system', metric 'avg', bucket: 2019-03-07T10:51:20Z\r\nINFO:root:found 2170 time periods\r\nINFO:root:generating prediction\r\nINFO:root:saving 'high_bucket' prediction to 'influx'\r\n```\r\n\r\nNothing showed up in the docker logs of the loudml machine for forecasting."}}
{"actor":{"display_login":"AicyDC"}}