Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused modules #29

Merged
merged 1 commit into from
Jul 18, 2024
Merged
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
2 changes: 0 additions & 2 deletions astroNN/models/apogee_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
MCDropout,
BoolMask,
StopGrad,
KLDivergenceLayer,
TensorInput,
VAESampling,
)
from astroNN.nn.losses import (
Expand Down
11 changes: 3 additions & 8 deletions astroNN/models/base_bayesian_cnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,35 @@
import time
import warnings
from abc import ABC
from packaging import version

import numpy as np
from tqdm import tqdm
from tensorflow import keras as tfk
from astroNN.config import MAGIC_NUMBER, MULTIPROCESS_FLAG
from astroNN.config import MULTIPROCESS_FLAG
from astroNN.config import _astroNN_MODEL_NAME
from astroNN.datasets import H5Loader
from astroNN.models.base_master_nn import NeuralNetMaster
from astroNN.nn.callbacks import VirutalCSVLogger
from astroNN.nn.layers import FastMCInference
from astroNN.nn.losses import (
mean_absolute_error,
mean_error,
mean_squared_error,
zeros_loss,
)
from astroNN.nn.metrics import categorical_accuracy, binary_accuracy
from astroNN.nn.numpy import sigmoid
from astroNN.nn.utilities import Normalizer
from astroNN.nn.utilities.generator import GeneratorMaster
from astroNN.shared.warnings import deprecated, deprecated_copy_signature
from astroNN.shared.warnings import deprecated_copy_signature
from astroNN.shared.nn_tools import gpu_availability
from astroNN.shared.dict_tools import dict_np_to_dict_list, list_to_dict

from astroNN.nn.losses import (
bayesian_binary_crossentropy_wrapper,
bayesian_binary_crossentropy_var_wrapper,
)
from astroNN.nn.losses import (
bayesian_categorical_crossentropy_wrapper,
bayesian_categorical_crossentropy_var_wrapper,
)
from astroNN.nn.losses import mse_lin_wrapper, mse_var_wrapper
from astroNN.nn.losses import mse_lin_wrapper

from sklearn.model_selection import train_test_split
import tensorflow as tf
Expand Down
6 changes: 1 addition & 5 deletions astroNN/models/base_vae.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@
from astroNN.models.base_master_nn import NeuralNetMaster
from astroNN.nn.callbacks import VirutalCSVLogger
from astroNN.nn.losses import (
mean_squared_error,
mean_error,
mean_absolute_error,
mean_squared_reconstruction_error,
)
from astroNN.nn.utilities import Normalizer
from astroNN.nn.utilities.generator import GeneratorMaster
from astroNN.shared.dict_tools import dict_np_to_dict_list, list_to_dict
from astroNN.shared.warnings import deprecated, deprecated_copy_signature
from astroNN.shared.warnings import deprecated_copy_signature
from sklearn.model_selection import train_test_split
import tensorflow as tf
from tensorflow.python.keras.engine import data_adapter
from tensorflow.python.util import nest

regularizers = tfk.regularizers
ReduceLROnPlateau = tfk.callbacks.ReduceLROnPlateau
Expand Down
1 change: 0 additions & 1 deletion astroNN/nn/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import tensorflow as tf
from tensorflow import keras as tfk
from tensorflow.python.ops.losses import util as tf_losses_util

from astroNN.config import MAGIC_NUMBER
from astroNN.nn import nn_obj_lookup
Expand Down
4 changes: 0 additions & 4 deletions astroNN/nn/metrics.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# ---------------------------------------------------------------#
# astroNN.nn.metrics: metrics
# ---------------------------------------------------------------#
import tensorflow as tf

from astroNN.nn.losses import binary_accuracy, binary_accuracy_from_logits
from astroNN.nn.losses import categorical_accuracy
Expand All @@ -11,10 +10,7 @@
from astroNN.nn.losses import mean_percentage_error
from astroNN.nn.losses import mean_squared_error
from astroNN.nn.losses import mean_squared_logarithmic_error
from astroNN.nn.losses import median
from astroNN.nn.losses import median_absolute_deviation
from astroNN.nn.losses import median_error
from astroNN.nn.losses import mad_std

# Just alias functions
mse = mean_squared_error
Expand Down
2 changes: 1 addition & 1 deletion astroNN/shared/patch_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import logging
import re

from os.path import exists, isfile, abspath
from os.path import exists, isfile

Check warning on line 10 in astroNN/shared/patch_util.py

View check run for this annotation

Codecov / codecov/patch

astroNN/shared/patch_util.py#L10

Added line #L10 was not covered by tests
import os
import shutil
import itertools
Expand Down
Loading