-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Feature/improve documentation #1028
Changes from 6 commits
b4cb668
aa1e09c
a9a41d4
28c500c
4ebc028
b48aef8
0cb5372
02bd40b
5cff401
74fc1b8
16c276d
00b5c3c
ec3c9b1
4427357
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Experimental | ||
============ | ||
|
||
.. warning:: | ||
This part is experimental and might not work in each case. If you would like to suggest any changes, please let us know. | ||
|
||
|
||
Installation in Windows via WSL | ||
------------------------------ | ||
|
||
SMAC can be installed in a WSL (Windows-Subsystem für Linux) under windows. | ||
|
||
**1) Install WSL under Windows** | ||
|
||
Install WSL under windows. This SMAC installation workflow was tested with Ubuntu 18.04. For Ubuntu 20.04, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Windows. capitalize There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, should be fixed everywhere now. |
||
it has been observed that the SMAC installation results in a segmentation fault (core dumped). | ||
|
||
**2) Get Anaconda** | ||
|
||
Download an Anaconda Linux version to drive D under Windows, e.g. \\Anaconda\\Anaconda2-4.2.0-linux-x86_64.sh | ||
|
||
In the WSL, Windows resources are mounted under /mnt: | ||
|
||
.. code:: bash | ||
|
||
cd /mnt/d | ||
bash Anaconda2-4.2.0-linux-x86_64.sh | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this Anaconda2? Probably this might not work with python3 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh right, this is outdated. Put the latest there now. |
||
|
||
|
||
Enter this command to create the environment variable: | ||
|
||
.. code:: bash | ||
|
||
export PATH="$PATH:/home/USERNAME/anaconda3/bin | ||
sarah-segel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Input 'python' to check if the installation was successful. | ||
|
||
**3) Install SMAC** | ||
|
||
Change to your home folder and install the general software there: | ||
|
||
.. code:: bash | ||
|
||
cd /home/USERNAME | ||
sudo apt-get install software-properties-common | ||
sudo apt-get update | ||
sudo apt-get install build-essential swig | ||
conda install gxx_linux-64 gcc_linux-64 swig | ||
curl https://raw.githubusercontent.com/automl/smac3/master/requirements.txt | xargs -n 1 -L 1 pip install |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
Continue | ||
======== | ||
|
||
SMAC automatically restores states where it left off if a run was interrupted or finished. To do so, it reads in old | ||
files (derived from scenario's name, output_directory and seed) and sets the components. | ||
SMAC can automatically restore states where it left off if a run was interrupted or prematurely finished. To do so, | ||
it reads in old files (derived from scenario's name, output_directory and seed) and obtains the scenario information | ||
of the previous run from those to continue the run. | ||
|
||
The behavior can be controlled by setting the parameter ``overwrite`` in the facade to True or False, respectively: | ||
If set to True, SMAC overwrites the run results if a previous run is found that is consistent in the meta data with | ||
the current setup. If set to False and a previous run is found that is consistent in the meta data, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicated? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, what is duplicated? If referring to the "If set to False" being there twice: this is on purpose, as there are two different behaviors in this case. I made this more clear with the enumeration structure. |
||
the run is continued. If set to False and a previous run is found that is not consistent in the meta data, the | ||
user is asked for the exact behaviour (overwrite completely or rename old run first). | ||
|
||
.. warning:: | ||
|
||
If you changed any code and specified a name, SMAC will ask you whether you still want to resume or | ||
delete the old run completely. If you did not specify a name, SMAC generates a new name and the old run is | ||
not affected. | ||
If you changed any code affecting the run's meta data and specified a name, SMAC will ask you whether you still | ||
want to overwrite the old run or rename the old run first. If you did not specify a name, SMAC generates a new name | ||
and the old run is not affected. | ||
|
||
|
||
Please have a look at our :ref:`continue example<Continue an Optimization>`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,16 @@ | |
Continue an Optimization | ||
^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
SMAC can also be continued. In this example, an optimization of a simple quadratic | ||
function is continued. We use a custom callback, to artificially stop the first optimization. | ||
SMAC can also be continued from a previous run. To do so, it reads in old files (derived from scenario's name, | ||
output_directory and seed) and sets the corresponding components. In this example, an optimization of a simple quadratic | ||
function is continued. | ||
|
||
First, after creating a scenario with 50 trials, we run SMAC with overwrite set to True. This will | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's probably not worth doing here but typically I like to use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed. |
||
overwrite any previous runs (in case the example was called before). We use a custom callback to artificially stop | ||
this first optimization after 10 trials. | ||
|
||
Second, we again run the SMAC optimization using the same scenario, but this time with overwrite set to False. As | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
there already is a previous run with the same meta data, this run will be continued until the 50 trials are reached. | ||
""" | ||
|
||
from __future__ import annotations | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,8 +92,10 @@ class AbstractFacade: | |
Callbacks, which are incorporated into the optimization loop. | ||
overwrite: bool, defaults to False | ||
When True, overwrites the run results if a previous run is found that is | ||
inconsistent in the meta data with the current setup. If ``overwrite`` is set to False, the user is asked | ||
for the exact behaviour (overwrite completely, save old run, or use old results). | ||
consistent in the meta data with the current setup. When False and a previous run is found that is | ||
consistent in the meta data, the run is continued. When False and a previous run is found that is | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI: Not sure if I misunderstand something, but I would say it needs to be "consistent" instead of "inconsistent" here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i think you are right There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 |
||
not consistent in the meta data, the the user is asked for the exact behaviour (overwrite completely | ||
or rename old run first). | ||
dask_client: Client | None, defaults to None | ||
User-created dask client, which can be used to start a dask cluster and then attach SMAC to it. This will not | ||
be closed automatically and will have to be closed manually if provided explicitly. If none is provided | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intentionally Denglish?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it tbh
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha no, this was by mistake - fixed.