AI forecasting and research tools to help humans reason about and forecast the future
Project description
Last Update: Oct 25 2024
Overview
This repository contains forecasting and research tools built with Python and Streamlit. The project aims to assist users in making predictions, conducting research, and analyzing data related to hard to answer questions (especially those from Metaculus). Find the demo website here: https://mokoresearch.streamlit.app/
Here are the key components and features of the project:
- General Forecaster that integrates with the Metaculus AI benchmarking competition
- Historical Base Rate Researcher
- Niche List Researcher
- Fermi Estimator
- Key Factors Analysis
Getting Set Up
Environment Variables
The environment variables from .env.template
are needed to run. Copy this template as .env
and fill it in. Talk to the project owner to get the correct values for some of the more project specific variables.
Docker Dev Container
To get your development environment up and running, you need to have Docker Engine installed and running. Once you do, you can use the VSCode dev container pop-up to automatically set up everything for you
Install Docker
For Windows and Mac, you will download Docker Desktop. For Linux, you will download Docker Engine. (NOTE: These instructions might be outdated).
First download and setup Docker Engine using the instructions at the link below for your OS:
- Windows: windows-install
- Mac: mac-install
- Linux: install
- Note: DO NOT install Docker Desktop for Linux, rather, select your Linux distribution on the left sidebar and follow the distribution specific instructions for Docker engine. Docker Desktop runs with a different environment in Linux. (TODO: Check if this restriction still applies)
- Remember to follow the post-installation steps for Linux: linux-postinstall
Starting the container
Once Docker is installed, when you open up the project folder in VSCode, you will see a pop up noting that you have a setup for dev containers, and asking if you would like to open the folder in a container. You will want to click "open in container". This will automatically set up everything you need and bring you into the container. If the docker process times out in the middle of installing python packages you can run the postinstall.sh manually. You also may need to have the VSCode Docker extension and/or devcontainer extension downloaded
You may need to reinstall some vscode extensions in the dev environment if you are opening it for the first time, but this should only be for the first time running it.
Some extensions are installed automatically (e.g. linting). You may need to reload the window after all of these extensions are installed.
Managing Docker
There are many ways to manager Docker containers, but generally if you download the vscode docker extension, you will be able to stop/start/remove all containers and images.
Alternatives to Docker
If you choose not to run docker, use a python virtual environment so these packages don't conflict with local packages. To set this up run
python -m venv .venv
If you use a virtual environment, install python packages and their dependencies to the virtual environment via the command
pip install --require-virtualenv -r requirements.txt
Running the Front End
You can run any front end folder in the front_end directory by executing streamlit run front_end/[site_file_name]/Home.py
. This will start a development server for you that you can run.
Testing
This repository uses pytest and pytest-xdist. xdist spreads out all the tests between multiple threads that are each run on a separate CPU. Currently its setup to create a thread per CPU. Configuration for this is in pytest.ini
. The tests are gathered afresh from each thread, so any initialization done in imports, globals, or class variables are done for each thread. Additionally, global state is not reset between tests on the same thread. When making tests, assume unknown values for globals and especially class variables (though try to avoid using these at all).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file forecasting_tools-0.1.2.tar.gz
.
File metadata
- Download URL: forecasting_tools-0.1.2.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.9.3-76060903-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9439d0290735813c5ed73b68107388228102e8bf3e7f72e3ae91b0293e798cc1 |
|
MD5 | 12b99f0ce2d3bff4d50171c40c87086b |
|
BLAKE2b-256 | 8694b1cd6c7e6065c25332cee7e3678c49608081eac79c379619b4949ebebc45 |
File details
Details for the file forecasting_tools-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: forecasting_tools-0.1.2-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.9.3-76060903-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6ba9a892046bfc9d647b11a491385574d7ae3e462cd96f1edb31bb49f30c9c2 |
|
MD5 | bc614243344638e6e6d1c8852dfa68a7 |
|
BLAKE2b-256 | 8d4426a963f18ef182ca509ec1231a82c824a4b01b1124e1b35e4ecaf120e356 |