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

Support scipy>1.12 on macos #153

Open
SorooshMani-NOAA opened this issue Aug 6, 2024 · 5 comments
Open

Support scipy>1.12 on macos #153

SorooshMani-NOAA opened this issue Aug 6, 2024 · 5 comments
Assignees

Comments

@SorooshMani-NOAA
Copy link
Collaborator

As also noted in oceanmodeling/adcircpy#190, the latest scipy seems to have some issues on macos. It results in different values. When calculating the perturbation I think we're doing some type of interpolation again, which can be causing the issue I see in the failed test

Pinning the version seems to resolve the issue see 27f63da in PR #149

@WPringle what do you think? I'll need to confirm by making sure all tests go through, but for now I don't get the difference in perturbed json file at least (there are other problems I have to solve though!)

@SorooshMani-NOAA SorooshMani-NOAA self-assigned this Aug 6, 2024
@WPringle
Copy link
Contributor

WPringle commented Aug 6, 2024

I don't have any issues pinning scipy version if it works well for us and not at risk of being deprecated for a while.

@SorooshMani-NOAA
Copy link
Collaborator Author

OK thanks, can you point out where in the perturbation we use interpolation? Just for the sake of documenting the issue. Hopefully scipy will get a fix later before the pinned version is deprecated ... otherwise we have to find a better test rather than checking against the ref file, since now linux and macos result in slightly different values.

@WPringle
Copy link
Contributor

WPringle commented Aug 7, 2024

Not sure, in this code it just uses the interp function in pandas.. https://github.com/noaa-ocs-modeling/EnsemblePerturbation/blob/71804ad4488492471da9971d564aee76e648c94f/ensembleperturbation/perturbation/atcf.py#L1562C3-L1575C22

                    # forecast errors than grow with time based on initial intensity
                    validation_time_errors = DataFrame(
                        data={
                            column: interp(
                                x=validation_hours,
                                xp=historical_forecast_errors.index,
                                fp=historical_forecast_errors.loc[
                                    :, column
                                ].values.quantity.magnitude,
                            )
                            for column in historical_forecast_errors.columns
                        },
                        index=validation_hours,
                    )

@SorooshMani-NOAA
Copy link
Collaborator Author

OK thanks, I guess that's it, I'll double check when we want to look into this issue.

@SorooshMani-NOAA SorooshMani-NOAA changed the title Support scipy>0.12 on macos Support scipy>1.13 on macos Aug 7, 2024
@SorooshMani-NOAA SorooshMani-NOAA changed the title Support scipy>1.13 on macos Support scipy>1.12 on macos Aug 7, 2024
@SorooshMani-NOAA
Copy link
Collaborator Author

Note to self, scipy<=0.12 does not support numpy>=2. Is it possible that the difference between linux vs macos is actually something in numpy and not directly in scipy?!

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

No branches or pull requests

2 participants