Skip to main content

A comprehensive Python framework designed for exploring the loss landscapes of deep learning models.

Project description


A comprehensive Python framework designed for exploring the loss landscapes of deep learning models.

DOI

Introduction

Landscaper is a comprehensive Python framework designed for exploring the loss landscapes of deep learning models. It integrates three key functionalities:

  • Construction: Builds detailed loss landscape representations through low and high-dimensional sampling, including Hessian analysis adapted from PyHessian.
  • Quantification: Applies advanced metrics, including a novel topological data analysis (TDA) based smoothness metric, enabling new insights into model behavior.
  • Visualization: Offers intuitive tools to visualize and interpret loss landscapes, providing actionable insights beyond traditional performance metrics.

By uniting these aspects, Landscaper empowers users to gain a deeper, more holistic understanding of their model's behavior. More information can be found in the [documentation] or in the [paper].

Quick Start

Check out the quick start guide for a step-by-step introduction to using Landscaper.

Documentation

The full documentation for Landscaper is available at https://vis4sciml.github.io/Landscaper/. It includes detailed instructions on installation, usage, and examples. You can build the docs locally by installing the docs extras and then running mkdocs serve.

Installation

Landscaper is available on PyPI, making it easy to install and integrate into your projects.

Landscaper requires Python >=3.10,<3.13 and PyTorch >=2.0.0 and is compatible with both CPU and GPU environments. To install PyTorch, follow the instructions on the PyTorch website to select the appropriate version for your system. Then you can install Landscaper using pip.

To install Landscaper, run the following command:

pip install landscaper

To install Landscaper with all the dependencies to run the examples, use:

pip install landscaper[examples]

Docker

Additionally, Landscaper provides a Docker image that includes all dependencies, based on the official PyTorch image. You can pull the image from the GitHub Container Registry:

docker pull ghcr.io/vis4sciml/landscaper:latest

BibTeX Citation

If you use Landscaper in your research, please consider citing it. You can use the following BibTeX entry:

@misc{https://doi.org/10.5281/zenodo.15874987,
  doi = {10.5281/ZENODO.15874987},
  url = {https://zenodo.org/doi/10.5281/zenodo.15874987},
  author = {Jiaqing Chen and Nicholas Hadler and Tiankai Xie and Rostyslav Hnatyshyn},
  title = {Vis4SciML/Landscaper},
  publisher = {Zenodo},
  year = {2025},
  copyright = {Lawrence Berkeley National Labs BSD Variant License}
}

Developers

Install the dev dependencies with uv sync. When running pytest, pass --html=report.html to be able to visualize images created by the tests.

Copyright

Landscaper Copyright (c) 2025, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), University of California, Berkeley, and Arizona State University. All rights reserved.

If you have questions about your rights to use or distribute this software, please contact Berkeley Lab's Intellectual Property Office at IPO@lbl.gov.

NOTICE. This Software was developed under funding from the U.S. Department of Energy and the U.S. Government consequently retains certain rights. As such, the U.S. Government has been granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the Software to reproduce, distribute copies to the public, prepare derivative works, and perform publicly and display publicly, and to permit others to do so.

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

landscaper-1.2.1.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

landscaper-1.2.1-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file landscaper-1.2.1.tar.gz.

File metadata

  • Download URL: landscaper-1.2.1.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for landscaper-1.2.1.tar.gz
Algorithm Hash digest
SHA256 fd42a809afe53a722c1e17d8f495d1ea5746d9c1de2418218048f4ba25981fcb
MD5 197d32ff9f5bf58afc72ce791eea23b9
BLAKE2b-256 9f4fd9e38bfad7cfe4682685480863e79f4727ce23c89d7b32d2088dbe882ec7

See more details on using hashes here.

File details

Details for the file landscaper-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: landscaper-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for landscaper-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f85dad4d8b4611cf16eaf1876cd7df90ce83c1be0b845631b8c60c2f6105a93e
MD5 eb4d9234a6df3cb45f8f5b669584c2aa
BLAKE2b-256 89de8cc1f5852a95d627b75e402e5497eb268cd5dcd640f404eb30f27e90f4a3

See more details on using hashes here.

Supported by

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