{ "cells": [ { "cell_type": "markdown", "id": "a620638d", "metadata": {}, "source": [ "Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n", "\n", "SPDX-License-Identifier: Apache-2.0" ] }, { "cell_type": "markdown", "id": "46db2962", "metadata": {}, "source": [ "# NCAD environment verification\n", "\n", "The Neural Contextual Anomaly Detection (NCAD) for Time Series module is sourced from the [gluon-ts](https://github.com/Francois-Aubet/gluon-ts/tree/adding_ncad_to_nursery/src/gluonts/nursery/ncad) github repository.\n", "\n", "The NCAD authors have configured a `setup.py` allowing NCAD to be installed with `pip install -e ncad`. Additionally, we need to install `torchmetrics==0.6.0` and `pytorch-lightning==1.3.8`.\n", "\n", "The `anomaly-detection-spatial-temporal-data/prepare_ncad_environment.sh` script prepares the `kedro-ncad-venv` virtual environment and registers it with the Jupyter registry as a custom kernel." ] }, { "cell_type": "markdown", "id": "2022365e", "metadata": {}, "source": [ "### Check NCAD import" ] }, { "cell_type": "code", "execution_count": null, "id": "58936883", "metadata": {}, "outputs": [], "source": [ "import ncad" ] }, { "cell_type": "markdown", "id": "f1faa4d5", "metadata": {}, "source": [ "### Check driver functions import" ] }, { "cell_type": "code", "execution_count": null, "id": "34b9e04a", "metadata": {}, "outputs": [], "source": [ "import sys \n", "sys.path.append('../../src/anomaly_detection_spatial_temporal_data/')" ] }, { "cell_type": "code", "execution_count": null, "id": "d23a120d", "metadata": {}, "outputs": [], "source": [ "from pipelines.iot_gdn_data_processing.nodes import clean_column_names, get_sensor_columns, save_sensor_cols\n" ] }, { "cell_type": "code", "execution_count": null, "id": "5a9b13ab", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "kedro-ncad-venv", "language": "python", "name": "kedro-ncad-venv" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.12" } }, "nbformat": 4, "nbformat_minor": 5 }