sintel-dev / Orion

A machine learning library for detecting anomalies in signals.
https://sintel.dev/Orion/
MIT License
1.03k stars 160 forks source link

ValueError: Axis 2 is outside the dimensions of X (1). #546

Closed matbord closed 3 weeks ago

matbord commented 4 months ago

Description

I am trying to run the example called "fit an orion pipeline" using my data. I have a dataframe of the same size and same column names as S-1-new dataset, but when I run the code for fitting I get an error

from orion import Orion

hyperparameters = {
    'orion.primitives.aer.AER#1': {
        'epochs': 5,
        'verbose': True
    }
}

orion = Orion(
    pipeline='aer',
    hyperparameters=hyperparameters
)
orion.fit(my_data) 

Exception caught producing MLBlock orion.primitives.timeseries_preprocessing.slice_array_by_dims#1 Traceback (most recent call last): File "/home/ubuntu/.local/lib/python3.8/site-packages/mlblocks/mlpipeline.py", line 679, in _produce_block block_outputs = block.produce(produce_args) File "/home/ubuntu/.local/lib/python3.8/site-packages/mlblocks/mlblock.py", line 334, in produce return self.primitive(produce_kwargs) File "/home/ubuntu/.local/lib/python3.8/site-packages/orion/primitives/timeseries_preprocessing.py", line 29, in slice_array_by_dims raise ValueError("Axis {} is outside the dimensions of X ({}).".format(axis, dims)) ValueError: Axis 2 is outside the dimensions of X (1).

Do you know what is wrong? Which other assumptions should I do to create my training dataframe?

ps. I tried with your dataset, and everything works

sarahmish commented 4 months ago

Hi @matbord – thanks for using Orion!

To make pipelines work on your data, you will need to change the interval hyperparameter to be custom to your data. See our documentation here!

Let me know if you have any follow-up questions!