Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Checks

on:
push:
branches:
- main
pull_request: {}

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --progress-bar off -U .[checking]
pre-commit install
- name: Run checks
run: pre-commit run --all-files
3 changes: 1 addition & 2 deletions ifbo/bar_distribution.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import logging
from typing import Any

import torch
from torch import nn

import logging


class BarDistribution(nn.Module):
def __init__(
Expand Down
2 changes: 0 additions & 2 deletions ifbo/decoders.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import random

import torch
from torch import nn

Expand Down
2 changes: 1 addition & 1 deletion ifbo/priors/ftpfn_prior.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ def __init__(self, in_dim: int, out_dim: int) -> None:
in_dim - 2, out_dim
)

def forward(self, *x, **kwargs) -> torch.Tensor:
def forward(self, x: torch.Tensor, **kwargs: Any) -> torch.Tensor:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*x has to be a tuple here; otherwise, the line below will raise an exception.

x = torch.cat(x, dim=-1)
out = (
self.epoch_enc(self.normalizer(x[..., 1:2]))
Expand Down