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

Fix public export promote_nullable #14

Merged
merged 9 commits into from
Jul 11, 2024

Conversation

EmilyMohellenbrandQC
Copy link
Contributor

@EmilyMohellenbrandQC EmilyMohellenbrandQC commented Jul 10, 2024

Bug

promote_nullable is publicly exposed, but it's not working because it is not imported properly in the init file.

Changes

Add import promote_nullable in ndonnx.__init__

CHANGELOG.rst Outdated Show resolved Hide resolved
Copy link
Collaborator

@cbourjau cbourjau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not particularly happy with this function; being explicit about the mask as make_nullable is doing seems better. For the sake of stability, we may make an exercise out of this though: Let's fix the export but deprecate it immediately in favor of make_nullable. Then we remove it in a release or two from the public interface.

Co-authored-by: Aditya Goel <[email protected]>
@adityagoel4512
Copy link
Member

adityagoel4512 commented Jul 10, 2024

I agree - there isn't a very natural way to make use of this function without messing with an array's fields directly. Can you please add a DeprecationWarning @EmilyMohellenbrandQC?

@EmilyMohellenbrandQC EmilyMohellenbrandQC dismissed cbourjau’s stale review July 11, 2024 09:10

Added deprecation warning and TODO for removal

ndonnx/_data_types/__init__.py Outdated Show resolved Hide resolved
@EmilyMohellenbrandQC EmilyMohellenbrandQC merged commit b824fec into main Jul 11, 2024
16 checks passed
@EmilyMohellenbrandQC EmilyMohellenbrandQC deleted the fix-export-promote-nullable branch July 11, 2024 13:46
@cbourjau
Copy link
Collaborator

cbourjau commented Jul 26, 2024

When deprecating a function we should make sure that we don't use it ourselves in this code base, too. Otherwise, we thrust deprecation warnings into the user's face that they can do nothing about. Unfortunately, this happened here: https://github.com/Quantco/ndonnx/actions/runs/9892611298/job/27325701365#step:5:41

@cbourjau cbourjau mentioned this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants