-
-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge changes from dev to current branch
- Loading branch information
Showing
101 changed files
with
1,745 additions
and
1,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,27 @@ | ||
# This workflow is just to test that the docs build successfully. | ||
name: docs | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
# Manual trigger option in GitHub | ||
# This won't push to GitHub pages where docs are hosted due | ||
# to the guarded if statement in those steps | ||
workflow_dispatch: | ||
|
||
# Trigger on push to these branches | ||
push: | ||
branches: | ||
- main | ||
- development | ||
|
||
# Trigger on open/push to a PR targeting one of these branches | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- ready_for_review | ||
branches: | ||
- main | ||
- development | ||
|
||
env: | ||
name: SMAC3 | ||
|
||
permissions: | ||
contents: write | ||
jobs: | ||
build-and-deploy: | ||
if: ${{ !github.event.pull_request.draft }} | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
id: install | ||
run: | | ||
pip install ".[gpytorch,dev]" | ||
# Getting the version | ||
SMAC_VERSION=$(python -c "import smac; print('v' + str(smac.version));") | ||
# Make it a global variable | ||
echo "SMAC_VERSION=$SMAC_VERSION" >> $GITHUB_ENV | ||
- name: Make docs | ||
run: | | ||
make clean | ||
make docs | ||
- name: Pull latest gh-pages | ||
if: (contains(github.ref, 'develop') || contains(github.ref, 'main')) && github.event_name == 'push' | ||
run: | | ||
cd .. | ||
git clone https://github.com/${{ github.repository }}.git --branch gh-pages --single-branch gh-pages | ||
- name: Copy new docs into gh-pages | ||
if: (contains(github.ref, 'develop') || contains(github.ref, 'main')) && github.event_name == 'push' | ||
run: | | ||
branch_name=${GITHUB_REF##*/} | ||
cd ../gh-pages | ||
rm -rf $branch_name | ||
cp -r ../${{ env.name }}/docs/build/html $branch_name | ||
# we also copy the current SMAC_VERSION | ||
rm -rf $SMAC_VERSION | ||
cp -r ../${{ env.name }}/docs/build/html $SMAC_VERSION | ||
- name: Push to gh-pages | ||
if: (contains(github.ref, 'develop') || contains(github.ref, 'main')) && github.event_name == 'push' | ||
run: | | ||
last_commit=$(git log --pretty=format:"%an: %s") | ||
cd ../gh-pages | ||
branch_name=${GITHUB_REF##*/} | ||
git add $branch_name/ | ||
git add $SMAC_VERSION/ | ||
git config --global user.name 'Github Actions' | ||
git config --global user.email '[email protected]' | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
git commit -am "$last_commit" | ||
git push | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: "Install dependancies" | ||
run: python -m pip install -e ".[dev]" | ||
- name: "Build Docs" | ||
run: mkdocs build --clean --strict |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -147,4 +147,7 @@ src | |
|
||
# Pycharm | ||
.idea | ||
.vscode | ||
.vscode | ||
|
||
projects | ||
_api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Installation | ||
|
||
## Requirements | ||
|
||
SMAC is written in python3 and therefore requires an environment with python>=3.8. | ||
Furthermore, the Random Forest used in SMAC requires SWIG as a build dependency. | ||
|
||
!!! info | ||
|
||
SMAC is tested on Linux and Mac machines with python >=3.8. | ||
|
||
|
||
## SetUp | ||
|
||
We recommend using Anaconda to create and activate an environment: | ||
|
||
```bash | ||
conda create -n SMAC python=3.10 | ||
conda activate SMAC | ||
``` | ||
|
||
Now install swig either on the system level e.g. using the following command for Linux: | ||
```bash | ||
apt-get install swig | ||
``` | ||
|
||
Or install swig inside of an already created conda environment using: | ||
|
||
```bash | ||
conda install gxx_linux-64 gcc_linux-64 swig | ||
``` | ||
|
||
## Install SMAC | ||
You can install SMAC either using PyPI or Conda-forge. | ||
|
||
### PYPI | ||
To install SMAC with PyPI call: | ||
|
||
```bash | ||
pip install smac | ||
``` | ||
|
||
Or alternatively, clone the environment from GitHub directly: | ||
|
||
```bash | ||
git clone https://github.com/automl/SMAC3.git && cd SMAC3 | ||
pip install -e ".[dev]" | ||
``` | ||
|
||
### Conda-forge | ||
|
||
Installing SMAC from the `conda-forge` channel can be achieved by adding `conda-forge` to your channels with: | ||
|
||
```bash | ||
conda config --add channels conda-forge | ||
conda config --set channel_priority strict | ||
``` | ||
|
||
You must have `conda >= 4.9` installed. To update conda or check your current conda version, please follow the instructions from [the official anaconda documentation](https://docs.anaconda.com/anaconda/install/update-version/). Once the `conda-forge` channel has been enabled, SMAC can be installed with: | ||
|
||
```bash | ||
conda install smac | ||
``` | ||
|
||
Read [SMAC feedstock](https://github.com/conda-forge/smac-feedstock) for more details. | ||
|
||
## Windows (native or via WSL, experimental) | ||
|
||
SMAC can be installed under Windows in a WSL (Windows Subsystem for Linux). | ||
You can find an instruction on how to do this here: [Experimental](./10_experimental.md). | ||
However, this is experimental and might not work in each case. | ||
If you would like to suggest any changes, please let us know. |
Oops, something went wrong.