Skip to content

Remove TF1 + TF2 #120

New issue

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

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

Already on GitHub? # to your account

Merged
merged 5 commits into from
Jan 28, 2022
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# Fast and scalable fitting of over-determined generalized-linear models (GLMs)

batchglm was developed in the context of [diffxpy](https://github.com/theislab/diffxpy) to allow fast model fitting for differential expression analysis for single-cell RNA-seq data. However, one can use batchglm or its concepts in other scenarios where over-determined GLMs are encountered. batchglm is based on TensorFlow

batchglm was developed in the context of [diffxpy](https://github.com/theislab/diffxpy) to allow fast model fitting for differential expression analysis for single-cell RNA-seq data. However, one can use batchglm or its concepts in other scenarios where over-determined GLMs are encountered.
<!--
# Installation
1. Install [tensorflow](https://www.tensorflow.org/install/), see below. Please use the pip installation if you are unsure.
2. Clone the GitHub repository of batchglm.
Expand All @@ -22,4 +22,4 @@ You can install [tensorflow](https://www.tensorflow.org/install/) via pip or via
`pip install tensorflow-gpu`

### Hardware-optimized tensorflow installation (compiling from source)
Please refer to https://www.tensorflow.org/install/.
Please refer to https://www.tensorflow.org/install/. -->
13 changes: 0 additions & 13 deletions batchglm/api/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
from . import numpy
try:
import tensorflow as tf
if tf.__version__.split(".")[0] == "1":
from . import tf1
else:
tf1 = None
if tf.__version__.split(".")[0] == "2":
from . import tf2
else:
tf2 = None
except ImportError:
tf1 = None
tf2 = None
3 changes: 0 additions & 3 deletions batchglm/api/models/tf1/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions batchglm/api/models/tf1/glm_beta.py

This file was deleted.

2 changes: 0 additions & 2 deletions batchglm/api/models/tf1/glm_nb.py

This file was deleted.

2 changes: 0 additions & 2 deletions batchglm/api/models/tf1/glm_norm.py

This file was deleted.

3 changes: 0 additions & 3 deletions batchglm/api/models/tf2/__init__.py

This file was deleted.

2 changes: 0 additions & 2 deletions batchglm/api/models/tf2/glm_beta.py

This file was deleted.

2 changes: 0 additions & 2 deletions batchglm/api/models/tf2/glm_nb.py

This file was deleted.

2 changes: 0 additions & 2 deletions batchglm/api/models/tf2/glm_norm.py

This file was deleted.

23 changes: 1 addition & 22 deletions batchglm/pkg_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,4 @@
XTOL_BY_FEATURE_LOC = 1e-8
XTOL_BY_FEATURE_SCALE = 1e-6
GTOL_BY_FEATURE_LOC = 1e-8
GTOL_BY_FEATURE_SCALE = 1e-8

try:
import tensorflow as tf

TF_NUM_THREADS = int(os.environ.get('TF_NUM_THREADS', 0))
TF_LOOP_PARALLEL_ITERATIONS = int(os.environ.get('TF_LOOP_PARALLEL_ITERATIONS', 10))

TF_CONFIG_PROTO = tf.compat.v1.ConfigProto()
TF_CONFIG_PROTO.allow_soft_placement = True
TF_CONFIG_PROTO.log_device_placement = False
TF_CONFIG_PROTO.gpu_options.allow_growth = True
TF_CONFIG_PROTO.graph_options.optimizer_options.global_jit_level = tf.compat.v1.OptimizerOptions.ON_1

TF_CONFIG_PROTO.inter_op_parallelism_threads = TF_NUM_THREADS
TF_CONFIG_PROTO.intra_op_parallelism_threads = TF_NUM_THREADS

if TF_NUM_THREADS == 0:
TF_NUM_THREADS = multiprocessing.cpu_count()

except ImportError:
tf = None
GTOL_BY_FEATURE_SCALE = 1e-8
92 changes: 0 additions & 92 deletions batchglm/train/tf1/README.md

This file was deleted.

Empty file removed batchglm/train/tf1/__init__.py
Empty file.
3 changes: 0 additions & 3 deletions batchglm/train/tf1/base/__init__.py

This file was deleted.

Loading