Skip to main content

No project description provided

Project description

Larch v6

This repository contains the under-development next generation of the Larch package, for estimating and applying discrete choice models. Version 6 is a substantial rewrite of the package, changing to a platform that allows swapping out the underlying computational engine, so that the same model can run in numba or JAX.

:warning: This is a work in progress. A lot of things are working, but not everything. The interface is quite similar to Larch v5 and existing users will likely find it familiar. If you want to try it out, please do, and feel free to open issues in the issue tracker. But, please don't expect it to work perfectly yet, especially for more advanced models.

Quick Start Guide

You can install Larch v6 with pip:

python -m pip install larch6

This will install the package and all of its required dependencies. Note that while the installation name is "larch6", the package import name is "larch", and you cannot install both Larch v5 and Larch v6 in the same environment.

Or you can install it using conda to create a new environment:

conda env create -p ARBORETUM -f https://raw.githubusercontent.com/driftlesslabs/larch/main/envs/arboretum.yml
conda activate ./ARBORETUM

Developer's Installation

Before you start with the installation, you need have the following tools already:

#!/usr/bin/env zsh

# exit this script immediately upon any failure
set -e

# Change this directory to where you want to install this whole mess
export TARGET_DIR="${HOME}/driftless"

# make the target working directory if it doesn't already exist
mkdir -p "${TARGET_DIR}"

# change to the target working directory
cd -- "${TARGET_DIR}"

# clone the various repositories
gh repo clone driftlesslabs/larch -- --recurse-submodules

# install the conda development environment
mkdir -p .env/LARIX
conda env update -p .env/LARIX -f larch/envs/development.yaml
conda activate .env/LARIX

# make this environment available to jupyter
ipython kernel install --user --name=LARIX

# rip examples to loadable modules
python larch/tools/rip_examples.py

# prep sharrow submodule
uv pip install -e ./larch/sharrow

# compile and install
uv pip install -e ./larch

# run unit tests (optional)
mkdir sandbox
cd sandbox
python -m pytest -v ../larch/sharrow/sharrow/tests
python -m pytest -v ../larch/tests

Windows Installation

The above script should mostly work on Windows as well, but one minor modification is required, as the JAX library is not yet available for Windows via conda. You need to install it with pip instead. So, replace the conda env update line in the script above with the following:

conda env update -p .env/LARIX -f larch/envs/windows.yaml

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

larch6-6.0.30.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

larch6-6.0.30-py3-none-any.whl (1.9 MB view details)

Uploaded Python 3

File details

Details for the file larch6-6.0.30.tar.gz.

File metadata

  • Download URL: larch6-6.0.30.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for larch6-6.0.30.tar.gz
Algorithm Hash digest
SHA256 94709938cb8520b1e8a860d54f0bb55388b4d1ce5314fe6acbda64960c8ba981
MD5 a2a4d3d57a8ede3485516551f44c8993
BLAKE2b-256 2c5e88e24b8d4c50334138f049796f702091ef83cf2b8a010145ea83e396502a

See more details on using hashes here.

File details

Details for the file larch6-6.0.30-py3-none-any.whl.

File metadata

  • Download URL: larch6-6.0.30-py3-none-any.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for larch6-6.0.30-py3-none-any.whl
Algorithm Hash digest
SHA256 8a997dedc437af47e693ab8a90ef1315d6d00cba0f173aef4daa671603322640
MD5 e2f36e3a14117eb001a138da706e8e1f
BLAKE2b-256 cdf7aaf74a976e812d51d8001164dfc6c69344b99ef795d199b2bcc0f95ab294

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