{"id":19505408,"url":"https://github.com/n3pdf/vegasflow","last_synced_at":"2025-04-09T16:06:00.897Z","repository":{"id":41532801,"uuid":"226363558","full_name":"N3PDF/vegasflow","owner":"N3PDF","description":"VegasFlow: accelerating Monte Carlo simulation across multiple hardware platforms","archived":false,"fork":false,"pushed_at":"2025-01-30T18:21:39.000Z","size":8963,"stargazers_count":35,"open_issues_count":6,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T16:05:56.001Z","etag":null,"topics":["efficiency","gpu-acceleration","machine-learning","monte-carlo","monte-carlo-integration","tensorflow"],"latest_commit_sha":null,"homepage":"https://vegasflow.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/N3PDF.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-06T16:00:55.000Z","updated_at":"2025-01-30T08:04:48.000Z","dependencies_parsed_at":"2025-03-26T07:07:07.376Z","dependency_job_id":"aa1e8a85-26ee-4aeb-a661-c5d456566f2e","html_url":"https://github.com/N3PDF/vegasflow","commit_stats":{"total_commits":309,"total_committers":7,"mean_commits":"44.142857142857146","dds":0.4142394822006472,"last_synced_commit":"2f86026032002b8252b97d33c1a6da96783992a7"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fvegasflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fvegasflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fvegasflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N3PDF%2Fvegasflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/N3PDF","download_url":"https://codeload.github.com/N3PDF/vegasflow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248065289,"owners_count":21041871,"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","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":["efficiency","gpu-acceleration","machine-learning","monte-carlo","monte-carlo-integration","tensorflow"],"created_at":"2024-11-10T22:30:28.648Z","updated_at":"2025-04-09T16:06:00.869Z","avatar_url":"https://github.com/N3PDF.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/226363558.svg)](https://zenodo.org/badge/latestdoi/226363558)\n[![cpc](https://img.shields.io/badge/j.%20Computer%20Physics%20Communication-2020%2F107376-blue)](https://inspirehep.net/literature/1783000)\n\n[![Tests](https://github.com/N3PDF/vegasflow/workflows/pytest/badge.svg)](https://github.com/N3PDF/vegasflow/actions?query=workflow%3A%22pytest%22)\n[![Documentation Status](https://readthedocs.org/projects/vegasflow/badge/?version=latest)](https://vegasflow.readthedocs.io/en/latest/?badge=latest)\n\n\n# VegasFlow\n\nVegasFlow is a Monte Carlo integration library written in Python and based on the [TensorFlow](https://www.tensorflow.org/) framework. It is developed with a focus on speed and efficiency, enabling researchers to perform very expensive calculation as quick and easy as possible.\n\nSome of the key features of VegasFlow are:\n- Integrates efficiently high dimensional functions on single (multi-threading) and multi CPU, single and multi GPU, many GPUs or clusters.\n\n- Compatible with Python, C, C++ or Fortran.\n\n- Implementation of different Monte Carlo algorithms.\n\n## Documentation\nThe documentation for VegasFlow is available at [vegasflow.readthedocs.io](https://vegasflow.readthedocs.io/en/latest).\n\n## Installation\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/vegasflow/badges/installer/conda.svg)](https://anaconda.org/conda-forge/vegasflow)\n[![AUR](https://img.shields.io/badge/aur-vegasflow-blue)](https://aur.archlinux.org/packages/python-vegasflow/)\n\nThe package can be installed with pip:\n```bash\npython3 -m pip install vegasflow\n```\n\nas well as `conda`, from the `conda-forge` channel:\n```bash\nconda install vegasflow -c conda-forge\n```\n\nIf you prefer a manual installation you can clone the repository and run:\n```bash\ngit clone https://github.com/N3PDF/vegasflow.git\ncd vegasflow\npython setup.py install\n```\nor if you are planning to extend or develop the code just use:\n```bash\npython setup.py develop\n```\n\n## Examples\nA number of examples (basic integration, cuda, external tools integration) can be found in the [examples folder](https://github.com/N3PDF/vegasflow/tree/master/examples). A more detailed description can be found in the [documention](https://vegasflow.readthedocs.io/en/latest/examples.html).\n\nBelow you can find a minimal workflow for using the examples provided with VegasFlow:\n\nFirstly, one can install any extra dependencies required by the examples using:\n\n```bash\npip install .[examples]\n```\n\n### Minimal Working Example\n```python\nfrom vegasflow import vegas_wrapper\nimport tensorflow as tf\n\ndef integrand(x, **kwargs):\n    \"\"\" Function:\n       x_{1} * x_{2} ... * x_{n}\n       x: array of dimension (events, n)\n    \"\"\"\n    return tf.reduce_prod(x, axis=1)\n\ndimensions = 8\niterations = 5\nevents_per_iteration = int(1e5)\nvegas_wrapper(integrand, dimensions, iterations, events_per_iteration, compilable=True)\n```\n\nPlease feel free to [open an issue](https://github.com/N3PDF/vegasflow/issues/new) if you would like\nsome specific example or find any problems at all with the code or the documentation.\n\n## Citation policy\n\nIf you use the package please cite the following paper and zenodo references:\n- [https://doi.org/10.5281/zenodo.3691926](https://doi.org/10.5281/zenodo.3691926)\n- [https://arxiv.org/abs/2002.12921](https://arxiv.org/abs/2002.12921)\n\n```bibtex\n    @article{Carrazza:2020rdn,\n        author = \"Carrazza, Stefano and Cruz-Martinez, Juan M.\",\n        title = \"{VegasFlow: accelerating Monte Carlo simulation across multiple hardware platforms}\",\n        eprint = \"2002.12921\",\n        archivePrefix = \"arXiv\",\n        primaryClass = \"physics.comp-ph\",\n        reportNumber = \"TIF-UNIMI-2020-8\",\n        doi = \"10.1016/j.cpc.2020.107376\",\n        journal = \"Comput. Phys. Commun.\",\n        volume = \"254\",\n        pages = \"107376\",\n        year = \"2020\"\n    }\n\n\n    @software{vegasflow_package,\n        author       = {Juan Cruz-Martinez and\n                        Stefano Carrazza},\n        title        = {N3PDF/vegasflow: vegasflow v1.0},\n        month        = feb,\n        year         = 2020,\n        publisher    = {Zenodo},\n        version      = {v1.0},\n        doi          = {10.5281/zenodo.3691926},\n        url          = {https://doi.org/10.5281/zenodo.3691926}\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3pdf%2Fvegasflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn3pdf%2Fvegasflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn3pdf%2Fvegasflow/lists"}