Giter Site home page Giter Site logo

georgian-io / pyoats Goto Github PK

View Code? Open in Web Editor NEW
98.0 8.0 8.0 697.36 MB

Quick and Easy Time Series Outlier Detection

License: Apache License 2.0

Shell 3.29% Python 96.34% Dockerfile 0.37%
anomaly anomaly-detection data-science time-series timeseries machine-learning deep-learning

pyoats's People

Contributors

angeliney avatar benjaminye avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pyoats's Issues

Save models

Hi, I want to ask how I could save the trained models. Thanks!

AttributeError: module 'tensorflow' has no attribute 'config'


AttributeError Traceback (most recent call last)
Cell In[4], line 1
----> 1 from oats.models import*
2 TRAIN_SIZE = 5000
3 mp_model = MatrixProfileModel(window=48, use_gpu=True) # Try changing the model or window size

File ~\AppData\Roaming\Python\Python38\site-packages\oats\models_init_.py:8
1 """
2 Models
3 -----------------
4 """
6 import tensorflow as tf
----> 8 gpu_devices = tf.config.experimental.list_physical_devices("GPU")
9 for device in gpu_devices:
10 tf.config.experimental.set_memory_growth(device, True)

AttributeError: module 'tensorflow' has no attribute 'config'

How to Implement the Reconstruction-Based Models?

Hi,

I am looking to implement the Reconstruction-Based Models with the Autoencoders but do not understand how to, especially as the documentation seems to be offline. Could someone guide me through doing so?

Python 3.11

Hi I was wondering if you have 3.11 compatibility on the horizon, thanks for the nice package.

Best,
Derek

how to save the model trained with pyoats

Hi,
I'm using pyoats library, but I cannot find a way in your doc to save the trained model after fitting so that I can decide the best hyperparameters, is there a way to save it?

[BUG] use_gpu=True raise unexpected keyword argument in pytorch lightning

What is the error:
Set use_gpu=True raise unexpected keyword argument in pytorch lightning

Error logs:

File /layers/dap-buildpacks_pip-install/site-packages/virtual-env/lib/python3.9/site-packages/oats/models/_darts_model.py:173, in DartsModel.fit(self, train_data, epochs, **kwargs)
    170 train_data = self._scale_series(train_data)
    171 tr, val = self._get_train_val_split(train_data, self.val_split)
--> 173 self.model.fit(
    174     TimeSeries.from_values(tr),
    175     val_series=TimeSeries.from_values(val),
    176     epochs=epochs,
    177     num_loader_workers=1,
    178     **kwargs,
    179 )

File /layers/dap-buildpacks_pip-install/site-packages/virtual-env/lib/python3.9/site-packages/darts/utils/torch.py:112, in random_method.<locals>.decorator(self, *args, **kwargs)
    110 with fork_rng():
    111     manual_seed(self._random_instance.randint(0, high=MAX_TORCH_SEED_VALUE))
--> 112     return decorated(self, *args, **kwargs)

File /layers/dap-buildpacks_pip-install/site-packages/virtual-env/lib/python3.9/site-packages/darts/models/forecasting/torch_forecasting_model.py:755, in TorchForecastingModel.fit(self, series, past_covariates, future_covariates, val_series, val_past_covariates, val_future_covariates, trainer, verbose, epochs, max_samples_per_ts, num_loader_workers)
    747 logger.info(f"Train dataset contains {len(train_dataset)} samples.")
    749 super().fit(
    750     series=seq2series(series),
    751     past_covariates=seq2series(past_covariates),
    752     future_covariates=seq2series(future_covariates),
    753 )
--> 755 return self.fit_from_dataset(
    756     train_dataset, val_dataset, trainer, verbose, epochs, num_loader_workers
    757 )

File /layers/dap-buildpacks_pip-install/site-packages/virtual-env/lib/python3.9/site-packages/darts/utils/torch.py:112, in random_method.<locals>.decorator(self, *args, **kwargs)
    110 with fork_rng():
    111     manual_seed(self._random_instance.randint(0, high=MAX_TORCH_SEED_VALUE))
--> 112     return decorated(self, *args, **kwargs)

File /layers/dap-buildpacks_pip-install/site-packages/virtual-env/lib/python3.9/site-packages/darts/models/forecasting/torch_forecasting_model.py:896, in TorchForecastingModel.fit_from_dataset(self, train_dataset, val_dataset, trainer, verbose, epochs, num_loader_workers)
    893 train_num_epochs = epochs if epochs > 0 else self.n_epochs
    895 # setup trainer
--> 896 self.trainer = self._setup_trainer(trainer, verbose, train_num_epochs)
    898 # TODO: multiple training without loading from checkpoint is not trivial (I believe PyTorch-Lightning is still
    899 #  working on that, see https://github.com/PyTorchLightning/pytorch-lightning/issues/9636)
    900 if self.epochs_trained > 0 and not self.load_ckpt_path:

File /layers/dap-buildpacks_pip-install/site-packages/virtual-env/lib/python3.9/site-packages/darts/models/forecasting/torch_forecasting_model.py:471, in TorchForecastingModel._setup_trainer(self, trainer, verbose, epochs)
    466     trainer_params["enable_model_summary"] = (
    467         verbose if self.model.epochs_trained == 0 else False
    468     )
    469     trainer_params["enable_progress_bar"] = verbose
--> 471 return self._init_trainer(trainer_params=trainer_params, max_epochs=epochs)

File /layers/dap-buildpacks_pip-install/site-packages/virtual-env/lib/python3.9/site-packages/darts/models/forecasting/torch_forecasting_model.py:482, in TorchForecastingModel._init_trainer(trainer_params, max_epochs)
    479 if max_epochs is not None:
    480     trainer_params_copy["max_epochs"] = max_epochs
--> 482 return pl.Trainer(**trainer_params_copy)

File /layers/dap-buildpacks_pip-install/site-packages/virtual-env/lib/python3.9/site-packages/pytorch_lightning/utilities/argparse.py:70, in _defaults_from_env_vars.<locals>.insert_env_defaults(self, *args, **kwargs)
     67 kwargs = dict(list(env_variables.items()) + list(kwargs.items()))
     69 # all args were already moved to kwargs
---> 70 return fn(self, **kwargs)

**TypeError: __init__() got an unexpected keyword argument 'gpus'**

How to replicate:

from oats.models import *

model = NBEATSModel(48, use_gpu=True) 

About user guide

I'm so interested in this project,but i find your community construction is incomplete, so could you provide some simple example for us?
such as a short code with short datasets. Expect your reply!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.