Skip to content

[BUG] Copy of required script neptune_ml_utils.py fails on notebook 03-Real-Time-Fraud-Detection-Using-Inductive-Inference #545

@snypher

Description

@snypher

When running the Neptune ML Sample Application notebook 03-Real-Time-Fraud-Detection-Using-Inductive-Inference it fails copying the script neptune_ml_utils.py which is required in subsequent steps (e.i. Import the ML utility and check if ML is enabled.)

Command failing:

!cp ../neptune_ml_utils.py .

Output error:

cp: cannot stat ‘../neptune_ml_utils.py’: No such file or directory

Subsequent errors:

import neptune_ml_utils as neptune_ml
neptune_ml.check_ml_enabled()
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[9], line 1
----> 1 import neptune_ml_utils as neptune_ml
      2 neptune_ml.check_ml_enabled()

ModuleNotFoundError: No module named 'neptune_ml_utils'

Issue seems to be caused by changes in notebooks folder structure

sh-4.2$ find . -type f -name neptune_ml_utils.py 2>/dev/null
./anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/graph_notebook/notebooks/03-Neptune-ML/01-Gremlin/neptune_ml_utils.py
./SageMaker/Neptune/03-Neptune-ML/01-Gremlin/neptune_ml_utils.py
sh-4.2$
sh-4.2$ find . -type f -name '03-Real-Time-Fraud-Detection-Using-Inductive-Inference*' 2>/dev/null
./anaconda3/envs/JupyterSystemEnv/lib/python3.10/site-packages/graph_notebook/notebooks/03-Neptune-ML/03-Sample-Applications/03-Real-Time-Fraud-Detection-Using-Inductive-Inference.ipynb
./SageMaker/Neptune/03-Neptune-ML/03-Sample-Applications/.ipynb_checkpoints/03-Real-Time-Fraud-Detection-Using-Inductive-Inference-checkpoint.ipynb
./SageMaker/Neptune/03-Neptune-ML/03-Sample-Applications/03-Real-Time-Fraud-Detection-Using-Inductive-Inference.ipynb

Workaround:

!cp ../01-Gremlin/neptune_ml_utils.py .

  • OS: N/A
  • Browser: Any
  • Graph Notebook Version: 4.0.1
  • Graph Database & Version: Amazon Neptune 1.2.1.0.R7

To Reproduce
Steps to reproduce the behavior:

  1. Go to '/Neptune/03-Neptune-ML/03-Sample-Applications'
  2. Click on '03-Real-Time-Fraud-Detection-Using-Inductive-Inference'
  3. Scroll down to 'Cell 3'
  4. Run cell and see error

If applicable, add screenshots to help explain your problem.

Expected behavior
Cell 3 on notebook 03-Real-Time-Fraud-Detection-Using-Inductive-Inference should be updated with the correct path to script neptune_ml_utils.py. Also an environment variable could be used to initialize the notebook by referencing a central folder with utils & scripts

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Resolved

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions