-
Notifications
You must be signed in to change notification settings - Fork 1
Fixes to API, added primitives to format data, benchmarking function, tuning a pipeline #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| in the subdirectories inside the [pyteller/pipelines](orion/pipelines) folder. | ||
|
|
||
| This is the list of pipelines available so far, which will grow over time: | ||
| # Quickstart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does pyteller still support multiple input options? If yes, perhaps create a separate file (e.g., data_format.md) to introduce different input options and give some examples?
| ## Releases | ||
|
|
||
| In every release, we run the pyteller benchmark and maintain an up to-date [leaderboard](../README.md#leaderboard). | ||
| In every release, we run the pyteller benchmark and maintain an up to-date [leaderboard](leaderboard.md) which can also be found in this [summary Google Sheets document](https://docs.google.com/spreadsheets/d/1OPwAslqfpWvzpUgiGoeEq-Wk_yK-GYPGpmS7TwEaSbw/edit?usp=sharing). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is worthwhile to report some aggregated numbers such as mean runtime, failed times, average performance scores, in the summary file. We can refer to ORION's summary report (link).
| In [5]: scores = benchmark(pipelines=pipelines, datasets=datasets, metrics=metrics, rank='MAPE') | ||
| datasets = ['a10', 'gasoline', 'calls'] | ||
|
|
||
| results = benchmark(pipelines=pipelines, metrics=metrics, output_path=output_path, datasets=datasets, metrics=metrics, rank='MASE') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark will actually create many tasks to run. Do we save the meta information of these tasks somewhere? (ideas from Cardea and LM project)
| @@ -0,0 +1,8 @@ | |||
| The current pyteller benchmark was run on 11 signals for 3 pipelines | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's more convenient to merge leaderboard.md to README.md either in the root directory or the current benchmark directory.
| @@ -0,0 +1,34 @@ | |||
| dataset,pipeline,signal,prediction length,iteration,MAE,MSE,RMSE,MASE,sMAPE,MAPE,under,over,strategy,lstm_1_units,dropout_1_rate,lstm_2_units,dropout_2_rate,window_size,p,d,q,status,elapsed,run_id | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just use the release number to name the file?
For example,
0.1.0_summary.csv and 0.1.0_details.csv
| @@ -0,0 +1,6 @@ | |||
| pyteller.metrics.over\_pred | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these files generated automatically? Should we include it in a PR?
| =========== | ||
|
|
||
| The User Guides section covers different topics about Orion usage: | ||
| The User Guides section covers different topics about python usage: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pyteller?
sarahmish
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! A lot of changes are proposed in this PR, there are some comments that I would recommend addressing before merging. Most of my comments are of format / style nature
General thoughts I have about pyteller:
- rethink where data should be stored.
- how do we store pipelines? according to the PR we have the following path
pyteller/pipelines/pyteller/, why not keep it simpler?pyteller/pipelines/ - edit the
.gitignoreto ignore all automatically generated files underapi/.
|
|
||
| Time series forecasting using MLPrimitives | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add the following as well to be clear about where we are in the project
- License: [MIT](https://github.com/signals-dev/pyteller/blob/master/LICENSE)
- Development Status: [Pre-Alpha](https://pypi.org/search/?c=Development+Status+%3A%3A+2+-+Pre-Alpha)
| | pipeline | Percentage of Times Beat ARIMA | | ||
| | -------------------------------- | ------------------------------ | | ||
| | pyteller.ARIMA.arima | 0 | | ||
| | pyteller.LSTM.LSTM | 36.3636364 | | ||
| | pyteller.persistence.persistence | 18.1818182 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting table for a leaderboard. What does the percentage mean in this case? I find it hard to interpret. In Orion we aggregate the score over all signals per dataset and compute in how many datasets did the pipeline outperform ARIMA. I gather you are using % here because you are computing it per signal?
| @@ -0,0 +1,6 @@ | |||
| pyteller.Pyteller.evaluate | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not include any file from api/*, to avoid this from happening add the following to .gitignore
# Sphinx documentation
docs/_build/
docs/**/api
| 1. Load the data | ||
| ---------------- | ||
|
|
||
| Here is an example of loading the **Alabama Weather** demo data which has multiple entities in long form: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in data.rst we do not introduce the difference between flatform and longform. I would just omit long form or add a section in data.rst to explain the supported data formats.
| from pyteller.core import Pyteller | ||
| pipeline = 'pyteller.LSTM.LSTM' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if we can simplify this to pipeline = 'LSTM' and generally to all other places as well
| @@ -0,0 +1,46 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is a duplicate I think?
| @@ -0,0 +1,61 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we supposed to have 2 files of each?
| # convert index to datetime | ||
| # if index.dtype == 'float' or index.dtype == 'int': | ||
| # index = pd.to_datetime(index.values * 1e9) | ||
| # else: | ||
| # index = pd.to_datetime(index) | ||
| # | ||
| # if actuals[time_column].dtypes == 'float' or actuals[time_column].dtypes == 'int': | ||
| # actuals[time_column] = pd.to_datetime(actuals[time_column] * 1e9) | ||
| # else: | ||
| # actuals[time_column] = pd.to_datetime(actuals[time_column]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean
|
|
||
|
|
||
| def plot(dfs, output_path, labels=None): | ||
| def plot_forecast(dfs, output_path=None, labels=['actuals', 'predicted'], frequency=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we typically try to avoid mutable objects as the default arguments of a function, I recommend setting it to None and then adding the default if it is None.
def plot_forecast(dfs, output_path=None, labels=None, frequency=None):
labels = labels or ['actuals', 'predicted']| 'Keras>=2.1.6,<2.4', | ||
| 'mlblocks>=0.4.0,<0.5', | ||
| 'mlprimitives>=0.3.0,<0.4', | ||
| 'pandas>=1,<2', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 'pandas>=1,<2' is already specified in mlprimitives so we can skip it here. Similarly to 'scikit-learn>=0.21'.
Data Input
ingest_dataandegest_dataand replaced them with simpler preprocessing primitivespyteller.primitives.preprocessing.format_data.jsonandpyteller/primitives/jsons/pyteller.primitives.postprocessing.reformat_data.jsonPipeline Outputs
defaultoutputs block to pipelines with outputs asforecastandactualfitandforecastoutputs are dictionaries with the key being the output name specified in the pipeline json_Benchmarking
Style