Skip to content

Commit

Permalink
Merge pull request #46 from grafana/bump-augurs-0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sd2k authored Nov 12, 2024
2 parents f678cc5 + 2573544 commit fd10bae
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion packages/scenes-ml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"url": "https://github.com/grafana/scenes/issues"
},
"dependencies": {
"@bsull/augurs": "0.5.4",
"@bsull/augurs": "0.6.0",
"@bsull/augurs-prophet-wasmstan": "0.2.0",
"date-fns": "^3.6.0"
},
Expand Down
12 changes: 11 additions & 1 deletion packages/scenes-ml/src/components/SceneBaseliner.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { MSTL, Prophet, seasonalities } from "@bsull/augurs";
import initMSTL, { MSTL } from '@bsull/augurs/mstl';
import initProphet, { initLogging, Prophet } from '@bsull/augurs/prophet';
import initSeasonalities, { seasonalities } from '@bsull/augurs/seasons';
import { optimizer } from "@bsull/augurs-prophet-wasmstan";
import { css, cx } from "@emotion/css";
import { DataFrame, DataQueryRequest, dateTime, durationToMilliseconds, Field, FieldType, GrafanaTheme2, PanelData, TimeRange } from "@grafana/data";
Expand All @@ -10,6 +12,14 @@ import React from 'react';
import { sceneGraph, SceneComponentProps, SceneObjectState, SceneObjectUrlValues, SceneObjectBase, SceneObjectUrlSyncConfig, ExtraQueryDescriptor, ExtraQueryProvider, ExtraQueryDataProcessor } from "@grafana/scenes";
import { of } from "rxjs";

Promise.all([
initMSTL(),
initProphet()
.then(() => initLogging({ maxLevel: process.env.NODE_ENV === 'development' ? 'debug' : 'warn' })),
initSeasonalities()
])
.then(() => console.log('augurs initialized'));

// The type of forecasting model to use.
//
// `prophet` uses the Facebook Prophet forecasting model. See
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { ChangepointDetector } from "@bsull/augurs";
import init, { ChangepointDetector } from "@bsull/augurs/changepoint";
import { DataFrame, DataQueryRequest, dateTime, Field, FieldType } from "@grafana/data";
import { DataTopic } from "@grafana/schema";
import { ButtonGroup, Checkbox, ToolbarButton } from "@grafana/ui";
import React from 'react';
import { of } from "rxjs";

init().then(() => console.log('augurs changepoints initialized'));

import { SceneComponentProps, SceneObjectState, SceneObjectUrlValues, SceneObjectBase, SceneObjectUrlSyncConfig, ExtraQueryDataProcessor, ExtraQueryProvider, ExtraQueryDescriptor } from "@grafana/scenes";

export interface Changepoint {
Expand Down
4 changes: 3 additions & 1 deletion packages/scenes-ml/src/components/SceneOutlierDetector.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { LoadedOutlierDetector, OutlierDetector } from "@bsull/augurs";
import init, { LoadedOutlierDetector, OutlierDetector } from "@bsull/augurs/outlier";
import { DataFrame, DataQueryRequest, FieldType, GrafanaTheme2, PanelData, colorManipulator, outerJoinDataFrames } from "@grafana/data";
import { DataTopic, FieldColorModeId } from "@grafana/schema";
import { ButtonGroup, Checkbox, RadioButtonGroup, Slider, ToolbarButton, Tooltip, useStyles2 } from "@grafana/ui";
Expand All @@ -8,6 +8,8 @@ import { SceneComponentProps, SceneObjectState, SceneObjectUrlValues, SceneObjec
import { css, cx } from '@emotion/css';
import { of } from 'rxjs';

init().then(() => console.log('augurs outliers initialized'));

// A subset of an outlying series, with a start and end time.
interface Outlier {
// The index of the series in the data frame.
Expand Down
5 changes: 0 additions & 5 deletions packages/scenes-ml/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import init, { initLogging } from '@bsull/augurs';
// eslint-disable-next-line no-console
init().then(() => initLogging({ maxLevel: 'warn' }));


export { SceneBaseliner } from './components/SceneBaseliner';
export { SceneChangepointDetector } from './components/SceneChangepointDetector';
export { SceneOutlierDetector } from './components/SceneOutlierDetector';
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3316,10 +3316,10 @@ __metadata:
languageName: node
linkType: hard

"@bsull/augurs@npm:0.5.4":
version: 0.5.4
resolution: "@bsull/augurs@npm:0.5.4"
checksum: 10/cef0b6aa6ceed3856788f3d8f6b6cbe9e546af9431a0e07f781ede4061d43bdc881e3212b0269078154c50164e018812952fac60c7a9b81023e22beed1ac73f4
"@bsull/augurs@npm:0.6.0":
version: 0.6.0
resolution: "@bsull/augurs@npm:0.6.0"
checksum: 10/0ba2ea0432f7d4c44ccec4d112e672f8d5d977407be42ff5995e1d6641b4b0238f97b9cdf13bc1fc066559bbd54e6fb00ad1f418014823a6c22af619e7a29c6a
languageName: node
linkType: hard

Expand Down Expand Up @@ -4614,7 +4614,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@grafana/scenes-ml@workspace:packages/scenes-ml"
dependencies:
"@bsull/augurs": "npm:0.5.4"
"@bsull/augurs": "npm:0.6.0"
"@bsull/augurs-prophet-wasmstan": "npm:0.2.0"
"@emotion/css": "npm:11.10.5"
"@emotion/react": "npm:11.10.5"
Expand Down

0 comments on commit fd10bae

Please sign in to comment.