Skip to main content

a package for investigating and comparing the predictive uncertainties from deep learning models

Project description

DeepUQ

DeepUQ is a package for injecting and measuring different types of uncertainty in ML models.

status(pypi link if applicable)

status(MIT or Apache 2.0 or another requires link changed)

GitHub Workflow Status

GitHub Workflow Status

Installation

Install via pypi

To be updated, not yet released.

Clone this repo

First, cd to where you'd like to put this repo and type:

git clone https://github.com/deepskies/DeepUQ.git

Then, cd into the repo:

cd DeepUQ

Install and use poetry to set up the environment

Poetry is our recommended method of handling a package environment as publishing and building is handled by a toml file that handles all possibly conflicting dependencies. Full docs can be found here.

Install instructions:

Add poetry to your python install

pip install poetry

Then, from within the DeepUQ repo, run the following:

Install the pyproject file

poetry install

Begin the environment

poetry shell

Verify DeepUQ is installed correctly

After following the installation instructions, verify installation is functional is all tests are passing by running the following in the root directory:

pytest

How to run the workflow

Folder structure overview

The scripts can be accessed via the ipython example notebooks or via the model modules (ie DeepEnsemble.py). For example, to ingest data and train a Deep Ensemble from the DeepUQ/ directory:

python src/scripts/DeepEnsemble.py

With no config file specified, this command will pull settings from the default.py file within utils. For the DeepEnsemble.py script, it will automatically select the DefaultsDE dictionary.

Another option is to specify your own config file:

python src/scripts/DeepEnsemble.py --config "path/to/config/myconfig.yaml"

Where you would modify the "path/to/config/myconfig.yaml" to specify where your own yaml lives.

The third option is to input settings on the command line. These choices are then combined with the default settings and output in a temporary yaml.

python src/scripts/DeepEnsemble.py --noise_level "low" --n_models 10 --out_dir ./DeepUQResources/results/ --save_final_checkpoint True --savefig True --n_epochs 10

This command will train a 10 network, 10 epoch ensemble on the low noise data and will save figures and final checkpoints to the specified directory. Required arguments are the noise setting (low/medium/high), the number of ensembles, and the working directory.

For more information on the arguments:

python src/scripts/DeepEnsemble.py --help

The other available script is the DeepEvidentialRegression.py script:

python src/scripts/DeepEvidentialRegression.py --help

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

deepuq-0.1.0.tar.gz (563.7 kB view details)

Uploaded Source

Built Distribution

deepuq-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file deepuq-0.1.0.tar.gz.

File metadata

  • Download URL: deepuq-0.1.0.tar.gz
  • Upload date:
  • Size: 563.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.6.0

File hashes

Hashes for deepuq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 281d4f52a7c43e328def41f3a5885f1816c64f4a93b3563ae476b472829134a1
MD5 728a94c8127df5b5d5724e0b6a3081b1
BLAKE2b-256 c4a1bb3beafce2ba1b4a4ea00dd05f0ccaecaf6cd42ebcbb1ca0d5f6eee41120

See more details on using hashes here.

File details

Details for the file deepuq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deepuq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/23.6.0

File hashes

Hashes for deepuq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 976766ae477918d0cd30f7b44945eed3833d8e3f9efcb0eeefba633c97a5e906
MD5 0de1b14bb20a2164f20bc08a6728f8c2
BLAKE2b-256 1e99a50e801de3626aa7cf61ed859fcff414be2336ce3897dfe01def53e5f7e9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page