• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alan-turing-institute / deepsensor / 11455483170

22 Oct 2024 07:38AM UTC coverage: 81.626%. Remained the same
11455483170

push

github

davidwilby
update pre-commit ruff version

2048 of 2509 relevant lines covered (81.63%)

1.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.75
/deepsensor/tensorflow/__init__.py
1
# Load the tensorflow extension in lab (only needs to be called once in a session)
2
import lab.tensorflow as B  # noqa
2✔
3

4
# Load the TF extension in nps (to assign to deepsensor backend)
5
import neuralprocesses.tensorflow as nps
2✔
6

7
import tensorflow as tf
2✔
8
import tensorflow.keras
2✔
9

10
# Necessary for dispatching with TF and PyTorch model types when they have not yet been loaded.
11
# See https://beartype.github.io/plum/types.html#moduletype
12
from plum import clear_all_cache
2✔
13

14
clear_all_cache()
2✔
15

16
from .. import *  # noqa
2✔
17

18

19
def convert_to_tensor(arr):
2✔
20
    """Convert `arr` to tensorflow tensor."""
21
    return tf.convert_to_tensor(arr)
×
22

23

24
from .. import config as deepsensor_config
2✔
25
from .. import backend
2✔
26

27
backend.nps = nps
2✔
28
backend.model = tf.keras.Model
2✔
29
backend.convert_to_tensor = convert_to_tensor
2✔
30
backend.str = "tf"
2✔
31

32
B.epsilon = deepsensor_config.DEFAULT_LAB_EPSILON
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc