Skip to content

Conversation

@ZacharyPuls
Copy link

  • Update scikit-learn to latest (1.7)
  • Edit deprecated numpy functions for 2.x support (np.product() -> np.prod(), np.mat() -> np.asmatrix())
  • Change np.where(G.graph[i, 0] != Endpoint.NULL.value)[0] (maybe was a typo?) to np.where(G.graph[i, :] != Endpoint.NULL.value)[0] in pyrca/thirdparty/causallearn/search/ScoreBased/GES.py

Unit tests are passing:

=================================================================================================================== test session starts ====================================================================================================================
platform linux -- Python 3.14.0, pytest-9.0.1, pluggy-1.6.0
rootdir: /home/zpuls/pyrca-dev-upstream/PyRCA
collected 22 items

tests/analyzers/test_bayesian.py .                                                                                                                                                                                                                   [  4%]
tests/analyzers/test_epsilon_diagnosis.py .                                                                                                                                                                                                          [  9%]
tests/analyzers/test_ht.py s                                                                                                                                                                                                                         [ 13%]
tests/analyzers/test_random_walk.py .                                                                                                                                                                                                                [ 18%]
tests/analyzers/test_rcd.py s                                                                                                                                                                                                                        [ 22%]
tests/graphs/test_domain.py .                                                                                                                                                                                                                        [ 27%]
tests/graphs/test_fges.py .                                                                                                                                                                                                                          [ 31%]
tests/graphs/test_ges.py .                                                                                                                                                                                                                           [ 36%]
tests/graphs/test_lingam.py .                                                                                                                                                                                                                        [ 40%]
tests/graphs/test_pc.py .                                                                                                                                                                                                                            [ 45%]
tests/outliers/test_config.py ...                                                                                                                                                                                                                    [ 59%]
tests/outliers/test_stats.py ...                                                                                                                                                                                                                     [ 72%]
tests/simulation/test_simulation.py ...                                                                                                                                                                                                              [ 86%]
tests/tools/test_causal.py ...                                                                                                                                                                                                                       [100%]

===================================================================================================================== warnings summary =====================================================================================================================
<frozen importlib._bootstrap>:491
  <frozen importlib._bootstrap>:491: RuntimeWarning: The global interpreter lock (GIL) has been enabled to load module 'pandas._libs.pandas_parser', which has not declared that it can run safely without the GIL. To override this behavior and keep the GIL disabled (at your own risk), run with PYTHON_GIL=0 or -Xgil=0.

tests/outliers/test_config.py:14
  /home/zpuls/pyrca-dev-upstream/PyRCA/tests/outliers/test_config.py:14: PytestCollectionWarning: cannot collect test class 'TestConfig' because it has a __init__ constructor (from: tests/outliers/test_config.py)
    @dataclass

tests/graphs/test_ges.py: 3778 warnings
  /home/zpuls/.pyenv/versions/3.14.0/envs/pyrca/lib/python3.14t/site-packages/numpy/matrixlib/defmatrix.py:70: PendingDeprecationWarning: the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.
    return matrix(data, dtype=dtype, copy=False)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================================================================================================== 20 passed, 2 skipped, 3780 warnings in 16.37s =======================================================================================================

…for 2.x support, change (maybe was a typo?) to in pyrca/thirdparty/causallearn/search/ScoreBased/GES.py
@salesforce-cla
Copy link

Thanks for the contribution! Before we can merge this, we need @ZacharyPuls to sign the Salesforce Inc. Contributor License Agreement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant