Skip to content

Commit

Permalink
Pyre Configurationless migration for] [batch:24/112] [shard:6/N]
Browse files Browse the repository at this point in the history
Reviewed By: connernilsen

Differential Revision: D54439594

fbshipit-source-id: a54df82ef607b2374631925199902f845823e985
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Mar 2, 2024
1 parent 713ab49 commit 658294c
Show file tree
Hide file tree
Showing 152 changed files with 304 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kats/compat/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

from __future__ import annotations

try:
Expand Down
2 changes: 2 additions & 0 deletions kats/compat/pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import math
from typing import Any, Dict, Union

Expand Down
2 changes: 2 additions & 0 deletions kats/compat/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

from typing import Optional

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions kats/compat/statsmodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import logging
from typing import Any, Dict, Optional, Sequence, Tuple, Union

Expand Down
2 changes: 2 additions & 0 deletions kats/consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains some of the key data structures in the Kats library,
including :class:`TimeSeriesData`, :class:`TimeSeriesChangePoint`, and
Expand Down
2 changes: 2 additions & 0 deletions kats/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""Base I/O code for time series data in Kats
This is a base implementation to load datasets for test and evaluation/benchmarking
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/anomaly_postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


import logging

Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/bocpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


"""
This module contains classes and functions used for implementing
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/bocpd_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This file implements the Bayesian Online Changepoint Detection
algorithm as a DetectorModel, to provide a common interface.
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/cusum_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


"""
CUSUM stands for cumulative sum, it is a changepoint detection algorithm.
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/cusum_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""CUSUMDetectorModel is a wraper of CUSUMDetector to detect multiple change points
Typical usage example:
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
Defines the base class for detectors.
"""
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/detector_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

from __future__ import annotations

from dataclasses import dataclass
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/distribution_distance_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


import json
import logging
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/dtwcpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This file implements the Dynamic Time Warping (DTW) ChangePoint detector
algorithm as a DetectorModel, to provide a common interface.
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/hourly_ratio_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


import logging
from typing import Any, List, Optional, Sequence, Tuple, Union
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/interval_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
Conducts an AB test across two concurrent time series. This would be useful
when an experiment is ran between two versions that are logged over time, and there is an
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/meta_learning/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

from typing import List


Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/meta_learning/hpt_tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
MetaDetectHptSelect is a meta learner that predict best hyper parameters of chosen detection algorithm given a time series features
before predicting, user needs to train the model:
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/meta_learning/metalearning_detection_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import ast
import logging
import math
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/meta_learning/synth_metadata_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module reads synthetic data from daiquery and preprocess it as data_x=features, data_y=hpt_res for given algorithm
"""
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/multivariate_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


"""
This module implements the multivariate Outlier Detection algorithm as a Detector Model.
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/outlier.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
Module with generic outlier detection models. Supports a univariate algorithm that
treates each metric separately to identify outliers and a multivariate detection
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/outlier_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


"""
This module implements the univariate Outlier Detection algorithm as a Detector Model.
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/prophet_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
This module contains code to implement the Prophet algorithm
as a Detector Model.
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/residual_translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
Detectors based on predictors, basically work as follows:
calculate the residual (i.e., difference between predicted and current value),
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/robust_stat_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import logging
from typing import Any, Optional, Sequence

Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/rolling_stats_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


import json
import logging
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/seasonality.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""This module is for seasonality detection.
We provide two seasonality detector: ACFDetector and FFTDetector. ACFDetector uses
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/stat_sig_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import json
import logging
from datetime import datetime
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/threshold_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

from typing import Any, Optional

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions kats/detectors/trend_mk.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

from __future__ import annotations

import logging
Expand Down
2 changes: 2 additions & 0 deletions kats/evaluation/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Callable, Dict, Optional, Sequence, Type, Union
Expand Down
2 changes: 2 additions & 0 deletions kats/graphics/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

# Utility functions for plotting

from typing import List
Expand Down
2 changes: 2 additions & 0 deletions kats/metrics/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

from dataclasses import dataclass
from enum import Enum, IntEnum
from functools import lru_cache
Expand Down
2 changes: 2 additions & 0 deletions kats/metrics/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import logging
import warnings
from typing import cast, Dict, Generator, Optional, Sequence, Union
Expand Down
2 changes: 2 additions & 0 deletions kats/models/arima.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict


"""ARIMA (Auto Regressive Integrated Moving Average) for time series data.
Expand Down
2 changes: 2 additions & 0 deletions kats/models/bayesian_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""
Bayesian estimation of Vector Autoregressive Model using
Minnesota prior on the coefficient matrix. This version is
Expand Down
2 changes: 2 additions & 0 deletions kats/models/ensemble/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""Ensemble techniques for forecasting
This implements a set of ensemble techniques including weighted averaging, median ensemble
Expand Down
2 changes: 2 additions & 0 deletions kats/models/ensemble/kats_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""Kats ensemble model
Implementation of the Kats ensemble model. It starts from seasonality detection, if seasonality detected, it
Expand Down
2 changes: 2 additions & 0 deletions kats/models/ensemble/median_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""Median ensembling method
Ensemble models with median of individual models
Expand Down
2 changes: 2 additions & 0 deletions kats/models/ensemble/weighted_avg_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

"""Ensemble models with weighted average individual models
Assume we have k base models, after we make forecasts with each individual
Expand Down
2 changes: 2 additions & 0 deletions kats/models/globalmodel/backtester.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import collections
import logging
import time
Expand Down
2 changes: 2 additions & 0 deletions kats/models/globalmodel/data_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# pyre-strict

import logging
from typing import Any, Dict, List, Optional, Tuple, Union

Expand Down
Loading

0 comments on commit 658294c

Please sign in to comment.