Skip to content

Commit

Permalink
Update installation instructions & fix minor bug in benchmark_anomaly…
Browse files Browse the repository at this point in the history
….py (#38)

* Use correct delay in benchmark_anomaly (Issue #37)

* Update install instructions (Issue #21 discussion)
  • Loading branch information
aadyotb authored Oct 18, 2021
1 parent 869b440 commit 6b68e90
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ and `ts_datasets` provides standardized data loaders for multiple time series da
time series as ``pandas.DataFrame`` s with accompanying metadata.

You can install `merlion` from PyPI by calling ``pip install salesforce-merlion``. You may install from source by
cloning this repo, navigating to the root directory, and calling ``pip install .``, or ``pip install -e .`` to
install in editable mode. You may install additional dependencies for plotting & visualization via
``pip install salesforce-merlion[plot]``, or by calling ``pip install ".[plot]"`` from the root directory of this repo.
cloning this repoand calling ``pip install Merlion/``, or ``pip install -e Merlion/`` to install in editable mode.
You may install additional dependencies for plotting & visualization via ``pip install salesforce-merlion[plot]``,
or by calling ``pip install "Merlion/[plot]"`` if installing from source.

To install the data loading package `ts_datasets`, clone this repo, navigate to its root directory, and call
``pip install -e ts_datasets/``. This package must be installed in editable mode (i.e. with the ``-e`` flag)
if you don't want to manually specify the root directory of every dataset when initializing its data loader.
To install the data loading package `ts_datasets`, clone this repo and call ``pip install -e Merlion/ts_datasets/``.
This package must be installed in editable mode (i.e. with the ``-e`` flag) if you don't want to manually specify the
root directory of every dataset when initializing its data loader.

Note the following external dependencies:

Expand Down
2 changes: 1 addition & 1 deletion benchmark_anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def train_model(
model, post_rule_train_config = get_model(
model_name=model_name, dataset=dataset, metric=metric, tune_on_test=tune_on_test, unsupervised=unsupervised
)
delay = post_rule_train_config["max_early_sec"]
delay = post_rule_train_config["max_delay_sec"]
train_vals = df_to_merlion(df[md.trainval], md[md.trainval], get_ground_truth=False, transform=resampler)
test_vals = df_to_merlion(df[~md.trainval], md[~md.trainval], get_ground_truth=False, transform=resampler)
train_anom = df_to_merlion(df[md.trainval], md[md.trainval], get_ground_truth=True)
Expand Down
17 changes: 9 additions & 8 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

.. Merlion documentation master file, created by
sphinx-quickstart on Mon Feb 22 16:50:49 2021.
You can adapt this file completely to your liking, but it should at least
Expand Down Expand Up @@ -26,15 +27,15 @@ and :doc:`ts_datasets <ts_datasets>` provides standardized data loaders for mult
time series as ``pandas.DataFrame`` s with accompanying metadata.
You can install ``merlion`` from PyPI by calling ``pip install salesforce-merlion``. You may install from source by
cloning the Merlion `repo <https://github.com/salesforce/Merlion>`_, navigating to the root directory, and calling
``pip install .``, or ``pip install -e .`` to install in editable mode. You may install additional dependencies
for plotting & visualization via ``pip install salesforce-merlion[plot]``, or by calling ``pip install ".[plot]"`` from the
root directory of the repo if installing from source.
cloning the Merlion `repo <https://github.com/salesforce/Merlion>`_ and calling ``pip install Merlion/``, or
``pip install -e Merlion/`` to install in editable mode. You may install additional dependencies for plotting &
visualization via ``pip install salesforce-merlion[plot]``, or by calling ``pip install "Merlion/[plot]"``
if installing from source.

To install the data loading package ``ts_datasets``, simply clone the Merlion
`repo <https://github.com/salesforce/Merlion>`_ and call ``pip install -e ts_datasets/``
from its root directory. This package must be installed in editable mode (i.e. with the ``-e`` flag)
if you don't want to manually specify the root directory of every dataset when initializing its data loader.
To install the data loading package ``ts_datasets``, clone the Merlion
`repo <https://github.com/salesforce/Merlion>`_ and call ``pip install -e Merlion/ts_datasets/``. This package must be
installed in editable mode (i.e. with the ``-e`` flag) if you don't want to manually specify the root directory of
every dataset when initializing its data loader.

Note the following external dependencies:

Expand Down

0 comments on commit 6b68e90

Please sign in to comment.