Repo for the advanced machine learning class at ETH Autumn semester 2018
- Pycharm Professional: Python IDE used for development and debugging.
- Anaconda3: Python Data Science Platform, used for the Conda environment variables.
After installing the required software, you must setup the environment. This can be done by one of these two methods:
IMPORTANT: add export PYTHONHASHSEED=42 to your .bashrc file to get always reproducable results
This will create the new conda environment "aml" and install all the required software.
Import the environment.yml. To do so open a terminal and type the following command
conda env create -f environment.yml
To install new libraries or modify the environment you must first activate the environment.
Launch a terminal, and issue this command
conda activate aml
If you want to use the environment in the a notebook as a kernel run:
python -m ipykernel install --user --name aml --display-name "Python3 (aml)"
After activating the environment in a terminal in Linux, or the Anaconda prompt in Windows, you can install new packages by issuing this command
conda install <package name>
The steps are almost the same for Linux and Windows:
- Open the project folder AML in PyCharm
- Go to "File>Settings"
- From the tabs on the left select "Project:AML" then Project Interpreter
- Click on the Gear symbol (Settings) next to the list of available interpreters, and then Add...
- In the pop-up window, select "Existing environment", then the "..." button next to the "interpreter" list.
- Navigate to the location of the new conda environment you created, by default it is located in (/home//Anaconda3/bin/python) for Linux and (C:\Users<USER>\Anaconda3\python.exe) for Windows.
This should make Pycharm use the conda environment we created called aml for this project.
First, load the projects environment, you can do so through PyCharm or using the terminal (Anaconda prompt for Windows):
conda activate aml
cd /path/to/project