Skip to content

Commit

Permalink
Merge branch 'main' into RestrictWeightShape
Browse files Browse the repository at this point in the history
  • Loading branch information
Mystic-Slice authored Jan 27, 2023
2 parents 3fd0435 + 62410e7 commit ba3cb59
Show file tree
Hide file tree
Showing 49 changed files with 4,053 additions and 308 deletions.
2 changes: 1 addition & 1 deletion .github/pytorch-release-versions/pytorch-latest.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.12.1
1.13.1
44 changes: 24 additions & 20 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,38 @@ categories:
- title: '🐛 Bug Fixes'
labels:
- 'bug :bug:'
- title: '🧹 Maintenance'
label: 'chore'
- title: '📜 Documentation'
label: 'documentation :book:'
- title: '🧪 Testing'
label: 'testing'
- title: '💯 Benchmarking'
label: 'benchmarking'
- title: 'Linear Algebra'
label: 'linalg'
- title: 'DNDarray'
label: 'dndarray'
- title: 'Arithmetic'
label: 'arithmetic'
- title: 'Random'
label: 'random'
- title: 'Logical'
label: 'logical'
- title: 'Manipulation'
label: 'manipulation'
- title: 'Array API'
label: 'array API'
- title: 'Communication'
labels:
- 'io'
- 'I/O'
- 'communication'
- title: 'DNDarray'
label: 'dndarray'
- title: 'Linear Algebra'
label: 'linalg'
- title: 'Logical'
label: 'logical'
- title: 'Manipulations'
label: 'manipulation'
- title: 'Random'
label: 'random'
- title: 'Sparse'
label: 'sparse'
- title: 'Google Summer of Code 2022'
label: 'GSoC22'
- title: 'Array API'
label: 'array API'
- title: '💯 Benchmarking'
label: 'benchmarking'
- title: '📜 Documentation'
label: 'documentation :book:'
- title: '🧹 Maintenance'
label: 'chore'
- title: '🧪 Testing'
label: 'testing'

change-template: '- #$NUMBER $TITLE (by @$AUTHOR)'
categorie-template: '### $TITLE'
exclude-labels:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/changelog-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
- name: Commit updated CHANGELOG
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
branch: release/1.2.x
commit_message: Update CHANGELOG
file_pattern: CHANGELOG.md
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- 'torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2'
- 'torch==1.8.1+cpu torchvision==0.9.1+cpu torchaudio==0.8.1'
- 'torch==1.9.1+cpu torchvision==0.10.1+cpu torchaudio==0.9.1'
- 'torch==1.12.0+cpu torchvision==0.13.0+cpu torchaudio==0.12.0'
- 'torch==1.12.1+cpu torchvision==0.13.1+cpu torchaudio==0.12.1'
exclude:
- py-version: 3.9
pytorch-version: 'torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2'
Expand All @@ -30,13 +30,13 @@ jobs:
name: Python ${{ matrix.py-version }} with ${{ matrix.pytorch-version }}; options ${{ matrix.install-options }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup MPI
uses: mpi4py/setup-mpi@v1
with:
mpi: ${{ matrix.mpi }}
- name: Use Python ${{ matrix.py-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py-version }}
architecture: x64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci_cpu.yml → .github/workflows/ci_cb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
- name: Mirror + trigger CI
uses: SvanBoxel/gitlab-mirror-and-ci-action@master
with:
args: "https://gitlab.hzdr.de/haf/heat"
args: "https://codebase.helmholtz.cloud/haf/heat"
env:
FORCE_PUSH: "true"
GITLAB_HOSTNAME: "gitlab.hzdr.de"
GITLAB_HOSTNAME: "codebase.helmholtz.cloud"
GITLAB_USERNAME: ""
GITLAB_PASSWORD: ${{ secrets.GITLAB_TOKEN_1 }}
GITLAB_PROJECT_ID: "845"
Expand Down
77 changes: 9 additions & 68 deletions .github/workflows/codesee-arch-diagram.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,22 @@
# This workflow was added by CodeSee. Learn more at https://codesee.io/
# This is v2.0 of this workflow file
on:
push:
branches:
- main
pull_request_target:
types: [opened, synchronize, reopened]

name: CodeSee Map
name: CodeSee

permissions: read-all

jobs:
test_map_action:
codesee:
runs-on: ubuntu-latest
continue-on-error: true
name: Run CodeSee Map Analysis
name: Analyze the repo with CodeSee
steps:
- name: checkout
id: checkout
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

# codesee-detect-languages has an output with id languages.
- name: Detect Languages
id: detect-languages
uses: Codesee-io/codesee-detect-languages-action@latest

- name: Configure JDK 16
uses: actions/setup-java@v2
if: ${{ fromJSON(steps.detect-languages.outputs.languages).java }}
with:
java-version: '16'
distribution: 'zulu'

# CodeSee Maps Go support uses a static binary so there's no setup step required.

- name: Configure Node.js 14
uses: actions/setup-node@v2
if: ${{ fromJSON(steps.detect-languages.outputs.languages).javascript }}
with:
node-version: '14'

- name: Configure Python 3.x
uses: actions/setup-python@v2
if: ${{ fromJSON(steps.detect-languages.outputs.languages).python }}
with:
python-version: '3.10'
architecture: 'x64'

- name: Configure Ruby '3.x'
uses: ruby/setup-ruby@v1
if: ${{ fromJSON(steps.detect-languages.outputs.languages).ruby }}
with:
ruby-version: '3.0'

# CodeSee Maps Rust support uses a static binary so there's no setup step required.

- name: Generate Map
id: generate-map
uses: Codesee-io/codesee-map-action@latest
with:
step: map
github_ref: ${{ github.ref }}
languages: ${{ steps.detect-languages.outputs.languages }}

- name: Upload Map
id: upload-map
uses: Codesee-io/codesee-map-action@latest
with:
step: mapUpload
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }}

- name: Insights
id: insights
uses: Codesee-io/codesee-map-action@latest
- uses: Codesee-io/codesee-action@v2
with:
step: insights
api_token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
github_ref: ${{ github.ref }}
codesee-token: ${{ secrets.CODESEE_ARCH_DIAG_API_TOKEN }}
19 changes: 13 additions & 6 deletions .github/workflows/latest-pytorch-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ on:
paths:
- '.github/pytorch-release-versions/*'
env:
previous_pytorch: $(grep 'torch>=' setup.py | awk -F '<=' '{print $2}' | tr -d '",')
previous_pytorch: $(grep 'torch>=' setup.py | awk -F '<' '{print $2}' | tr -d '",')
new_pytorch: $(<.github/pytorch-release-versions/pytorch-latest.txt)
new_major: $(<.github/pytorch-release-versions/pytorch-latest.txt | cut -d'.' -f1)
new_minor: $(<.github/pytorch-release-versions/pytorch-latest.txt | cut -d'.' -f2)
new_patch: $(<.github/pytorch-release-versions/pytorch-latest.txt | cut -d'.' -f3)
permissions:
contents: write
issues: write
Expand Down Expand Up @@ -34,12 +37,16 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: 'release/1.2.x'
- name: Increment patch
run: |
echo "new_setup_patch=$((${{ env.new_patch }}+1))" >> $GITHUB_ENV
- name: Define version string
run: |
echo "new_setup_pytorch=$("${{ env.new_major }}"."${{ env.new_minor }}"."${{ env.new_setup_patch }}")" >> $GITHUB_ENV
- name: Update setup.py
run: |
echo ${{ env.previous_pytorch }}
echo ${{ env.new_pytorch }}
sed -i '/torch>=/ s/'"${{ env.previous_pytorch }}"'/'"${{ env.new_pytorch }}"'/g' setup.py
sed -i 's/'"${{ env.previous_pytorch }}"'/'"${{ env.new_pytorch }}"'/g' .github/pytorch-release-versions/pytorch-latest.txt
echo ${{ env.new_setup_pytorch }}
sed -i '/torch>=/ s/'"${{ env.previous_pytorch }}"'/'"${{ env.new_setup_pytorch }}"'/g' setup.py
- name: Define env variable
run: |
echo "new=$(<.github/pytorch-release-versions/pytorch-latest.txt)" >> $GITHUB_ENV
Expand All @@ -56,4 +63,4 @@ jobs:
Issue/s resolved: #${{ steps.create-issue.outputs.number }}
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
reviewers: ClaudiaComito, mtar, coquelin77, JuanPedroGHM
reviewers: ClaudiaComito, mtar, JuanPedroGHM
2 changes: 1 addition & 1 deletion .github/workflows/pytorch-latest-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Get latest PyTorch release version
on:
schedule:
- cron: '25 14 * * 2'
- cron: '0 3 * * 1,4'
permissions:
contents: write
jobs:
Expand Down
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
test:
image: nvidia/cuda:11.6.2-runtime-ubuntu20.04
image: nvidia/cuda:11.7.1-runtime-ubuntu22.04
tags:
- cuda
- x86_64
Expand All @@ -9,7 +9,7 @@ test:
- DEBIAN_FRONTEND=noninteractive apt -y install libopenmpi-dev openmpi-bin openmpi-doc
- apt -y install libhdf5-openmpi-dev libpnetcdf-dev
- pip install pytest coverage
- pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
- pip3 install torch torchvision torchaudio
- pip install .[hdf5,netcdf]
- COVERAGE_FILE=report/cov/coverage1 HEAT_TEST_USE_DEVICE=cpu mpirun --allow-run-as-root -n 1 coverage run --source=heat --parallel-mode -m pytest --junitxml=report/test/report1.xml heat/
- COVERAGE_FILE=report/cov/coverage2 HEAT_TEST_USE_DEVICE=gpu mpirun --allow-run-as-root -n 3 coverage run --source=heat --parallel-mode -m pytest --junitxml=report/test/report3.xml heat/
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ repos:
- id: check-added-large-files
- id: flake8
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1 # pick a git hash / tag to point to
rev: 6.3.0 # pick a git hash / tag to point to
hooks:
- id: pydocstyle
exclude: 'tests|benchmarks|examples|scripts|setup.py' #|heat/utils/data/mnist.py|heat/utils/data/_utils.py ?
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# v1.2.1

## Changes

- #1048 Support PyTorch 1.13.0 on branch release/1.2.x (by @github-actions)

## 🐛 Bug Fixes

- #1038 Lanczos decomposition `linalg.solver.lanczos`: Support double precision, complex data types (by @ClaudiaComito)
- #1034 `ht.array`, closed loophole allowing `DNDarray` construction with incompatible shapes of local arrays (by @Mystic-Slice)

## Linear Algebra

- #1038 Lanczos decomposition `linalg.solver.lanczos`: Support double precision, complex data types (by @ClaudiaComito)

## 🧪 Testing

- #1025 mirror repository on gitlab + ci (by @mtar)
- #1014 fix: set cuda rng state on gpu tests for test_random.py (by @JuanPedroGHM)

# v1.2.0

Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ Heat is a distributed tensor framework for high performance data analytics.

Project Status
--------------
[![Mirror and run GitLab CI](https://github.com/helmholtz-analytics/heat/actions/workflows/ci_cpu.yml/badge.svg)](https://github.com/helmholtz-analytics/heat/actions/workflows/ci_cpu.yml)
[![Mirror and run GitLab CI](https://github.com/helmholtz-analytics/heat/actions/workflows/ci_cb.yml/badge.svg)](https://github.com/helmholtz-analytics/heat/actions/workflows/ci_cb.yml)
[![Documentation Status](https://readthedocs.org/projects/heat/badge/?version=latest)](https://heat.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/helmholtz-analytics/heat/branch/main/graph/badge.svg)](https://codecov.io/gh/helmholtz-analytics/heat)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![license: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://pepy.tech/badge/heat)](https://pepy.tech/project/heat)

NEW!
--------------
- [Quick Start](quick_start.md) for new users and contributors (Jan 14, 2023)



Goals
-----

Expand Down Expand Up @@ -43,7 +49,9 @@ Features
Getting Started
---------------

Check out our Jupyter Notebook [tutorial](https://github.com/helmholtz-analytics/heat/blob/main/scripts/tutorial.ipynb)
TL;DR: [Quick Start](quick_start.md)

Check out our Jupyter Notebook [tutorial]((https://github.com/helmholtz-analytics/heat/blob/main/scripts/)tutorial.ipynb)
right here on Github or in the /scripts directory.

The complete documentation of the latest version is always deployed on
Expand Down Expand Up @@ -71,6 +79,8 @@ or automatically using the setup.py.
Installation
------------

TL;DR: [Quick Start](quick_start.md)

Tagged releases are made available on the
[Python Package Index (PyPI)](https://pypi.org/project/heat/). You can typically
install the latest version with
Expand All @@ -87,6 +97,7 @@ More information can be found [here](https://pytorch.org/get-started/locally/).

Hacking
-------
TL;DR: [Quick Start](quick_start.md)

If you want to work with the development version, you can check out the sources using

Expand Down
1 change: 1 addition & 0 deletions heat/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
from . import nn
from . import optim
from . import regression
from . import sparse
from . import spatial
from . import utils
4 changes: 1 addition & 3 deletions heat/core/_operations.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""
Generalized MPI operations. i.e. element-wise binary operations
"""
"""Generalized operations for DNDarray"""

import builtins
import numpy as np
Expand Down
Loading

0 comments on commit ba3cb59

Please sign in to comment.