SuperDuperDB / superduperdb

🔮 SuperDuperDB: Bring AI to your database! Build, deploy and manage any AI application directly with your existing data infrastructure, without moving your data. Including streaming inference, scalable model training and vector search.
https://superduperdb.com
Apache License 2.0
4.54k stars 444 forks source link

[BUG]: When encoding the Code, an empty key was obtained. #2168

Closed jieguangzhou closed 2 weeks ago

jieguangzhou commented 2 weeks ago

Contact Details [Optional]

No response

System Information

main

What happened?

from superduperdb.base.code import Code

def postprocess(x):
    return x.tolist()

postprocess = Code.from_object(postprocess)
postprocess.encode()

We get

{'_base': '?',
 '_builds': {'': {'_path': 'superduperdb/base/code/Code',
   'uuid': 'f50ea6cd-eb0e-4b07-afb7-9f8a9abb1c29',
   'code': 'from superduperdb import code\n\n@code\ndef postprocess(x):\n    return x.tolist()\n'}},
 '_blobs': {},
 '_files': {}}

Steps to reproduce

No response

Relevant log output

No response