dask / dask-tutorial

Dask tutorial
https://tutorial.dask.org
BSD 3-Clause "New" or "Revised" License
1.83k stars 702 forks source link

Update coiled tutorials #278

Closed scharlottej13 closed 9 months ago

scharlottej13 commented 9 months ago

Small update since Coiled is no longer doing live tutorials. More context in https://github.com/dask/dask-tutorial/pull/275.

cc @jacobtomlinson @jrbourbeau

dask-bot commented 9 months ago

Beep boop! Here is a Binder link where you can try out this change. Binder

scharlottej13 commented 9 months ago

Looks like CI is failing because of a dependency in distributed, but looks like the dask + distributed versions are pinned in https://github.com/dask/dask-tutorial/blob/main/binder/environment.yml so not sure why:

ModuleNotFoundError                       Traceback (most recent call last)
File /usr/share/miniconda3/envs/dask-tutorial/lib/python3.10/site-packages/distributed/security.py:165, in Security.temporary(cls, **kwargs)
    164 try:
--> 165     from cryptography import x509
    166     from cryptography.hazmat.backends import default_backend

ModuleNotFoundError: No module named 'cryptography'

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
Cell In[9], line 4
      1 from dask.distributed import Scheduler, Worker, Client
      2 from distributed.security import Security
----> 4 security = Security.temporary()
      6 async with Scheduler(security=security) as scheduler:
      7     async with Worker(scheduler.address, security=security) as worker:

File /usr/share/miniconda3/envs/dask-tutorial/lib/python3.10/site-packages/distributed/security.py:171, in Security.temporary(cls, **kwargs)
    169     from cryptography.x509.oid import NameOID
    170 except ImportError:
--> 171     raise ImportError(
    172         "Using `Security.temporary` requires `cryptography`, please "
    173         "install it using either pip or conda"
    174     )
    175 key = rsa.generate_private_key(
    176     public_exponent=65537, key_size=2048, backend=default_backend()
    177 )
    178 key_contents = key.private_bytes(
    179     encoding=serialization.Encoding.PEM,
    180     format=serialization.PrivateFormat.PKCS8,
    181     encryption_algorithm=serialization.NoEncryption(),
    182 ).decode()

ImportError: Using `Security.temporary` requires `cryptography`, please install it using either pip or conda
scharlottej13 commented 9 months ago

This looks great thanks. I'm not too worries about the CI failures given this is just a text change.

Thanks @jacobtomlinson!