question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Example notebooks out of date

See original GitHub issue

The recent api updates (i.e. separating models, utils.prediction etc into tensorflow and pytorch) mean a number of the example notebooks are now out-of-date. Some examples below:

  • Many examples load in predict_batch as from alibi_detect.utils.prediction import predict_batch instead of from alibi_detect.utils.tensorflow.prediction import predict_batch. The arguments and use of predict_batch also needs updating i.e. clf is now the second argument, and the absence of return_class arg means these notebooks need reworking to convert prediction proba’s to classes (or this functionality needs to be added back in internally). e.g. see examples/cd_distillation_cifar10.ipynb.
  • Some fetch methods (such as fetch_vaegmm used in examples/od_aegmm_kddcup.ipynb fail when attempting to load state from meta.pickle files. These files need to be updated to match the new api (or this can be fixed on the code side with sub-classes, aliases etc).
  • General updates to imports in notebooks needed.

The above is not exhaustive. A general sweep to check all the examples is needed.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ascillitoecommented, Dec 7, 2021

@jklaise I didn’t want to cause confusion by editing your comment, but perhaps you can add these to the list of notebooks with errors:

  • od_if_kddcup.ipynb - AttributeError: 'IsolationForest' object has no attribute 'n_features_' from sklearn iforest. Is this new? I know we had an issue with an outdated module name in the saved detector, but wasn’t aware of this issue.
  • cd_text_imdb.ipynb - Timeout. Don’t know how long this takes, we might be able to adjust the notebook (or timeout limit?) slightly.

These were uncovered in https://github.com/SeldonIO/alibi-detect/pull/402. We should probably also have a second look at the weekly CI test results.

Also, because the two below are still failing, we probably want to add these to EXCLUDE_NOTEBOOKS until we update remote artefacts.

  • od_prophet_weather.ipynb - outdated metadata files causing fetch to fail
  • ad_ae_cifar10.ipynb - cannot deserialized saved detector - needs updating
1reaction
ascillitoecommented, Oct 15, 2021

Good spot, I missed these, and guess they weren’t flagged up as sphinx errors as they’re absolute url’s as opposed to relative links to sphinx source. I’ll grep all absolute links and fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Convert content of Object datatype to Date datatype in Python
I am starting out with Pandas, Jupyter notebook and slowing reviving my Python skills. FYI If you guys think there is a better...
Read more >
F# notebooks | jvaneyck - WordPress.com
Recently I wanted to take a look at how to set these up with support for the F# programming language. While there is...
Read more >
Interactive Controls in Jupyter Notebooks | by Will Koehrsen
Now we get two interactive date selection widgets and the values are passed into the function (see notebook for details):.
Read more >
Tutorial: Advanced Jupyter Notebooks - Dataquest
Let's check out an example. First, we'll import our libraries and load some data. <code="language-python"> import matplotlib.pyplot as plt ...
Read more >
Stay up to date with a shared notebook - Business Productivity
Before you can share a notebook you first need to make sure that it is saved in a place where it's accessible to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found