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

python311Packages.scikit-survival: 0.21.0 -> 0.22.1; fix build #266019

Merged
merged 1 commit into from Nov 8, 2023
Merged

python311Packages.scikit-survival: 0.21.0 -> 0.22.1; fix build #266019

merged 1 commit into from Nov 8, 2023

Conversation

ghost
Copy link

@ghost ghost commented Nov 7, 2023

Description of changes

update to 0.22.1 fixes broken build
https://github.com/sebp/scikit-survival/releases/tag/v0.22.1
https://github.com/sebp/scikit-survival/releases/tag/v0.22.0

https://hydra.nixos.org/build/239166746
ZHF: #265948

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@ghost
Copy link
Author

ghost commented Nov 7, 2023

Result of nixpkgs-review run on x86_64-linux 1

4 packages built:
  • python310Packages.scikit-survival
  • python310Packages.scikit-survival.dist
  • python311Packages.scikit-survival
  • python311Packages.scikit-survival.dist

@ghost ghost added the 0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign label Nov 7, 2023
@ghost ghost changed the title python311Packages.scikit-survival: 0.21.0 -> 0.22.1 python311Packages.scikit-survival: 0.21.0 -> 0.22.1; fix build Nov 7, 2023
@natsukium
Copy link
Member

Result of nixpkgs-review pr 266019 at a0370a39 run on aarch64-darwin 1

2 packages failed to build:

@ghost ghost marked this pull request as draft November 7, 2023 09:57
@wamserma
Copy link
Member

wamserma commented Nov 7, 2023

Result of nixpkgs-review pr 266019 run on aarch64-linux 1

4 packages built:
  • python310Packages.scikit-survival
  • python310Packages.scikit-survival.dist
  • python311Packages.scikit-survival
  • python311Packages.scikit-survival.dist

@wamserma
Copy link
Member

wamserma commented Nov 7, 2023

Result of nixpkgs-review pr 266019 run on aarch64-linux 1

Please adjust meta.broken.

@natsukium
Copy link
Member

I don't think this is a significant error.
We just need to add this test to disabledTests as a flaky one.

>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 5 decimals
E           alphas[22] [0].a mismatch
E           Mismatched elements: 1 / 1 (100%)
E           Max absolute difference: 2.79955566e-05
E           Max relative difference: 1.03381292e-12
E            x: array(27079905.88052)
E            y: array(27079905.8805)
=================================== FAILURES ===================================
_ TestCoxnetBaselineModel.test_baseline_predict[predict_cumulative_hazard_function-False] _

self = <test_coxnet.TestCoxnetBaselineModel object at 0x168aed4e0>
breast_cancer = (     X200726_at  ...  size
0     10.926361  ...   3.0
1     12.242090  ...   3.0
2     11.661716  ...   2.5
3     12.... True,  404.), (False, 2225.),
       (False, 2722.), (False, 1781.)],
      dtype=[('e.tdm', '?'), ('t.tdm', '<f8')]))
fn = 'predict_cumulative_hazard_function', normalize_options = False

    @pytest.mark.parametrize("fn", ["predict_survival_function", "predict_cumulative_hazard_function"])
    def test_baseline_predict(self, breast_cancer, fn, normalize_options):
        X, y = breast_cancer
    
        coxnet_1, coxnet_2, X_test, X_test_t = self._fit(X, y, normalize_options)
    
        time_points = np.unique(y["t.tdm"])
    
        for k, (a_1, a_2) in enumerate(zip(coxnet_1.alphas_, coxnet_2.alphas_)):
            pred_1 = getattr(coxnet_1, fn)(X_test, alpha=a_1)
            pred_2 = getattr(coxnet_2, fn)(X_test_t, alpha=a_2)
    
            for i, (f1, f2) in enumerate(zip(pred_1, pred_2)):
>               assert_array_almost_equal(f1.a, f2.a, 5, err_msg=f"alphas[{k}] [{i}].a mismatch")

tests/test_coxnet.py:1327: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/nix/store/ak3zf631ws2rwsl5qq0x3v7j18h0c2jj-python3-3.10.13/lib/python3.10/contextlib.py:79: in inner
    return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_array_almost_equal.<locals>.compare at 0x16996dd80>, 27079905.88052468, 27079905.880496684)
kwds = {'err_msg': 'alphas[22] [0].a mismatch', 'header': 'Arrays are not almost equal to 5 decimals', 'precision': 5, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Arrays are not almost equal to 5 decimals
E           alphas[22] [0].a mismatch
E           Mismatched elements: 1 / 1 (100%)
E           Max absolute difference: 2.79955566e-05
E           Max relative difference: 1.03381292e-12
E            x: array(27079905.88052)
E            y: array(27079905.8805)

/nix/store/ak3zf631ws2rwsl5qq0x3v7j18h0c2jj-python3-3.10.13/lib/python3.10/contextlib.py:79: AssertionError

@ghost ghost marked this pull request as ready for review November 7, 2023 15:25
disable test_coxnet on darwin aarch64 due to 2e-05 floating point mismatch
@ghost
Copy link
Author

ghost commented Nov 7, 2023

I don't think this is a significant error. We just need to add this test to disabledTests as a flaky one.

ok. i disabled it for darwin && aarch64 -- assuming it is deterministic and platform dependent as it passes aarch64 linux. waiting to see results from x64 darwin though after 7 hours build was still in the queue before last update.

@natsukium
Copy link
Member

Result of nixpkgs-review pr 266019 at 20e41e0 run on x86_64-darwin 1

2 packages built successfully:
  • python310Packages.scikit-survival
  • python311Packages.scikit-survival

@delroth delroth added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Nov 7, 2023
@natsukium natsukium merged commit 2732e7d into NixOS:master Nov 8, 2023
22 of 23 checks passed
@ghost ghost deleted the scikit-survival-fix branch November 8, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: ZHF Fixes Fixes during the Zero Hydra Failures (ZHF) campaign 6.topic: python 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 12.approvals: 1 This PR was reviewed and approved by one reputable person
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants