ml4gw 0.7.2__tar.gz → 0.7.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ml4gw might be problematic. Click here for more details.

Files changed (116) hide show
  1. ml4gw-0.7.4/.coverage +0 -0
  2. ml4gw-0.7.4/.gitattributes +2 -0
  3. ml4gw-0.7.4/.github/workflows/coverage.yaml +31 -0
  4. ml4gw-0.7.4/.github/workflows/docs.yaml +29 -0
  5. ml4gw-0.7.4/.github/workflows/pre-commit.yaml +17 -0
  6. ml4gw-0.7.4/.github/workflows/publish.yaml +27 -0
  7. ml4gw-0.7.4/.github/workflows/unit-tests.yaml +80 -0
  8. ml4gw-0.7.4/.gitignore +3 -0
  9. ml4gw-0.7.4/.pre-commit-config.yaml +23 -0
  10. ml4gw-0.7.4/.readthedocs.yaml +36 -0
  11. ml4gw-0.7.4/CITATION.cff +37 -0
  12. ml4gw-0.7.2/README.md → ml4gw-0.7.4/PKG-INFO +14 -23
  13. ml4gw-0.7.2/PKG-INFO → ml4gw-0.7.4/README.md +0 -42
  14. ml4gw-0.7.4/docs/Makefile +20 -0
  15. ml4gw-0.7.4/docs/conf.py +65 -0
  16. ml4gw-0.7.4/docs/index.rst +50 -0
  17. ml4gw-0.7.4/docs/installation.rst +19 -0
  18. ml4gw-0.7.4/docs/make.bat +35 -0
  19. ml4gw-0.7.4/docs/ml4gw.dataloading.rst +37 -0
  20. ml4gw-0.7.4/docs/ml4gw.nn.autoencoder.rst +45 -0
  21. ml4gw-0.7.4/docs/ml4gw.nn.resnet.rst +29 -0
  22. ml4gw-0.7.4/docs/ml4gw.nn.rst +31 -0
  23. ml4gw-0.7.4/docs/ml4gw.nn.streaming.rst +29 -0
  24. ml4gw-0.7.4/docs/ml4gw.rst +64 -0
  25. ml4gw-0.7.4/docs/ml4gw.transforms.rst +77 -0
  26. ml4gw-0.7.4/docs/ml4gw.waveforms.rst +53 -0
  27. ml4gw-0.7.4/docs/modules.rst +7 -0
  28. ml4gw-0.7.4/docs/requirements.txt +3 -0
  29. ml4gw-0.7.4/examples/README.md +14 -0
  30. ml4gw-0.7.4/examples/ml4gw_tutorial.ipynb +1724 -0
  31. ml4gw-0.7.4/examples/pyproject.toml +21 -0
  32. ml4gw-0.7.4/examples/uv.lock +2521 -0
  33. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/dataloading/chunked_dataset.py +4 -2
  34. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/dataloading/hdf5_dataset.py +1 -0
  35. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/dataloading/in_memory_dataset.py +0 -1
  36. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/distributions.py +6 -3
  37. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/gw.py +2 -2
  38. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/autoencoder/convolutional.py +3 -3
  39. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/resnet/resnet_1d.py +4 -3
  40. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/resnet/resnet_2d.py +4 -3
  41. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/spectral.py +8 -6
  42. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/iirfilter.py +2 -2
  43. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/qtransform.py +9 -8
  44. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/spectrogram.py +3 -1
  45. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/spline_interpolation.py +3 -4
  46. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/whitening.py +1 -1
  47. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/utils/slicing.py +16 -11
  48. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/cbc/phenom_d.py +1 -1
  49. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/cbc/phenom_p.py +2 -2
  50. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/cbc/taylorf2.py +1 -1
  51. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/cbc/utils.py +4 -5
  52. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/conversion.py +11 -9
  53. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/generator.py +45 -32
  54. ml4gw-0.7.4/pyproject.toml +93 -0
  55. ml4gw-0.7.4/tests/conftest.py +200 -0
  56. ml4gw-0.7.4/tests/dataloading/test_chunked_dataset.py +82 -0
  57. ml4gw-0.7.4/tests/dataloading/test_hdf5_dataset.py +188 -0
  58. ml4gw-0.7.4/tests/dataloading/test_in_memory_dataset.py +357 -0
  59. ml4gw-0.7.4/tests/nn/resnet/test_resnet_1d.py +137 -0
  60. ml4gw-0.7.4/tests/nn/resnet/test_resnet_2d.py +138 -0
  61. ml4gw-0.7.4/tests/nn/streaming/test_online_average.py +88 -0
  62. ml4gw-0.7.4/tests/nn/streaming/test_snapshotter.py +120 -0
  63. ml4gw-0.7.4/tests/nn/test_norm.py +75 -0
  64. ml4gw-0.7.4/tests/test_augmentations.py +113 -0
  65. ml4gw-0.7.4/tests/test_distributions.py +90 -0
  66. ml4gw-0.7.4/tests/test_gw.py +436 -0
  67. ml4gw-0.7.4/tests/test_spectral.py +432 -0
  68. ml4gw-0.7.4/tests/transforms/test_iirfilter.py +321 -0
  69. ml4gw-0.7.4/tests/transforms/test_pearson.py +81 -0
  70. ml4gw-0.7.4/tests/transforms/test_qtransform.py +184 -0
  71. ml4gw-0.7.4/tests/transforms/test_scaler.py +123 -0
  72. ml4gw-0.7.4/tests/transforms/test_snr_rescaler.py +86 -0
  73. ml4gw-0.7.4/tests/transforms/test_spectral_transform.py +290 -0
  74. ml4gw-0.7.4/tests/transforms/test_spectrogram.py +109 -0
  75. ml4gw-0.7.4/tests/transforms/test_spline_interpolation.py +101 -0
  76. ml4gw-0.7.4/tests/transforms/test_waveforms.py +101 -0
  77. ml4gw-0.7.4/tests/transforms/test_whitening.py +191 -0
  78. ml4gw-0.7.4/tests/utils/test_slicing.py +334 -0
  79. ml4gw-0.7.4/tests/waveforms/adhoc/test_sine_gaussian.py +100 -0
  80. ml4gw-0.7.4/tests/waveforms/cbc/test_cbc_waveforms.py +480 -0
  81. ml4gw-0.7.4/tests/waveforms/cbc/test_utils.py +115 -0
  82. ml4gw-0.7.4/tests/waveforms/test_conversion.py +65 -0
  83. ml4gw-0.7.4/tests/waveforms/test_generator.py +216 -0
  84. ml4gw-0.7.4/uv.lock +3344 -0
  85. ml4gw-0.7.2/pyproject.toml +0 -93
  86. {ml4gw-0.7.2 → ml4gw-0.7.4}/LICENSE +0 -0
  87. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/__init__.py +0 -0
  88. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/augmentations.py +0 -0
  89. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/constants.py +0 -0
  90. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/dataloading/__init__.py +0 -0
  91. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/__init__.py +0 -0
  92. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/autoencoder/__init__.py +0 -0
  93. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/autoencoder/base.py +0 -0
  94. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/autoencoder/skip_connection.py +0 -0
  95. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/autoencoder/utils.py +0 -0
  96. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/norm.py +0 -0
  97. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/resnet/__init__.py +0 -0
  98. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/streaming/__init__.py +0 -0
  99. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/streaming/online_average.py +0 -0
  100. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/nn/streaming/snapshotter.py +0 -0
  101. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/__init__.py +0 -0
  102. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/pearson.py +0 -0
  103. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/scaler.py +0 -0
  104. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/snr_rescaler.py +0 -0
  105. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/spectral.py +0 -0
  106. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/transform.py +0 -0
  107. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/transforms/waveforms.py +0 -0
  108. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/types.py +0 -0
  109. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/utils/interferometer.py +0 -0
  110. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/__init__.py +0 -0
  111. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/adhoc/__init__.py +0 -0
  112. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/adhoc/ringdown.py +0 -0
  113. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/adhoc/sine_gaussian.py +0 -0
  114. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/cbc/__init__.py +0 -0
  115. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/cbc/coefficients.py +0 -0
  116. {ml4gw-0.7.2 → ml4gw-0.7.4}/ml4gw/waveforms/cbc/phenom_d_data.py +0 -0
ml4gw-0.7.4/.coverage ADDED
Binary file
@@ -0,0 +1,2 @@
1
+ # use lf line endings for all text files
2
+ * text=auto
@@ -0,0 +1,31 @@
1
+ name: Post coverage comment
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: ["unit-tests"]
6
+ types:
7
+ - completed
8
+
9
+ jobs:
10
+ test:
11
+ name: Run tests & display coverage
12
+ runs-on: ubuntu-latest
13
+ if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
14
+ permissions:
15
+ # Gives the action the necessary permissions for publishing new
16
+ # comments in pull requests.
17
+ pull-requests: write
18
+ # Gives the action the necessary permissions for editing existing comments
19
+ contents: write
20
+ # Gives the action the necessary permissions for looking up the
21
+ # workflow that launched this workflow, and download the related
22
+ # artifact that contains the comment to be published
23
+ actions: read
24
+ steps:
25
+ # DO NOT run actions/checkout here, for security reasons
26
+ # For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
27
+ - name: Post comment
28
+ uses: py-cov-action/python-coverage-comment-action@v3
29
+ with:
30
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31
+ GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
@@ -0,0 +1,29 @@
1
+ name: Build and publish docs
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ jobs:
7
+ docs:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v1
11
+ - name: Setup python
12
+ id: setup-python
13
+ uses: actions/setup-python@v5
14
+ with:
15
+ python-version: '3.10'
16
+ - name: Install uv
17
+ uses: astral-sh/setup-uv@v5
18
+ - name: Install and Build Docs
19
+ run: |
20
+ uv sync
21
+ cd docs
22
+ uv run make clean
23
+ uv run make html
24
+ -
25
+ name: Deploy pages
26
+ uses: JamesIves/github-pages-deploy-action@v4.2.5
27
+ with:
28
+ branch: gh-pages
29
+ folder: docs/_build/html
@@ -0,0 +1,17 @@
1
+ name: pre-commit
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ pre-commit:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: actions/setup-python@v2
15
+ with:
16
+ python-version: "3.9"
17
+ - uses: pre-commit/action@v2.0.3
@@ -0,0 +1,27 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ environment: PyPI
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v3
16
+ with:
17
+ enable-cache: true
18
+ cache-dependency-glob: uv.lock
19
+
20
+ - name: Set up Python
21
+ run: uv python install 3.12
22
+
23
+ - name: Build
24
+ run: uv build
25
+
26
+ - name: Publish
27
+ run: uv publish -t ${{ secrets.PYPI_TOKEN }}
@@ -0,0 +1,80 @@
1
+ name: unit-tests
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ['3.9', '3.10', '3.11', '3.12']
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ # set up our environment
20
+ -
21
+ name: Install Python
22
+ uses: actions/setup-python@v2
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ -
26
+ name: Install tox
27
+ run: |
28
+ python -m pip install --upgrade pip
29
+ pip install tox tox-gh-actions
30
+
31
+ # run the library's tests
32
+ -
33
+ name: run tests
34
+ env:
35
+ pyver: ${{ matrix.python-version }}
36
+ COVERAGE_FILE: .coverage.${{ matrix.python-version }}
37
+ run: |
38
+ tox -e py${pyver//./}
39
+
40
+ - name: Store coverage file
41
+ uses: actions/upload-artifact@v4
42
+ with:
43
+ name: coverage-${{ matrix.python-version }}
44
+ path: .coverage.${{ matrix.python-version }}
45
+ include-hidden-files: true
46
+
47
+ coverage:
48
+ name: Coverage
49
+ runs-on: ubuntu-latest
50
+ needs: test
51
+ permissions:
52
+ # Gives the action the necessary permissions for publishing new
53
+ # comments in pull requests.
54
+ pull-requests: write
55
+ # Gives the action the necessary permissions for pushing data to the
56
+ # python-coverage-comment-action branch, and for editing existing
57
+ # comments (to avoid publishing multiple comments in the same PR)
58
+ contents: write
59
+ steps:
60
+ - uses: actions/checkout@v4
61
+
62
+ - uses: actions/download-artifact@v4
63
+ id: download
64
+ with:
65
+ pattern: coverage-*
66
+ merge-multiple: true
67
+
68
+ - name: Coverage comment
69
+ id: coverage_comment
70
+ uses: py-cov-action/python-coverage-comment-action@v3
71
+ with:
72
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73
+ MERGE_COVERAGE_FILES: true
74
+
75
+ - name: Store Pull Request comment to be posted
76
+ uses: actions/upload-artifact@v4
77
+ if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
78
+ with:
79
+ name: python-coverage-comment-action
80
+ path: python-coverage-comment-action.txt
ml4gw-0.7.4/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ **/__pycache__
2
+ **/.ipynb_checkpoints
3
+ **/.tox
@@ -0,0 +1,23 @@
1
+ repos:
2
+ - repo: https://github.com/astral-sh/ruff-pre-commit
3
+ rev: v0.9.6
4
+ hooks:
5
+ - id: ruff
6
+ args: [ --fix ]
7
+ - id: ruff-format
8
+
9
+ - repo: https://github.com/astral-sh/uv-pre-commit
10
+ # uv version
11
+ rev: 0.6.0
12
+ hooks:
13
+ - id: uv-lock
14
+
15
+ - repo: https://github.com/pre-commit/pre-commit-hooks
16
+ rev: v2.3.0
17
+ hooks:
18
+ - id: end-of-file-fixer
19
+
20
+ - repo: https://github.com/dhruvmanila/remove-print-statements
21
+ rev: v0.5.2
22
+ hooks:
23
+ - id: remove-print-statements
@@ -0,0 +1,36 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the OS, Python version and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.10"
13
+
14
+ jobs:
15
+ post_create_environment:
16
+ # Install uv
17
+ - pip install uv
18
+ post_install:
19
+ # Install dependencies
20
+ - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv sync --all-extras
21
+
22
+ # Build documentation in the "docs/" directory with Sphinx
23
+ sphinx:
24
+ configuration: docs/conf.py
25
+
26
+ # Optionally build your docs in additional formats such as PDF and ePub
27
+ # formats:
28
+ # - pdf
29
+ # - epub
30
+
31
+ # Optional but recommended, declare the Python requirements required
32
+ # to build your documentation
33
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
34
+ # python:
35
+ # install:
36
+ # - requirements: docs/requirements.txt
@@ -0,0 +1,37 @@
1
+ # This CITATION.cff file was generated with cffinit.
2
+ # Visit https://bit.ly/cffinit to generate yours today!
3
+
4
+ cff-version: 1.2.0
5
+ title: ml4gw
6
+ message: >-
7
+ If you use this software, please cite it using the
8
+ metadata from this file.
9
+ type: software
10
+ authors:
11
+ - given-names: Ethan
12
+ family-names: Marx
13
+ email: emarx@mit.edu
14
+ affiliation: MIT
15
+ orcid: 'https://orcid.org/0009-0000-4183-7876'
16
+ - given-names: William
17
+ family-names: Benoit
18
+ email: benoi090@umn.edu
19
+ affiliation: University of Minnesota
20
+ orcid: 'https://orcid.org/0000-0003-4750-9413'
21
+ - given-names: Deep
22
+ family-names: Chatterjee
23
+ email: deep1018@mit.edu
24
+ affiliation: MIT
25
+ orcid: 'https://orcid.org/0000-0003-0038-5468'
26
+ - given-names: Ravi
27
+ family-names: Kumar
28
+ email: ravi.kr@iitb.ac.in
29
+ affiliation: Indian Institute of Technology Bombay
30
+ - given-names: Alec
31
+ family-names: Gunny
32
+ repository-code: 'https://github.com/ML4GW/ml4gw'
33
+ abstract: >-
34
+ Torch utilities for doing machine learning in gravitational wave physics
35
+ keywords:
36
+ - Gravitational waves
37
+ - Machine learning
@@ -1,3 +1,17 @@
1
+ Metadata-Version: 2.4
2
+ Name: ml4gw
3
+ Version: 0.7.4
4
+ Summary: Tools for training torch models on gravitational wave data
5
+ Author-email: Ethan Marx <emarx@mit.edu>, Will Benoit <benoi090@umn.edu>, Deep Chatterjee <deep1018@mit.edu>, Alec Gunny <alec.gunny@ligo.org>
6
+ License-File: LICENSE
7
+ Requires-Python: <3.13,>=3.9
8
+ Requires-Dist: jaxtyping<0.3,>=0.2
9
+ Requires-Dist: numpy<2.0.0
10
+ Requires-Dist: scipy<1.15,>=1.9.0
11
+ Requires-Dist: torchaudio~=2.0
12
+ Requires-Dist: torch~=2.0
13
+ Description-Content-Type: text/markdown
14
+
1
15
  # ML4GW
2
16
  ![PyPI - Version](https://img.shields.io/pypi/v/ml4gw)
3
17
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ml4gw)
@@ -25,29 +39,6 @@ To build with a specific version of PyTorch/CUDA, please see the PyTorch install
25
39
  pip install ml4gw torch==2.5.1--extra-index-url=https://download.pytorch.org/whl/cu118
26
40
  ```
27
41
 
28
- ### Poetry installation
29
- `ml4gw` is also fully compatible with use in Poetry, with your `pyproject.toml` set up like
30
-
31
- ```toml
32
- [tool.poetry.dependencies]
33
- python = "^3.9" # python versions 3.9-3.12 are supported
34
- ml4gw = "^0.6"
35
- ```
36
-
37
- To build against a specific PyTorch/CUDA combination, consult the PyTorch installation documentation above and specify the `extra-index-url` via the `tool.poetry.source` table in your `pyproject.toml`. For example, to build against CUDA 11.6, you would do something like:
38
-
39
- ```toml
40
- [tool.poetry.dependencies]
41
- python = "^3.9"
42
- ml4gw = "^0.6"
43
- torch = {version = "^2.0", source = "torch"}
44
-
45
- [[tool.poetry.source]]
46
- name = "torch"
47
- url = "https://download.pytorch.org/whl/cu118"
48
- priority = "explicit"
49
- ```
50
-
51
42
  ## Contributing
52
43
  If you come across errors in the code, have difficulties using this software, or simply find that the current version doesn't cover your use case, please file an issue on our GitHub page, and we'll be happy to offer support.
53
44
  We encourage users who encounter these difficulties to file issues on GitHub, and we'll be happy to offer support to extend our coverage to new or improved functionality.
@@ -1,21 +1,3 @@
1
- Metadata-Version: 2.3
2
- Name: ml4gw
3
- Version: 0.7.2
4
- Summary: Tools for training torch models on gravitational wave data
5
- Author: Alec Gunny
6
- Author-email: alec.gunny@ligo.org
7
- Requires-Python: >=3.9,<3.13
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.9
10
- Classifier: Programming Language :: Python :: 3.10
11
- Classifier: Programming Language :: Python :: 3.11
12
- Classifier: Programming Language :: Python :: 3.12
13
- Requires-Dist: jaxtyping (>=0.2,<0.3)
14
- Requires-Dist: numpy (<2.0.0)
15
- Requires-Dist: torch (>=2.0,<3.0)
16
- Requires-Dist: torchaudio (>=2.0,<3.0)
17
- Description-Content-Type: text/markdown
18
-
19
1
  # ML4GW
20
2
  ![PyPI - Version](https://img.shields.io/pypi/v/ml4gw)
21
3
  ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ml4gw)
@@ -43,29 +25,6 @@ To build with a specific version of PyTorch/CUDA, please see the PyTorch install
43
25
  pip install ml4gw torch==2.5.1--extra-index-url=https://download.pytorch.org/whl/cu118
44
26
  ```
45
27
 
46
- ### Poetry installation
47
- `ml4gw` is also fully compatible with use in Poetry, with your `pyproject.toml` set up like
48
-
49
- ```toml
50
- [tool.poetry.dependencies]
51
- python = "^3.9" # python versions 3.9-3.12 are supported
52
- ml4gw = "^0.6"
53
- ```
54
-
55
- To build against a specific PyTorch/CUDA combination, consult the PyTorch installation documentation above and specify the `extra-index-url` via the `tool.poetry.source` table in your `pyproject.toml`. For example, to build against CUDA 11.6, you would do something like:
56
-
57
- ```toml
58
- [tool.poetry.dependencies]
59
- python = "^3.9"
60
- ml4gw = "^0.6"
61
- torch = {version = "^2.0", source = "torch"}
62
-
63
- [[tool.poetry.source]]
64
- name = "torch"
65
- url = "https://download.pytorch.org/whl/cu118"
66
- priority = "explicit"
67
- ```
68
-
69
28
  ## Contributing
70
29
  If you come across errors in the code, have difficulties using this software, or simply find that the current version doesn't cover your use case, please file an issue on our GitHub page, and we'll be happy to offer support.
71
30
  We encourage users who encounter these difficulties to file issues on GitHub, and we'll be happy to offer support to extend our coverage to new or improved functionality.
@@ -75,4 +34,3 @@ By bringing in new users with new use cases, we hope to develop this library int
75
34
 
76
35
  ## Funding
77
36
  We are grateful for the support of the U.S. National Science Foundation (NSF) Harnessing the Data Revolution (HDR) Institute for <a href="https://a3d3.ai">Accelerating AI Algorithms for Data Driven Discovery (A3D3)</a> under Cooperative Agreement No. <a href="https://www.nsf.gov/awardsearch/showAward?AWD_ID=2117997">PHY-2117997</a>.
78
-
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,65 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # This file only contains a selection of the most common options. For a full
4
+ # list see the documentation:
5
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
6
+
7
+ # -- Path setup --------------------------------------------------------------
8
+
9
+ # If extensions (or modules to document with autodoc) are in another directory,
10
+ # add these directories to sys.path here. If the directory is relative to the
11
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
12
+ #
13
+ import os
14
+ import sys
15
+
16
+ sys.path.insert(0, os.path.abspath("../"))
17
+
18
+
19
+ # -- Project information -----------------------------------------------------
20
+
21
+ project = "ml4gw"
22
+ copyright = "2024, Alec Gunny, Ethan Marx, William Benoit, Deep Chatterjee"
23
+ author = "Alec Gunny, Ethan Marx, William Benoit, Deep Chatterjee"
24
+
25
+
26
+ # -- General configuration ---------------------------------------------------
27
+
28
+ # Add any Sphinx extension module names here, as strings. They can be
29
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
30
+ # ones.
31
+ extensions = [
32
+ "sphinx.ext.autodoc",
33
+ "sphinx.ext.napoleon",
34
+ "sphinx_autodoc_typehints",
35
+ "sphinx.ext.githubpages",
36
+ ]
37
+
38
+
39
+ # Add any paths that contain templates here, relative to this directory.
40
+ templates_path = ["_templates"]
41
+
42
+ # The language for content autogenerated by Sphinx. Refer to documentation
43
+ # for a list of supported languages.
44
+ #
45
+ # This is also used if you do content translation via gettext catalogs.
46
+ # Usually you set "language" from the command line for these cases.
47
+ language = "python"
48
+
49
+ # List of patterns, relative to source directory, that match files and
50
+ # directories to ignore when looking for source files.
51
+ # This pattern also affects html_static_path and html_extra_path.
52
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
53
+
54
+
55
+ # -- Options for HTML output -------------------------------------------------
56
+
57
+ # The theme to use for HTML and HTML Help pages. See the documentation for
58
+ # a list of builtin themes.
59
+ #
60
+ html_theme = "sphinx_rtd_theme"
61
+
62
+ # Add any paths that contain custom static files (such as style sheets) here,
63
+ # relative to this directory. They are copied after the builtin static files,
64
+ # so a file named "default.css" will overwrite the builtin "default.css".
65
+ html_static_path = ["_static"]
@@ -0,0 +1,50 @@
1
+ .. ml4gw documentation master file, created by
2
+ sphinx-quickstart on Mon Feb 19 09:02:43 2024.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ Welcome to ml4gw's documentation!
7
+ =================================
8
+
9
+ .. note::
10
+ This documentation is a work in progress!
11
+ If you have any questions or suggestions, please feel free to reach out to ml4gw@ligo.mit.edu
12
+
13
+ ml4gw
14
+ =====
15
+ ml4gw is a library of `pytorch <https://pytorch.org/docs/stable/index.html>`_ utilities
16
+ for training neural networks in service of gravitational wave physics applications.
17
+
18
+ The code can be found on github at `<https://github.com/ml4gw/ml4gw>`_
19
+
20
+
21
+ .. toctree::
22
+ :maxdepth: 1
23
+ :caption: Contents:
24
+
25
+ installation
26
+ modules
27
+
28
+ Projects
29
+ ========
30
+ Currently, the following projects are using ml4gw to support their research:
31
+
32
+ * `Aframe <https://github.com/ml4gw/aframev2>`_ - Gravitational wave detection of binary black hole mergers
33
+ * `PE <https://github.com/ml4gw/aframev2>`_ - Parameter estimation of gravitational wave signals
34
+
35
+
36
+ Development
37
+ ===========
38
+ As this library is still very much a work in progress,
39
+ we anticipate that novel use cases will encounter errors stemming from a lack of robustness.
40
+ We encourage users who encounter these difficulties to file issues on GitHub, and we'll be happy to offer
41
+ support to extend our coverage to new or improved functionality.
42
+ We also strongly encourage ML users in the GW physics space to try their hand at working on these issues and joining on as collaborators!
43
+ For more information about how to get involved, feel free to reach out to ml4gw@ligo.mit.edu.
44
+ By bringing in new users with new use cases, we hope to develop this library into a truly general-purpose tool which makes
45
+ DL more accessible for gravitational wave physicists everywhere.
46
+
47
+
48
+ Funding
49
+ =======
50
+ We are grateful for the support of the U.S. National Science Foundation (NSF) Harnessing the Data Revolution (HDR) Institute for `Accelerating AI Algorithms for Data Driven Discovery (A3D3) <https://a3d3.ai">`_ under Cooperative Agreement No. `PHY-2117997 <https://www.nsf.gov/awardsearch/showAward?AWD_ID=2117997>`_.
@@ -0,0 +1,19 @@
1
+ ============
2
+ Installation
3
+ ============
4
+
5
+ Pip
6
+ ===
7
+ ml4gw is installable with pip:
8
+
9
+ .. code-block:: console
10
+
11
+ $ pip install ml4gw
12
+
13
+
14
+ To build with a specific version of PyTorch/CUDA, please see the PyTorch installation `instructions <https://pytorch.org/get-started/previous-versions/>`_
15
+ to see how to specify the desired torch version and :code:`--extra-index-url` flag. For example, to install with PyTorch 1.12 and CUDA 11.6, use the following command:
16
+
17
+ .. code-block:: console
18
+
19
+ $ pip install ml4gw torch==1.12.0 --extra-index-url=https://download.pytorch.org/whl/cu116
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,37 @@
1
+ ml4gw.dataloading package
2
+ =========================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ ml4gw.dataloading.chunked\_dataset module
8
+ -----------------------------------------
9
+
10
+ .. automodule:: ml4gw.dataloading.chunked_dataset
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ ml4gw.dataloading.hdf5\_dataset module
16
+ --------------------------------------
17
+
18
+ .. automodule:: ml4gw.dataloading.hdf5_dataset
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ ml4gw.dataloading.in\_memory\_dataset module
24
+ --------------------------------------------
25
+
26
+ .. automodule:: ml4gw.dataloading.in_memory_dataset
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ Module contents
32
+ ---------------
33
+
34
+ .. automodule:: ml4gw.dataloading
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
@@ -0,0 +1,45 @@
1
+ ml4gw.nn.autoencoder package
2
+ ============================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ ml4gw.nn.autoencoder.base module
8
+ --------------------------------
9
+
10
+ .. automodule:: ml4gw.nn.autoencoder.base
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ ml4gw.nn.autoencoder.convolutional module
16
+ -----------------------------------------
17
+
18
+ .. automodule:: ml4gw.nn.autoencoder.convolutional
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ ml4gw.nn.autoencoder.skip\_connection module
24
+ --------------------------------------------
25
+
26
+ .. automodule:: ml4gw.nn.autoencoder.skip_connection
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ ml4gw.nn.autoencoder.utils module
32
+ ---------------------------------
33
+
34
+ .. automodule:: ml4gw.nn.autoencoder.utils
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ Module contents
40
+ ---------------
41
+
42
+ .. automodule:: ml4gw.nn.autoencoder
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance: