{"id":34077694,"url":"https://github.com/chto/linna","last_synced_at":"2025-12-14T10:41:06.054Z","repository":{"id":57438731,"uuid":"449358812","full_name":"chto/linna","owner":"chto","description":"Likelihood Inference Neural Network Accelerator","archived":false,"fork":false,"pushed_at":"2025-04-25T16:17:58.000Z","size":3574,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-01T18:45:52.929Z","etag":null,"topics":["bayesian-inference","cosmology","galaxy-clusters","mcmc-sampling","neural-networks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chto.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-18T16:19:57.000Z","updated_at":"2025-04-25T16:18:02.000Z","dependencies_parsed_at":"2022-09-08T08:03:10.504Z","dependency_job_id":null,"html_url":"https://github.com/chto/linna","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/chto/linna","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chto%2Flinna","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chto%2Flinna/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chto%2Flinna/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chto%2Flinna/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chto","download_url":"https://codeload.github.com/chto/linna/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chto%2Flinna/sbom","scorecard":{"id":281813,"data":{"date":"2025-08-11","repo":{"name":"github.com/chto/linna","commit":"4d90b5e4c828341155600f53c3997f3fa5317c67"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/check.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/chto/linna/check.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/chto/linna/check.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/check.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/chto/linna/check.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/check.yml:31","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm","Warn: Project is vulnerable to: PYSEC-2021-437 / GHSA-5xp3-jfq3-5q8x","Warn: Project is vulnerable to: PYSEC-2023-228 / GHSA-mq26-g339-26xf","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114","Warn: Project is vulnerable to: GHSA-3749-ghw9-m3mg","Warn: Project is vulnerable to: PYSEC-2022-43015 / GHSA-47fc-vmwq-366v","Warn: Project is vulnerable to: PYSEC-2025-41 / GHSA-53q9-r3pm-6pq6","Warn: Project is vulnerable to: PYSEC-2024-252 / GHSA-5pcm-hx3q-hm94","Warn: Project is vulnerable to: GHSA-887c-mr87-cxwp","Warn: Project is vulnerable to: PYSEC-2024-251 / GHSA-pg7h-5qx3-wjr3","Warn: Project is vulnerable to: PYSEC-2024-250","Warn: Project is vulnerable to: PYSEC-2024-259","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T16:04:06.503Z","repository_id":57438731,"created_at":"2025-08-17T16:04:06.504Z","updated_at":"2025-08-17T16:04:06.504Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27726266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayesian-inference","cosmology","galaxy-clusters","mcmc-sampling","neural-networks"],"created_at":"2025-12-14T10:41:05.214Z","updated_at":"2025-12-14T10:41:06.047Z","avatar_url":"https://github.com/chto.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=====\nLINNA\n=====\n\n\n.. image:: https://img.shields.io/pypi/v/linna.svg\n        :target: https://pypi.python.org/pypi/linna\n\n.. image:: https://github.com/chto/linna/actions/workflows/check.yml/badge.svg\n        :target: https://github.com/chto/linna/actions/workflows/check.yml\n\n.. image:: https://readthedocs.org/projects/linna/badge/?version=latest\n        :target: https://linna.readthedocs.io/en/latest/?version=latest\n        :alt: Documentation Status\n        \n.. image:: https://img.shields.io/badge/arXiv-2003.05583-blue.svg\n        :target: https://arxiv.org/abs/2203.05583\n\n**Linna (Likelihood Inference Neural Network Accelerator) is a tool to accelerate Bayesian posterior inferences using artificial neural networks.**\n\n- Linna automatically builds training data, trains the neural network, and produces a Markov chain that samples the posterior.\n- Linna reduces the runtime of survey cosmological analyses of the Dark Energy Survey by a factor of 8-50.\n- Linna is verified to enable accurate and efficient sampling for Vera Rubin Observatory's Legacy Survey of Space and Time (LSST) year ten multi-probe analyses.\n- Linna is explicitly verified for the following three multi-probe analyses:\n    - 3x2pt, a joint analysis of galaxy clustering, galaxy-galaxy lensing, and cosmic shear.\n    - 4x2pt+N, a joint analysis of cluster--galaxy cross correlations, cluster lensing, cluster clustering, and cluster abundances.\n    - 6x2pt+N, a joint analysis of data vectors in 3x2pt and 4x2pt+N.\n\n\n\nDocumentation\n-------------\nRead the docs at https://linna.readthedocs.io/en/latest/readme.html#documentation\n\nInstallation\n-------------\n\n::\n\n    git clone https://github.com/chto/linna.git\n    cd linna \n    python setup.py install\n\nAttribution\n-----------\nPlease cite the paper below if you find LINNA useful:\n::\n\n    @article{linna2022,\n    author = {Chun-Hao To and Eduardo Rozo and Elisabeth Krause and Hao-Yi Wu and Risa H. Wechsler and Andrés N. Salcedo},\n    title = {LINNA: Likelihood Inference Neural Network Accelerator},\n    year = {2022},\n    journal={arXiv preprint arXiv:2203.05583}\n    }\n\n\n\nExample\n-------\nFor example, if you want to sample a 33 dimensional gaussian spaces, you can do \n\n.. code-block:: python\n \n    import numpy as np\n    import matplotlib.pyplot as plt \n    from linna.main import ml_sampler\n    from linna.util import *\n    #Define gaussian \n    ndim = 33\n    init =  np.random.uniform(size=ndim)\n    means = np.random.uniform(size=ndim)\n    cov = np.diag(0.1*np.random.uniform(size=ndim))\n    priors = []\n    for i in range(ndim):\n        priors.append({\n            'param': 'test_{0}'.format(i),\n            'dist': 'flat',\n            'arg1': -5.,\n            'arg2': 5.\n        })\n    def theory(x, outdirs):\n        x_new = deepcopy(x[1])\n        return x_new\n    #LINNA\n    nwalkers = 4 #Number of mcmc walker\n    pool = None\n    outdir = os.path.abspath(os.getcwd())+\"/out/2dgaussian/\"\n    chain, logprob = ml_sampler(outdir, theory, priors, means, cov, init, pool, nwalkers, gpunode=None, nepoch=101)\n    \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchto%2Flinna","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchto%2Flinna","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchto%2Flinna/lists"}