FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

TorchTensor cannot be deep copied. · Issue #1719 · docarray/docarray · GitHub

TorchTensor cannot be deep copied. #1719

Description

Describe the bug
TorchTensor cannot be deep copied.

docarray.version
'0.36.0'

Related:
#1143

To Reproduce
script.py

import torch
from docarray import BaseDoc
from docarray.typing import TorchTensor
class Meow(BaseDoc):
    embedding : TorchTensor

a = Meow(embedding=torch.randn(42))
print(id(a.embedding), id(a.copy(deep=True).embedding))

Originally posted by @gusseppe in #1131 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL