Skip to content

Commit

Permalink
Merge #177
Browse files Browse the repository at this point in the history
177: Resolve scikit-learn conflict r=tsj5 a=tsj5

# PULL REQUEST

## Purpose and Content
This PR fixes the problems encountered by `@szy21` in #175. The purpose of that PR was to update the Manifest for the examples (Project/Manifest for CES itself is unchanged). This PR uses `@szy21` 's updates and in addition pins the versions of scipy and scikit-learn installed through Conda.jl to avoid an incompatibility in libstdc++ (documented in #176).

## Benefits and Risks

**Benefits**: Resolves #176. `@szy21's` original PR resolves #174.

**Risks**: Introduces maintenance requirement of having to remember we've pinned the versions of some dependencies going forward; since these are python dependencies this information isn't in Project.toml, so we might forget about this in the future when we want/need to update scikit-learn. This is a very minor risk, as the functionality from sk-learn that we currently use is mature.

## Linked Issues
- Closes #174, #176 

## PR Checklist
- [X] This PR has a corresponding issue OR is linked to an SDI.
- [X] I have followed CliMA's codebase [contribution](https://clima.github.io/ClimateMachine.jl/latest/Contributing/) and [style](https://clima.github.io/ClimateMachine.jl/latest/DevDocs/CodeStyle/) guidelines OR N/A.
- [X] I have followed CliMA's [documentation policy](https://github.com/CliMA/policies/wiki/Documentation-Policy).
- [X] I have checked all issues and PRs and I certify that this PR does not duplicate an open PR.
- [X] I linted my code on my local machine prior to submission: N/A.
- [X] Unit tests: N/A.
- [X] Code used in an integration test.
- [X] All tests ran successfully on my local machine.
- [X] All classes, modules, and function contain docstrings: N/A.
- [X] Documentation has been added/updated: N/A.


Co-authored-by: szy21 <pkuszy@gmail.com>
  • Loading branch information
bors[bot] and szy21 authored Sep 2, 2022
2 parents 3f51ea5 + 934eb38 commit 5eb0701
Show file tree
Hide file tree
Showing 7 changed files with 634 additions and 585 deletions.
3 changes: 2 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ steps:
command:
- "echo $$JULIA_DEPOT_PATH"
- "julia --project -e 'using Pkg; Pkg.instantiate(;verbose=true)'"
- "julia --project -e 'using Conda; Conda.add(\"scikit-learn\")'"
- "julia --project -e 'using Conda; Conda.add(\"scipy=1.8.1\")'"
- "julia --project -e 'using Conda; Conda.add(\"scikit-learn=1.1.1\")'"
- "julia --project -e 'using Conda; Conda.add(\"matplotlib\")'"
env:
PYTHON: ""
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ jobs:
PYTHON: ""
run: |
julia --color=yes --project -e 'using Pkg; Pkg.instantiate()'
julia --color=yes --project -e 'using Conda; Conda.add("scikit-learn")'
julia --project -e 'using Conda; Conda.add("scipy=1.8.1")'
julia --color=yes --project -e 'using Conda; Conda.add("scikit-learn=1.1.1")'
julia --color=yes --project=docs/ -e 'using Pkg; Pkg.instantiate()'
julia --color=yes --project=docs/ -e 'using Pkg; Pkg.precompile()'
- name: Build and deploy
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
env:
PYTHON: ""
run: |
julia --project -e 'using Conda; Conda.add("scikit-learn")'
julia --project -e 'using Conda; Conda.add("scipy=1.8.1")'
julia --project -e 'using Conda; Conda.add("scikit-learn=1.1.1")'
- name: Run Unit Tests
env:
Expand Down Expand Up @@ -92,7 +93,8 @@ jobs:
env:
PYTHON: ""
run: |
julia --project -e 'using Conda; Conda.add("scikit-learn")'
julia --project -e 'using Conda; Conda.add("scipy=1.8.1")'
julia --project -e 'using Conda; Conda.add("scikit-learn=1.1.1")'
- name: Run Unit Tests
env:
Expand Down Expand Up @@ -131,7 +133,8 @@ jobs:
env:
PYTHON: ""
run: |
julia --project -e 'using Conda; Conda.add(\"scikit-learn\")'
julia --project -e 'using Conda; Conda.add("scipy=1.8.1")'
julia --project -e 'using Conda; Conda.add(\"scikit-learn=1.1.1\")'
- name: Run Unit Tests
env:
Expand Down
3 changes: 2 additions & 1 deletion deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ if lowercase(get(ENV, "CI", "false")) == "true"
Pkg.build("PyCall")
end

Conda.add("scikit-learn")
Conda.add("scipy=1.8.1")
Conda.add("scikit-learn=1.1.1")
6 changes: 3 additions & 3 deletions docs/src/installation_instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ it is easiest to set the project to use its own
```


The `scikit-learn` package then has to be installed if using a Julia project-specific
Conda environment:
The `scikit-learn` package (along with `scipy`) then has to be installed if using a Julia project-specific Conda environment:

```
> PYTHON="" julia --project -e 'using Conda; Conda.add("scikit-learn")'
> PYTHON="" julia --project -e 'using Conda; Conda.add("scipy=1.8.1")'
> PYTHON="" julia --project -e 'using Conda; Conda.add("scikit-learn=1.1.1")'
```

Expand Down
Loading

0 comments on commit 5eb0701

Please sign in to comment.