From 0260e626db1973d867391d791a34b64a830b08b0 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 19 Dec 2024 15:22:59 +0000 Subject: [PATCH] dataset_mono: address ruff linting errors --- aimodel/src/lib/dataset/dataset_mono.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/aimodel/src/lib/dataset/dataset_mono.py b/aimodel/src/lib/dataset/dataset_mono.py index cd4043c..ec07d33 100644 --- a/aimodel/src/lib/dataset/dataset_mono.py +++ b/aimodel/src/lib/dataset/dataset_mono.py @@ -1,6 +1,5 @@ import os import math -import json from loguru import logger @@ -8,7 +7,6 @@ import tensorflow as tf from lib.dataset.read_metadata import read_metadata -from ..io.readfile import readfile from .parse_heightmap import parse_heightmap from .primitives.shuffle import shuffle from .primitives.remove_isolated_pixels import remove_isolated_pixels @@ -142,7 +140,7 @@ def make_dataset(filepaths, compression_type="GZIP", parallel_reads_multiplier=1 dataset = dataset.shuffle(shuffle_buffer_size) dataset = dataset.map(parse_item(heightmap=heightmap, **kwargs), num_parallel_calls=tf.data.AUTOTUNE) - if batch_size != None: + if batch_size is not None: dataset = dataset.batch(batch_size, drop_remainder=True) if prefetch: dataset = dataset.prefetch(0 if "NO_PREFETCH" in os.environ else tf.data.AUTOTUNE)