Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Thor Server

This module implements the functionality of the Thor Server, a web service for performing Bayesian optimization. This site is responsible for presenting a visual overview of a user's machine learning and parameter tuning experiments and for providing references to tutorials and software downloads of client-side applications.


In order to install and operate the Thor Server, please follow these steps:

  1. Ensure that you have installed the requirements for Thor and Thor-Server by executing pip install -r requirements.txt.
  2. Create a local directory instance and a config file in that directory to hold configuration variables specific to your configuration, e.g.:
  • SQLALCHEMY_DATABASE_URI - defaults to user thor_server and db thor
  • SECRET_KEY - for sessions; see How to generate good secret keys, under "Sessions"
  • MAIL_* - as appropriate
  1. Create a user and database to match your SQLALCHEMY_DATABASE_URI.
  2. Execute the following block of code to set up the Thor database:
python db init
python db migrate
python db upgrade head
  1. To run the Thor Server on your computer's localhost, simply run make from the root directory of this repository. For development, run make dev to enable automatic application reloads whenever code changes as well as verbose (debug) logging.

Updates / schema migrations

Thor Server uses alembic for database schema migrations via flask-migrate. Migration support and versioning scripts are stored under migrations/. When new schema migrations are added, update an existing database using the upgrade command:

python db upgrade head

It is probably best to test this first and to ensure backups are up to date before applying to production instances.

During development, after you change the models/schema, start a new migration script using migrate:

python db migrate

Alembic will attempt to auto-generate the script for you, but note that its ability to detect changes is limited, and the generated script should be thought of as a starting point for your review. Be sure to examine the generated migration script before applying and committing.

To add a description to the migration name to help the versioning script stand out a little more, use -m:

python db migrate -m "add is_published column"

When a new migration script is complete, upgrade schemas using upgrade as described above.


Documentation for using Thor's API clients, which exist presently for Python, MATLAB, and R, will be hosted online as well as made available as inline comments in the client source code.

Documentation for Python and MATLAB will be hosted on a corresponding site on Read the Docs. Documentation for R will be provided through CRAN or through the R client's dedicated page on GitHub.

Email Notifications

For deployment it can be useful to have an email account setup to dispense messages. This can be accomplished by nagivating to the file ./website/ and modifying the application attributes

app.config["MAIL_USERNAME"] = ""
app.config["MAIL_PASSWORD"] = ""

Enter the gmail address and the password you want to use.

Testing contains a minimal set of basic tests of basic site functions. To invoke them:

make test


Thor server application to facilitate Bayesian optimizaton.







No releases published


No packages published