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.

Colab Demo Notebook Not Working

See original GitHub issue

I launched the Colab notebook to try and demo this model.

There’s a section that starts with: Sometimes the next step errors for some reason, just run it again ¯\_(ツ)_/¯

That’s fine and all, except running it multiple times didn’t help. To try and resolve some errors, I tried to: !pip install optax transformers ray

That got me closer, but it errors out with:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-18-a22d9a83aa66> in <module>()
      7 import transformers
      8 
----> 9 from mesh_transformer.checkpoint import read_ckpt_lowmem
     10 from mesh_transformer.sampling import nucleaus_sample
     11 from mesh_transformer.transformer_shard import CausalTransformer

2 frames
/usr/lib/python3.7/typing.py in __new__(cls, *args, **kwds)
    308                 isinstance(args[1], tuple)):
    309             # Close enough.
--> 310             raise TypeError(f"Cannot subclass {cls!r}")
    311         return super().__new__(cls)
    312 

TypeError: Cannot subclass <class 'typing._SpecialForm'>

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

4reactions
JohnnyOpcodecommented, Aug 9, 2022

I beg to differ. It takes some effort to get the right mix of dependencies, but when it works it works quite well.

Here is what I use in my Colab Pro to bootstrap the model.

These are the packages that work and bypass requirements.txt (which is outdated/quirky on dependencies)

!pip install numpy~=1.21.0 !pip install typing-extensions~=3.7.4 !pip install tqdm>=4.45.0 !pip install wandb>=0.11.2 !pip install einops~=0.3.0 !pip install requests~=2.25.1 !pip install fabric~=2.6.0 !pip install optax==0.0.9 !pip install dm-haiku==0.0.5 !pip install git+https://github.com/EleutherAI/lm-evaluation-harness/ !pip install ray[default]==1.4.1 !pip install jaxlib~=0.1.68 !pip install jax~=0.2.12 !pip install Flask~=1.1.2 !pip install cloudpickle~=1.3.0 !pip install tensorflow-cpu~=2.7.0 !pip install google-cloud-storage~=1.36.2 !pip install transformers !pip install smart_open[gcs] !pip install func_timeout !pip install ftfy !pip install fastapi !pip install uvicorn !pip install lm_dataformat !pip install pathy

!pip install mesh-transformer-jax/ jax==0.2.12 tensorflow==2.7.0 chex==0.1.2 jaxlib==0.1.68

1reaction
Aspie96commented, Nov 1, 2022

Well, it’s obvious that it needs attention. It’s all anyone needs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Colab demo notebook not working · Issue #36 - GitHub
I've been trying to install rapids stable on a Google Colab notebook and didn't work. After trying many things, I've found the example ......
Read more >
demo.ipynb - Colaboratory - Google Colab
In this notebook we're going to try to demonstrate using some things with git . Usually you'd do this in the terminal, not...
Read more >
Google Colab Demo | Tutorial + Project Walkthrough - YouTube
Google Colab is a useful platform for Data Scientists working with Python. In this tutorial, I show you how to set up a...
Read more >
Turning a Google Colab Notebook into a Web App - Anvil Works
Turning a Google Colab Notebook into a Web App ... You've written some code in a Colab notebook that solves the problem; ......
Read more >
Machine Learning in Scala with Google Colaboratory
In these talks, almost all the demos were in Google Colaboratory (Colab), ... you get a "scala" kernel not recognized warning when loading...
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