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

Project dependencies may have API risk issues #89

Open
PyDeps opened this issue Oct 26, 2022 · 0 comments
Open

Project dependencies may have API risk issues #89

PyDeps opened this issue Oct 26, 2022 · 0 comments

Comments

@PyDeps
Copy link

PyDeps commented Oct 26, 2022

Hi, In MLAlgorithms, inappropriate dependency versioning constraints can cause risks.

Below are the dependencies and version constraints that the project is using

tqdm
matplotlib>=1.5.1
numpy>=1.11.1
scikit-learn>=0.18
scipy>=0.18.0
seaborn>=0.7.1
autograd>=1.1.7
gym

The version constraint == will introduce the risk of dependency conflicts because the scope of dependencies is too strict.
The version constraint No Upper Bound and * will introduce the risk of the missing API Error because the latest version of the dependencies may remove some APIs.

After further analysis, in this project,
The version constraint of dependency gym can be changed to >=0.6.0,<=0.22.0.

The above modification suggestions can reduce the dependency conflicts as much as possible,
and introduce the latest version as much as possible without calling Error in the projects.

The invocation of the current project includes all the following methods.

In version gym-0.5.7, the API gym.wrappers.Monitor whch is used by the current project in mla/rl/dqn.py is missing.

image

The calling methods from the gym
gym.wrappers.Monitor
The calling methods from the all methods
self.update
mla.knn.KNNClassifier
f_entropy
sklearn.metrics.accuracy_score
self.env.render
ax.scatter
self._sample.sum
axes.scatter
classification
sample
mla.linear_models.LinearRegression
output.append
mla.svm.svm.SVM
numpy.sign
self.cost_func
autograd.numpy.concatenate
autograd.numpy.ones
itertools.combinations
mla.ensemble.tree.Tree.train
self.arg_max.flatten
mla.neuralnet.layers.Dropout
y.x.dist.cdist.self.gamma.np.exp.flatten
self._params.reshape
numpy.ceil
self._closest
col.transpose.reshape.reshape
i.self.assignments.sum
self._find_bounds
load
X.copy.copy
numpy.bincount
self.init_grad
self.y.take
KMeans_and_GMM
gym.wrappers.Monitor
numpy.random.random
self.distance_func
numpy.dot.sum
sentences.append
classification_error
autograd.numpy.zeros_like
numpy.asarray
self._find_splits
self._factor_step
get_filename.open.read
grid_gaussian_pdf
numpy.zeros.sum
mla.ensemble.gbm.GradientBoostingRegressor.fit
X_train.shape.X_train.reshape.astype
self.likelihood.append
loss_history.append
sklearn.model_selection.train_test_split
self.loss.grad
self._backward_pass.reshape
mla.linear_models.LogisticRegression.predict
self._grad
col.transpose.reshape
mla.ensemble.gbm.GradientBoostingRegressor
self._binary_search
numpy.cumsum
os.path.dirname
self.responsibilities.sum
self.activation_d
affines.clip.clip
mla.metrics.accuracy
zip
math.sqrt
mla.svm.svm.SVM.fit
network.error
self.X.min
mla.svm.kernerls.Linear
matplotlib.pyplot.plot
autograd.numpy.pad
self.left_child._train
mla.neuralnet.regularizers.L2
mla.neuralnet.layers.recurrent.LSTM
i.delta.sum
closest.self.clusters.append
i.y.X.dot
autograd.numpy.zeros_like.keys
self.model.fit
logging.info
min
gains.clip.clip
cov.mean.grid_array.multivariate_normal.pdf.reshape
self.optimizer.optimize
self.FMClassifier.super.fit
self.sigmoid
predicted.actual.self.hess.sum
layer.setup
numpy.max
numpy.eye
self._E_step
numpy.clip
matplotlib.pyplot.scatter
width.height.n_images.out.reshape.transpose
print
numpy.apply_along_axis
numpy.dot
mla.datasets.load_mnist
numpy.zeros
isinstance
mla.knn.KNNRegressor
self.theta.flatten
uniform
self.X.max
sigmoid
mla.pca.PCA.transform
mla.kmeans.KMeans.predict
get_filename
type
i.self.clusters.remove
scipy.linalg.svd
layer.parameters.keys
self.kernel
mla.neuralnet.NeuralNet
numpy.atleast_2d
AttributeError
numpy.random.multinomial
mla.naive_bayes.NaiveBayesClassifier
self.optimizer.setup
squared_log_error
mla.metrics.distance.l2_distance
y.append
mla.utils.batch_iterator
absolute_error
n_channels.out_width.out_height.n_images.out.reshape.transpose
y_test.flatten
predicted.actual.self.grad.sum
numpy.zeros.mean
preds.np.asarray.astype
autograd.numpy.logaddexp
delta.transpose.transpose
self.transform
scipy.stats.entropy
numpy.random.seed
numpy.unique
mla.rl.dqn.DQN.init_environment
y.reshape.reshape
self.hprev.copy
numpy.random.shuffle
logging.getLogger
tree.train
mla.rl.dqn.DQN.init_model
self._is_converged
self._params.init
sys.stdout.flush
self._get_pairwise_affinities
f.read.split
w.np.abs.sum
mla.ensemble.base.split_dataset
autograd.numpy.mean
mean_squared_log_error
self._dist_from_centers
mla.neuralnet.loss.get_loss
delta.transpose.reshape
X.reshape
self._backward_pass
collections.Counter
self.dense.backward_pass
logging.getLogger.setLevel
int
bool
x.y.self._pdf.np.log.sum
self._calculate_leaf_value
os.path.join
self.metric
mla.neuralnet.optimizers.Adam
mla.knn.KNNRegressor.predict
mla.knn.KNNClassifier.predict
self._get_centroid
gym.make
mla.ensemble.base.xgb_criterion
delta.self.col.T.np.dot.transpose
self._forward_pass
autograd.numpy.dot
self.loss_grad.mean
assignment.self.means.self.X.T.dot
self.sigmoid_d
delta.reshape
matplotlib.pyplot.subplots
tree.predict_row
mla.neuralnet.layers.get_activation
self._choose_next_center
layer.shape
mla.neuralnet.layers.Flatten
array.array
mla.tsne.TSNE.fit_transform
setuptools.setup
numpy.random.normal
function
mla.knn.KNNRegressor.fit
self._params.update_grad
self._params.keys
hasattr
scipy.spatial.distance.cdist
self._q_distribution
numpy.cov
X_train.shape.X_train.reshape.astype.reshape
seaborn.set
addition_problem
str.format
axis_X.flatten
autograd.numpy.sign
numpy.random.choice
numpy.arange
self.env.step
reversed
Tree
numpy.zeros_like
mla.neuralnet.NeuralNet.fit
self._cost.append
mla.ensemble.random_forest.RandomForestClassifier
numpy.random.random_sample
layer.parameters.step
name.self.regularizers
axis_Y.flatten
x.dot
numpy.log2
autograd.numpy.linalg.norm
autograd.numpy.clip
autograd.numpy.repeat
mla.metrics.metrics.accuracy
network.shuffle_dataset
numpy.fill_diagonal
mla.svm.svm.SVM.predict
Dense
self.train_epoch
regression
itertools.islice
cmap
self.predict
self.FMRegressor.super.fit
self.criterion
numpy.sum
self._find_bprop_entry
self.right_child.predict_row
axes.set_title
self._cost
self.loss_grad
self.X.resp.sum
numpy.take
numpy.reshape
self.init_cost
numpy.prod
self.grad
print_curve
super
mla.rl.dqn.DQN.train
model.predict.flatten
autograd.numpy.full
self.RandomForestClassifier.super.__init__
mla.linear_models.LogisticRegression.fit
numpy.maximum
logging.basicConfig
float
self._sample
self.sigmoid_d.sum
get_filename.open.read.lower
self._get_likelihood
autograd.numpy.arange
mla.ensemble.gbm.GradientBoostingRegressor.predict
self.shape
mla.kmeans.KMeans.fit
mla.rbm.RBM
autograd.numpy.maximum
list
numpy.mean
mla.datasets.load_nietzsche
mla.rbm.RBM.fit
sigmoid.sum
numpy.concatenate
mla.neuralnet.activations.get_activation
autograd.elementwise_grad
self._params.setup_weights
ax.contour
self._params.init_grad
random.sample
self.dense.setup
numpy.random.rand
losses.append
self._train
mla.ensemble.base.split
logging.getLogger.info
mla.neuralnet.activations.sigmoid
self._decompose
numpy.linalg.svd
ValueError
n_timesteps.self.states.copy
cost_d
moving_average
self._init_weights
w.sum
f_width.f_height.n_channels.out_width.out_height.n_images.columns.reshape.transpose
self.init
mla.tsne.TSNE
tree.predict
self.model.predict
convoltuion_shape
self._predict
random.seed
neighbors_targets.Counter.most_common
self.predict_row
autograd.numpy.random.seed
check_data
model
numpy.exp
LeastSquaresLoss
sum
sklearn.cross_validation.train_test_split
mla.knn.KNNClassifier.fit
globals
X_test.shape.X_test.reshape.astype
self.centroids.append
mla.ensemble.random_forest.RandomForestRegressor.fit
self._M_step
struct.unpack
x.strip.replace
layer.forward_pass
numpy.abs
make_clusters
collections.defaultdict
numpy.linalg.norm
self._add_penalty
n_timesteps.self.outputs.copy
os.path.abspath
numpy.linalg.eig
X.transpose
random.randint
self.random_index
params.append
mla.ensemble.random_forest.RandomForestRegressor.predict
mla.ensemble.tree.Tree
NotImplementedError
target.keys
numpy.packbits
network.update
self.dense.forward_pass
mla.utils.one_hot
autograd.numpy.array
self.activation
self._find_splits.add
squared_distances.sum
name.self.constraints.clip
image_to_column
super.__init__
seaborn.color_palette
model.predict.max
batch.sum
autograd.numpy.abs
enumerate
batch.sum.np.asarray.squeeze
n_timesteps.states.copy
mla.rl.dqn.DQN.play
self.replay.append
mla.linear_models.LogisticRegression
model.predict.min
resp.sum
numpy.ones_like
self._error
pooling_shape
setuptools.find_packages
autograd.numpy.sum
sklearn.datasets.make_regression
self._setup_input
mla.rl.dqn.DQN
numpy.packbits.astype
format
self.covs.append
mla.naive_bayes.NaiveBayesClassifier.fit
autograd.numpy.max
time.time
scipy.special.expit
self.trees.append
mla.gaussian_mixture.GaussianMixture
predicted.actual.sum
self.clip
numpy.round
X_c.var
self.loss.approximate
self._get_weighted_likelihood.argmax
numpy.full
layer.backward_pass
loss.gain
numpy.where
delta.transpose.flatten
str
self.responsibilities.sum.sum
self.RandomForestRegressor.super.__init__
self.GradientBoostingClassifier.super.fit
sorted
numpy.meshgrid
mla.neuralnet.layers.MaxPooling
mla.utils.one_hot.flatten
self.GradientBoostingRegressor.super.fit
f.read
self.left_child.predict_row
mla.naive_bayes.NaiveBayesClassifier.predict
numpy.sqrt
mla.neuralnet.parameters.Parameters
sklearn.datasets.make_classification
numpy.copy
max
self.env.close
autograd.numpy.prod
x.startswith
self._get_weighted_likelihood.sum
mla.metrics.metrics.mean_squared_error
autograd.numpy.argmax
self.activation_d.sum
p.keys
scipy.stats.multivariate_normal.pdf
self.weight
self.inner_init
sklearn.datasets.make_blobs
random.choice
squared_error
normal
autograd.numpy.exp
self._initialize
mla.metrics.distance.euclidean_distance
autograd.numpy.random.normal
numpy.array
numpy.random.randint
open.close
numpy.random.randn
addition_dataset
self.loss.transform
matplotlib.pyplot.show
next_chars.append
open.read
mla.kmeans.KMeans.plot
delta.reshape.reshape
self._add_intercept.dot
autograd.numpy.log
delta.self.col.T.np.dot.transpose.reshape
X.transpose.reshape
self.env.reset
mla.pca.PCA
len
x.strip
self._find_best_split
_glorot_fan
numpy.ones
X_c.mean
get_split_mask
mla.ensemble.tree.Tree.predict
self.X.take
autograd.numpy.random.uniform
self.replay.pop
autograd.numpy.amax
self._initialize_centroids
s_squared.sum
col.transpose.reshape.transpose
mla.neuralnet.constraints.MaxNorm
self.errors.append
self._add_intercept
mla.metrics.metrics.get_metric
numpy.random.uniform
f_width.f_height.n_channels.out_width.out_height.n_images.columns.reshape.transpose.reshape
self.hess
numpy.amax
numpy.log
mla.neuralnet.layers.Dense
cols.rows.i.ind.cols.rows.i.ind.img.array.reshape
autograd.numpy.sqrt
numpy.argmax
autograd.numpy.clip.argmax
y_max.reshape.reshape
column_to_image
X_test.shape.X_test.reshape.astype.reshape
autograd.grad
mla.gaussian_mixture.GaussianMixture.plot
t.y.astype
tqdm.tqdm
logging.debug
self.weights.sum
mla.pca.PCA.fit
self._predict_x
self.v.x.dot.dot
mla.neuralnet.layers.TimeDistributedDense
self._predict_row
mla.neuralnet.layers.Convolution
sys.stdout.write
mean_squared_error
autograd.numpy.tanh
self._gradient_descent
mla.neuralnet.layers.Activation
self._setup_layers
kmeans_example
sklearn.metrics.roc_auc_score
LogisticLoss
Q.clip.clip
numpy.empty
mla.neuralnet.optimizers.RMSprop
mla.neuralnet.initializations.get_initializer
mla.ensemble.gbm.GradientBoostingClassifier
self._pdf
mla.neuralnet.NeuralNet.predict
mla.neuralnet.activations.softmax
codecs.open
self.fprop
self._get_predictions
actual.argmax.argmax
mla.gaussian_mixture.GaussianMixture.fit
autograd.numpy.zeros
self.loss
mla.kmeans.KMeans
self._get_weighted_likelihood
set
mla.neuralnet.optimizers.Adadelta
autograd.numpy.max.reshape
self.aggregate
mla.ensemble.random_forest.RandomForestRegressor
C.W.H.N.out_flat.reshape.transpose
self.right_child._train
open
mla.svm.kernerls.RBF
range
self._assign

@developer
Could please help me check this issue?
May I pull a request to fix it?
Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant