Skip to main content

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.

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.

Metadata

Release files for Landscaper 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Landscaper 1.3.1
File Size Uploaded
landscaper-1.3.1.tar.gz 24.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Landscaper 1.3.1
File Interpreter ABI Platform
landscaper-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 55.2 kB

Release files / landscaper-1.3.1.tar.gz

Download URL landscaper-1.3.1.tar.gz
Size 24.9 kB
Tags Source
SHA-256 checksum
How to use checksums
60a3056dad143259513aa466f63fd637d59854d3aa48ff29a4fa6d9608ba8c17
BLAKE2b-256 checksum
How to use checksums
506bfc61dbcba95d0dfb0dfd088abb623cd9463dc2034379e89d12c6017481da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / landscaper-1.3.1-py3-none-any.whl

Download URL landscaper-1.3.1-py3-none-any.whl
Size 30.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48ca1c6c3464996d4c7f38923a832bd6fb5908e3b97ad115a02cc9a89bc45b4f
BLAKE2b-256 checksum
How to use checksums
e0d59fd4613dcb6d375e1d04e17e7ef7d0249c054d2c8308cc79999c84bb8cda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page