Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Upgrade lucid to use tensorflow v2 APIs and make it work on Colab platform #305

Open
wants to merge 38 commits into
base: master
Choose a base branch
from

Conversation

ercaronte
Copy link

This PR is to update the lucid repository so that it is possible to use it in Colab, now that it does not longer support the magic command %tensorflow_version 1.x.
I have updated the python library python code and most of the notebooks.
Since the lucid gs bucket is down, I have also fixed some of the links to static content, pointing temporarely to my lucid fork. If the PR is accepted, it will be possible to update those links to point to the official repo.
As a future work to maintain this repo:

  • upgrade a handful of notebooks in the misc directory,
  • upgrade the opengl code so that is works in kaggle,
  • complete the migration to tensorflow v2 to remove any dependency to the tf.compat.v1 code.

…esting are passing. Tested on python 3.7 only.
All tox testing are passing. Tested on python 3.7 only.
All tox testing are passing for python 3.7 and 3.9
One exception with 3.9 is the test_channel_reducer_trivial that fails, but it seems a precision error.
All tox testing are passing for python 3.7 and 3.9
Fixed some small issues with some tests.
…ontent

Adding missing images that are loaded by lucid notebook
…ivation-atlas-collect) that requires the imagenet dataset.

Few other minor fixes.
Few other minor fixes in the lucid core python library.
…ontent

Bugfix/missing notebook static content
…g off to later on the necessary fixes or refactoring.
Notes: 3D rendering is broken and pyopengl rendering code works only in colab (does not in kaggle).
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@ercaronte
Copy link
Author

While this is being handled by the lucid team, I have merged these changes on my fork https://github.com/ercaronte/lucid.

For anybody willing to use the lucid library on Colab and Kaggle feel free to use it by replacing the lucid package install with: !pip install --quiet git+https://github.com/ercaronte/lucid.git

@smith-kyle
Copy link

A bit of an old PR but I noticed that the ReviewNB link is perma-loading. These notebook changes are reviewable in GitNotebooks: https://gitnotebooks.com/tensorflow/lucid/pull/305

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants