Skip to content

OpenSourceEconomics/pylcm

Repository files navigation

Life Cycle Models

Ruff pre-commit.ci status image

This package aims to generalize and facilitate the specification, solution, and simulation of finite-horizon discrete-continuous dynamic choice models.

Installation

PyLCM can be installed via PyPI or via GitHub. To do so, type the following in a terminal:

$ pip install pylcm

or, for the latest development version, type:

$ pip install git+https://github.com/OpenSourceEconomics/pylcm.git

GPU Support

By default, the installation of PyLCM comes with the CPU version of jax. If you aim to run PyLCM on a GPU, you need to install a jaxlib version with GPU support. For the installation of jaxlib, please consult the jax docs.

Note

GPU support is currently only tested on Linux with CUDA 12.

Developing

We use pixi for our local development environment. If you want to work with or extend the PyLCM code base you can run the tests using

$ git clone https://github.com/OpenSourceEconomics/pylcm.git
$ pixi run tests

This will install the development environment and run the tests. You can run mypy using

$ pixi run mypy

Before committing, install the pre-commit hooks using

$ pixi global install pre-commit
$ pre-commit install

Questions

If you have any questions, feel free to ask them on the PyLCM Zulip chat.

License

This project is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

Copyright (c) 2023- The PyLCM Authors

About

Solution and simulation of life cycle models in Python with GPU acceleration.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 11