Skip to content

Commit

Permalink
Merge pull request #54 from mhubii/main
Browse files Browse the repository at this point in the history
Linting + Badge
  • Loading branch information
theo-barfoot authored Mar 12, 2024
2 parents fbd2cd2 + 000ef32 commit 6083443
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Sparsity-preserving gradient utility tools for PyTorch
[![Python tests](https://github.com/cai4cai/torchsparsegradutils/actions/workflows/python-package.yml/badge.svg)](https://github.com/cai4cai/torchsparsegradutils/actions/workflows/python-package.yml) ![License](https://img.shields.io/github/license/cai4cai/torchsparsegradutils) ![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)

A collection of utility functions to work with PyTorch sparse tensors. This is work-in-progress, here be dragons.

Currenly available features with backprop include:
Expand Down
1 change: 1 addition & 0 deletions torchsparsegradutils/utils/lsmr.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Copyright (C) 2010 David Fong and Michael Saunders
"""

import torch


Expand Down
2 changes: 1 addition & 1 deletion torchsparsegradutils/utils/random_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
TODO: This code needs reformatting into just rand_sparse and rand_sparse_tri
TODO: Add support for non-strict triangular matrices
"""
import warnings

import torch
import random
from torchsparsegradutils.utils.utils import convert_coo_to_csr_indices_values
Expand Down

0 comments on commit 6083443

Please sign in to comment.