Skip to content

Conversation

@deven367
Copy link
Collaborator

@deven367 deven367 commented Jul 22, 2025

This PR tries to finish the first step in removing nbdev from the library. Tests from the core module have not been converted to pytest yet.

Edit: The tests from the core module have also been converted.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@CLAassistant
Copy link

CLAassistant commented Jul 22, 2025

CLA assistant check
All committers have signed the CLA.

@deven367
Copy link
Collaborator Author

deven367 commented Jul 26, 2025

@JQGoh
Copy link
Contributor

JQGoh commented Jul 29, 2025

@elephaint I can't reproduce this error locally

@deven367 I can reproduce this locally using my mac platform. Will post here if I have new findings

@JQGoh
Copy link
Contributor

JQGoh commented Jul 30, 2025

@elephaint I can't reproduce this error locally

@deven367 I can reproduce this locally using my mac platform. Will post here if I have new findings

@deven367
Could you checkout and cherry-pick these two commits:

  1. JQGoh@a4a8ecb
  2. JQGoh@6f2fc44
    and include them into your branch? The first commit should help to resolve the MacOS's failed test case.

The main reason is that the UtW computed can differ slightly for Mac OSvs Ubuntu platform and this results in the instability for np.linalg.solve(), despite using the same numpy version 2.2.6

  1. MacOS
array([[-5.68434189e-14,  0.00000000e+00,  2.84217094e-14,
         0.00000000e+00, -3.55271368e-15,  0.00000000e+00,
        -7.10542736e-15],
       [-1.42108547e-14,  0.00000000e+00,  7.10542736e-15,
        -8.88178420e-16, -1.77635684e-15,  0.00000000e+00,
        -3.55271368e-15],
       [ 0.00000000e+00,  0.00000000e+00,  2.84217094e-14,
        -3.55271368e-15, -7.10542736e-15,  0.00000000e+00,
        -1.42108547e-14]])
  1. Ubuntu
array([[-2.84217094e-14,  0.00000000e+00,  1.42108547e-14,
        -1.77635684e-15, -3.55271368e-15,  0.00000000e+00,
        -7.10542736e-15],
       [-1.42108547e-14,  0.00000000e+00,  7.10542736e-15,
        -8.88178420e-16, -1.77635684e-15,  0.00000000e+00,
        -3.55271368e-15],
       [ 0.00000000e+00,  0.00000000e+00,  1.42108547e-14,
        -1.77635684e-15, -3.55271368e-15,  0.00000000e+00,
        -7.10542736e-15]])

@deven367
Copy link
Collaborator Author

  1. JQGoh@a4a8ecb
  2. JQGoh@6f2fc44
    and include them into your branch? The first commit should help to resolve the MacOS's failed test case.

Checking out the commits did fix the CI issues

Copy link
Contributor

@JQGoh JQGoh left a comment

Choose a reason for hiding this comment

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

Overall LGTM, left some comments to consider for improvements and a few questions to clarify. After your revision, I suggest that we can invite @elephaint to have a second look.

Copy link
Collaborator

@elephaint elephaint left a comment

Choose a reason for hiding this comment

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

Great work!

Few (minor) comments:

  • I think wherever possible we should use Narwhals, avoiding the need for any pandas vs polars control flow
  • Wherever .reconcile is called, S argument should be S_df to avoid getting deprecation messages.

@deven367 deven367 changed the title remove nbdev migrate tests from nbs to pytest Aug 4, 2025
@deven367
Copy link
Collaborator Author

deven367 commented Aug 6, 2025

  • Wherever .reconcile is called, S argument should be S_df to avoid getting deprecation messages.

@elephaint It's fixed now!

@deven367
Copy link
Collaborator Author

deven367 commented Aug 6, 2025

The recent release of polars to 1.32.1 breaks the CI because of

>       raise NotImplementedError(msg)
E       NotImplementedError: `pivot` is only available in 'polars>=1', found version '0.50.0'.

Hence the version is now being pinned to <=1.32.0
cc @elephaint

Copy link
Collaborator

@elephaint elephaint left a comment

Choose a reason for hiding this comment

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

Great work @deven367, thanks!

Also @JQGoh thanks for helping

@deven367 deven367 enabled auto-merge (squash) August 7, 2025 12:55
@deven367 deven367 merged commit 9eb8efc into main Aug 7, 2025
33 checks passed
@deven367 deven367 deleted the rm-nbdev branch August 7, 2025 13:06
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.

5 participants