Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Sep 10, 2023
1 parent 80a41dd commit c5bdb2e
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ repos:
rev: 23.7.0
hooks:
- id: black
exclude: ^(scripts/|experiment/)
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
exclude: ^(scripts/|experiment/)
args: ["--profile", "black"]
# - repo: https://github.com/pycqa/flake8
# rev: 5.0.4
Expand Down
3 changes: 2 additions & 1 deletion neuralprocesses/data/antarctica.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import netCDF4 as nc
import numpy as np
import pandas as pd
import torch
from lab import B
from plum import convert
from wbml.data.eeg import load_full as load_eeg

import torch

from ..aggregate import Aggregate, AggregateInput
from ..dist import AbstractDistribution, UniformContinuous, UniformDiscrete
from .data import DataGenerator, apply_task
Expand Down
2 changes: 1 addition & 1 deletion neuralprocesses/tensorflow/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

import lab.tensorflow as B
import numpy as np
import tensorflow as tf
from plum import convert

import neuralprocesses as nps
import tensorflow as tf

from .. import _dispatch
from ..util import compress_batch_dimensions, is_framework_module
Expand Down
2 changes: 1 addition & 1 deletion neuralprocesses/torch/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

import lab.torch as B
import numpy as np
import torch
from plum import convert
from wbml.util import inv_perm

import neuralprocesses as nps
import torch

from .. import _dispatch
from ..util import is_framework_module
Expand Down
2 changes: 1 addition & 1 deletion tests/gnp/gnp.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import lab.torch as B
import pytest
import torch

import neuralprocesses.gnp as gnp
import torch

# noinspection PyUnresolvedReferences
from .util import context_set, target_set
Expand Down
1 change: 1 addition & 0 deletions tests/gnp/util.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import lab.torch as B
import numpy.testing
import pytest

import torch

__all__ = ["approx", "context_set", "target_set"]
Expand Down
4 changes: 2 additions & 2 deletions tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

import lab as B
import pytest
import tensorflow as tf
import torch
from numpy.testing import assert_allclose
from plum import Dispatcher

import neuralprocesses
import tensorflow as tf
import torch

__all__ = ["approx", "nps", "generate_data", "remote_xfail", "remote_skip"]

Expand Down
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import warnings
from functools import partial

import experiment as exp
import lab as B
import numpy as np
import torch
import wbml.out as out
from matrix.util import ToDenseWarning
from wbml.experiment import WorkingDirectory

import experiment as exp
import neuralprocesses.torch as nps
import torch

__all__ = ["main"]

Expand Down

0 comments on commit c5bdb2e

Please sign in to comment.