James Gatter
01/27/2023, 6:08 PMubuntu:~/Projects/$ python -m sandbox
Fatal Python error: Cannot recover from stack overflow.
Python runtime state: initialized
Current thread 0x00007f4132713740 (most recent call first):
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/dtypes/generic.py", line 41 in _check
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/dtypes/generic.py", line 47 in _instancecheck
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/construction.py", line 444 in extract_array
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/arrays/_mixins.py", line 296 in __getitem__
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/internals/blocks.py", line 1832 in getitem_block_index
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/generic.py", line 4105 in _slice
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/indexing.py", line 1638 in _get_slice_axis
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/indexing.py", line 1602 in _getitem_axis
File "/home/ubuntu/.local/lib/python3.8/site-packages/pandas/core/indexing.py", line 1073 in __getitem__
File "/home/ubuntu/.local/lib/python3.8/site-packages/anndata/_core/anndata.py", line 336 in _init_as_view
File "/home/ubuntu/.local/lib/python3.8/site-packages/anndata/_core/anndata.py", line 289 in __init__
File "/home/ubuntu/.local/lib/python3.8/site-packages/anndata/_core/anndata.py", line 1114 in __getitem__
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 152 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 161 in jsonable_encoder
File "/home/ubuntu/.local/lib/python3.8/site-packages/fastapi/encoders.py", line 117 in jsonable_encoder
...
Aborted (core dumped)
.X
). It's stored in h5ad files which are based on the hdf5 file format (not plain text).
• Using Prefect 2.7.8
• Using a local instance of Orion (--host 0.0.0.0) on AWS EC2
• I've tried not using Pydantic model as the input param and simply the AnnData itself and I get the same resultZanie
01/27/2023, 7:05 PMjsonable_encoder
which is used to convert flow parameters into a form that can be sent to the APIJames Gatter
01/27/2023, 7:15 PMZanie
01/27/2023, 7:20 PMJames Gatter
01/27/2023, 8:04 PMjsonable_encoder(adata)
alone is enough to cause the error.
https://github.com/tiangolo/fastapi/issues/4834 is essentially the issue I had without the stack overflow
Based on the thread, if I post I don't think it'll be met with good reception 😅Zanie
01/27/2023, 9:00 PMquote
when you pass it to the flow?your_flow(foo=prefect.utilities.annotations.quote(your_param))
James Gatter
01/27/2023, 9:01 PMZanie
01/27/2023, 9:06 PMJames Gatter
01/27/2023, 9:08 PMimport prefect
from prefect import task, flow, get_run_logger
import scanpy as sc
def main():
adata = sc.read_h5ad('demuxed.h5ad')
mainflow(adata=prefect.utilities.annotations.quote(adata))
@flow(validate_parameters=False)
def mainflow(adata: sc.AnnData):
print(adata.obs.columns)
print(adata.var.columns)
No luck unfortunately! same thing. I'll take a look at which anndata field isn't serializing and maybe I'll report back.
Thanks for the support + have a good weekend!Zanie
01/27/2023, 9:33 PM