seedbank

Manage seeds across multiple Python RNGs.

https://github.com/lenskit/seedbank

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 2 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.2%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

Manage seeds across multiple Python RNGs.

Basic Info
Statistics
  • Stars: 13
  • Watchers: 4
  • Forks: 1
  • Open Issues: 10
  • Releases: 7
Created almost 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Python Seed Manager

Python programs, particularly data science applications, often need to interact with multiple different random number generators.

This package provides a unified interface to seeding them, along with APIs for deriving additional RNG seeds in a predictable way (using NumPy 1.17's new random infrastructure) and constructing random generators.

Quick Start

To get started, just use the seedbank.initialize() function to seed all available random number generators:

python import seedbank seedbank.initialize(65000)

SeedBank will seed all of the known generators that will be available, including:

  • Python standard random
  • NumPy legacy random numpy.random
  • PyTorch (with torch.manual_seed())
  • Numba’s NumPy random
  • TensorFlow (with tf.random.set_seed())
  • cupy (with cupy.random.seed())

In addition, it will initialize a root seed for constructing new-style NumPy Generator instances.

If SeedBank doesn’t support your RNG yet, please submit a pull request!

Developing SeedBank

The easiest way to set up your environment to develop seedbank is to install uv and just, and run:

uv venv create
just install-dev

You can also set up dev dependencies with pip:

pip install -e '.[dev,test,doc]

Acknowledgements

This material is based upon work supported by the National Science Foundation under Grant No. IIS 17-51278. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Owner

  • Name: LensKit
  • Login: lenskit
  • Kind: organization

Developing the LensKit recommender systems toolkit.

Citation (CITATION.cff)

cff-version: 1.2.0
title: "seedbank: easy management of seeds across RNGs"
message: >-
    If you use this software, please cite it using the
    metadata from this file.
type: software
authors:
    - given-names: Michael D.
      family-names: Ekstrand
      email: ekstrand@acm.org
      orcid: "https://orcid.org/0000-0003-2467-0108"
repository-code: "https://github.com/lenskit/seedbank"
url: "https://seedbank.lenskit.org"
identifiers:
    - type: doi
      value: "10.5281/zenodo.11276060"
      description: All versions
keywords:
    - random numbers
license: MIT
version: 0.1.3
date-released: "2023-09-28"

GitHub Events

Total
  • Watch event: 1
  • Pull request event: 1
Last Year
  • Watch event: 1
  • Pull request event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 94
  • Total Committers: 2
  • Avg Commits per committer: 47.0
  • Development Distribution Score (DDS): 0.16
Past Year
  • Commits: 13
  • Committers: 1
  • Avg Commits per committer: 13.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Michael Ekstrand m****d@b****u 79
Michael Ekstrand md@e****t 15
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 13
  • Total pull requests: 20
  • Average time to close issues: 7 days
  • Average time to close pull requests: about 3 hours
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.15
  • Average comments per pull request: 0.75
  • Merged pull requests: 19
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mdekstrand (12)
Pull Request Authors
  • mdekstrand (24)
Top Labels
Issue Labels
enhancement (7) good first issue (4) rng-support (4) question (1)
Pull Request Labels
enhancement (4) rng-support (1) bug (1)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 1,163 last-month
  • Total dependent packages: 3
    (may contain duplicates)
  • Total dependent repositories: 5
    (may contain duplicates)
  • Total versions: 11
  • Total maintainers: 1
pypi.org: seedbank

Common infrastructure for initializing random number generators.

  • Versions: 8
  • Dependent Packages: 2
  • Dependent Repositories: 3
  • Downloads: 1,163 Last month
Rankings
Downloads: 6.6%
Average: 8.6%
Dependent repos count: 9.0%
Dependent packages count: 10.1%
Maintainers (1)
Last synced: 7 months ago
conda-forge.org: seedbank

seedbank is a unified API for seeding a wide range of random number generators with a single seed call, and managing more sophisticated seeding needs through its support for NumPy generators and derived seeds.

  • Versions: 3
  • Dependent Packages: 1
  • Dependent Repositories: 2
Rankings
Dependent repos count: 20.2%
Dependent packages count: 29.0%
Average: 42.0%
Stargazers count: 56.5%
Forks count: 62.4%
Last synced: 8 months ago

Dependencies

.github/workflows/test.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • lenskit/lkbuild/actions/report-test-results main composite
  • lenskit/lkbuild/actions/save-test-results main composite
  • lenskit/lkbuild/actions/setup-vanilla-env main composite
pyproject.toml pypi
  • anyconfig ==0.13.*
  • numpy >=1.17
.github/workflows/check-sources.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v4 composite