Skip to content

refactor: instances of parametrized tensors are no longer parametrized#1026

Merged
samsja merged 12 commits into
feat-rewrite-v2from
feat-994-dropshape
Jan 25, 2023
Merged

refactor: instances of parametrized tensors are no longer parametrized#1026
samsja merged 12 commits into
feat-rewrite-v2from
feat-994-dropshape

Conversation

@Jackmin801

@Jackmin801 Jackmin801 commented Jan 17, 2023

Copy link
Copy Markdown
Contributor

This is because parametrizing them can cause them to be wrong when operations are performed.
We only need the parametrization during instantiation for validation.
After that, we make no guarantees about the shape.

Goals:

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Comment thread docarray/typing/tensor/abstract_tensor.py
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
@github-actions github-actions Bot added size/m and removed size/s labels Jan 18, 2023
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

📝 Docs are deployed on https://ft-feat-994-dropshape--jina-docs.netlify.app 🎉

@samsja samsja merged commit ec241e0 into feat-rewrite-v2 Jan 25, 2023
@samsja samsja deleted the feat-994-dropshape branch January 25, 2023 12:29
JoanFM pushed a commit that referenced this pull request Jan 26, 2023
#1026)

* test: add tensor ops tests

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

* feat: instances of parametrized types are not parametrized anymore

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

* test: fix test that have been changed by this feature

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

* refactor: change class name and add comments

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

* test: add tests to make sure isinstance does not do coercion

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

* fix: parametrized isinstance check should not perform coercion

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

* test: add more tests to parametrized class name tests

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

* style: small black fix

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>

Signed-off-by: Jackmin801 <56836461+Jackmin801@users.noreply.github.com>
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants