Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove implicit clone in stype encoders #254

Closed
yiweny opened this issue Dec 1, 2023 · 0 comments · Fixed by #286
Closed

Remove implicit clone in stype encoders #254

yiweny opened this issue Dec 1, 2023 · 0 comments · Fixed by #286
Assignees

Comments

@yiweny
Copy link
Contributor

yiweny commented Dec 1, 2023

Currently, we clone the TensorData in StypeEncoders to avoid in place modifications. But this is bad because it is wasteful. We want to remove that clone while avoiding inplace modification.

@yiweny yiweny self-assigned this Dec 2, 2023
weihua916 added a commit that referenced this issue Dec 15, 2023
Next step (after `v0.2.0` release): Avoid unnecessary `clone()` in stype
encoder and still pass this test. Ref:
#254
yiweny added a commit that referenced this issue Dec 20, 2023
Fixes #254 

Summary:
1. Only clone when `na_strategy` is specified in stype encoder. Only
clone the `values` of a `MultiTensor`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant