Difference between revisions of "ML4T Software Installation"

From Quantitative Analysis Software Courses
Jump to navigation Jump to search
m
Line 4: Line 4:
 
==Attention==
 
==Attention==
  
The information on this page is for those who are interested to have a Python development environment on their own machine.  Keep in mind that even if you set up your own environment, your code still must run correctly on the GT servers.  Please see [[ML4T_Software_Setup]] for information on how to use those servers, and how to check out the code scaffolding for the projects.
+
The information on this page is for those who are interested to have a Python development environment on their own machine.  Keep in mind that even if you set up your own environment, your code still MUST run correctly on the GT servers, so it is very important that you ensure that you have access to them.  Please see [[ML4T_Software_Setup]] for information on how to use those servers, and how to check out the code scaffolding for the projects.
  
 
==Overview==
 
==Overview==
  
There are two main environments available to you to develop and test your code for this class:  
+
The assignments in this class are in Python (version 2.7), and rely heavily on a few important libraries. These libraries are under active development, which unfortunately means there can be some compatibility issues between versions. This isn't an issue if you use the provided servers, but if you want to work from your local machine it is very important to make sure you have exactly the same library versions. To that end, here is a list of each library and its version number, provided in the pip freeze format:
  
# An Ubuntu Linux image we have created that you can run in a VM on your machine
+
  cycler==0.10.0
# One of several high performance machines at Georgia Tech
+
  functools32==3.2.3.post2
 +
  matplotlib==2.0.2
 +
  numpy==1.13.1
 +
  pandas==0.20.3
 +
  py==1.4.34
 +
  pyparsing==2.2.0
 +
  pytest==3.2.1
 +
  python-dateutil==2.6.1
 +
  pytz==2017.2
 +
  scipy==0.19.1
 +
  six==1.10.0
 +
  subprocess32==3.2.7
  
Both of these have been set up with the same, correct software libraries.  Your code MUST run properly in one of these environments, otherwise it may not run correctly in our auto grader. If your code fails to run in the auto grader environment, you might not get credit for the assignment. So it is very important that you ensure that you have access to one of these environments.
+
If you are familiar with <code>pip</code> and <code>virtualenv</code> you can use this to create a virtualenv for this class which matches those version numbers. If not, this script should accomplish the same thing: [[File:ml4t-setup.py]]. This script requires [https://pypi.python.org/pypi/pip pip] which is provided by default on both macOS and Ubuntu, and comes packaged with the standard Python install for Windows. Certain backends for <code>matplotlib</code> may require additional libraries be installed in a platform specific way.
 
 
You may, for convenience, choose to also manually install the software on your personal machine. Keep in mind, however, that this is not officially supported and it <b>is at your own risk</b>: [[ML4T_Software_Manual_Installation]]
 
  
 
'''Important note''': We use a specific, static dataset for this course, which we will provide. If you download your own data from Yahoo (or elsewhere), you will get wrong answers on assignments.
 
'''Important note''': We use a specific, static dataset for this course, which we will provide. If you download your own data from Yahoo (or elsewhere), you will get wrong answers on assignments.
 
==Install, set up and test a virtual machine==
 
 
If you don't want to connect remotely to GT machines, we have created a VM image with the same operating system and software libraries that you can download here:
 
* Download: [https://dl.dropboxusercontent.com/u/299169754/ml4t-image-0.1.zip ml4t-image-0.1.zip] (md5 1dca6c95b48817d826a20bed478c89f4)
 
and run using [https://www.virtualbox.org/wiki/Downloads VirtualBox], Oracle's open source VMM. The credentials for the main account on this image use '''ml4t''' (case sensitive) as both the username and password, should you need to make changes. This image is configured without any optimizations enabled to be as platform agnostic as possible, but we encourage you to enable [https://www.virtualbox.org/manual/ch03.html#idp46608643755984 hardware acceleration], [https://www.virtualbox.org/manual/ch04.html#guestadd-video graphics acceleration], and [https://www.virtualbox.org/manual/ch04.html#idp46608642326848 guest additions] to improve performance ([https://brainwreckedtech.wordpress.com/2012/01/08/howto-convert-vdis-between-fixed-sized-and-dynamic-in-virtualbox/ changing] the virtual disk image from dynamically allocated to fixed may also improve performance).
 
  
 
== Optional software ==
 
== Optional software ==
Line 29: Line 32:
 
* IPython [[http://docs.python-guide.org/en/latest/scenarios/scientific/ link]]
 
* IPython [[http://docs.python-guide.org/en/latest/scenarios/scientific/ link]]
 
* A Python IDE, such as [https://www.jetbrains.com/pycharm/ PyCharm] or [https://pythonhosted.org/spyder/ Spyder]
 
* A Python IDE, such as [https://www.jetbrains.com/pycharm/ PyCharm] or [https://pythonhosted.org/spyder/ Spyder]
 
== Data ==
 
 
It is no longer necessary to separately download and install the data.  It is provided as part of the github repository.
 
 
== Test installation ==
 
 
Test your environment by running the script <tt>validate_env.py</tt> from the <tt>ml4t/</tt> directory:
 
    python validate_env.py
 
 
If it complains, or if any of the installed library versions are older than the desired versions, fix the problems, and then repeat.
 
 
A clean output from <tt>validate_env.py</tt> is required for MC1-Homework-2.
 

Revision as of 16:35, 17 August 2017

Draft

This page is being updated for the Fall 2017 semester, and is currently in draft mode. This notice will be removed once this page has been finalized.

Attention

The information on this page is for those who are interested to have a Python development environment on their own machine. Keep in mind that even if you set up your own environment, your code still MUST run correctly on the GT servers, so it is very important that you ensure that you have access to them. Please see ML4T_Software_Setup for information on how to use those servers, and how to check out the code scaffolding for the projects.

Overview

The assignments in this class are in Python (version 2.7), and rely heavily on a few important libraries. These libraries are under active development, which unfortunately means there can be some compatibility issues between versions. This isn't an issue if you use the provided servers, but if you want to work from your local machine it is very important to make sure you have exactly the same library versions. To that end, here is a list of each library and its version number, provided in the pip freeze format:

 cycler==0.10.0
 functools32==3.2.3.post2
 matplotlib==2.0.2
 numpy==1.13.1
 pandas==0.20.3
 py==1.4.34
 pyparsing==2.2.0
 pytest==3.2.1
 python-dateutil==2.6.1
 pytz==2017.2
 scipy==0.19.1
 six==1.10.0
 subprocess32==3.2.7

If you are familiar with pip and virtualenv you can use this to create a virtualenv for this class which matches those version numbers. If not, this script should accomplish the same thing: File:Ml4t-setup.py. This script requires pip which is provided by default on both macOS and Ubuntu, and comes packaged with the standard Python install for Windows. Certain backends for matplotlib may require additional libraries be installed in a platform specific way.

Important note: We use a specific, static dataset for this course, which we will provide. If you download your own data from Yahoo (or elsewhere), you will get wrong answers on assignments.

Optional software