google-research / mixmatch

Apache License 2.0
1.13k stars 163 forks source link

Project dependencies may have API risk issues #49

Closed PyDeps closed 1 year ago

PyDeps commented 1 year ago

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

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

absl-py
easydict
cython
numpy
tensorflow-gpu==1.14.0
tqdm

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 tqdm can be changed to >=4.42.0,<=4.64.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.

The calling methods from the tqdm
itertools.product
tqdm.tqdm
tqdm.trange
The calling methods from the all methods
self.eval_checkpoint
outputs.append
tqdm.trange.write
tensorflow.contrib.distributions.Categorical.entropy
self.experiment_name
numpy.prod
tensorflow.get_collection
tensorflow.device
tensorflow.train.Features
int
collect_samples
libml.data_pair.stack_augment
tensorflow.nn.relu
os.path.join
max
self.augment
absl.app.UsageError
tensorflow.name_scope
functools.partial
AblationMixMatch
tqdm.trange
FLAGS.set_default
train_labeled.make_one_shot_iterator.get_next.make_one_shot_iterator
tensorflow.stop_gradient.get_shape
self.tmp.print_queue.pop
json.load
tensorflow.random_normal
config.items
tensorflow.variable_scope
data.make_one_shot_iterator.get_next.map
format
absl.flags.DEFINE_string
tensorflow.train.Example
train_labeled.fn.map
tensorflow.range
join
writer_unlabel.write
data.make_one_shot_iterator.get_next.make_one_shot_iterator
NotImplementedError
list
train_unlabeled.make_one_shot_iterator.get_next.make_one_shot_iterator
_int64_feature
classifier
FLAGS.batch.ds.batch.prefetch.make_one_shot_iterator.get_next
getter
tensorflow.shape
tensorflow.python_io.tf_record_iterator
numpy.argmax
FLAGS.dataset.DATASETS
_is_installed
pos.id_class.class_data.append
tensorflow.train.Int64List
data.len.tf.data.Dataset.range.repeat
tensorflow.train.Saver
self.dataset.train_unlabeled.batch
minmax.append
logits_y.tf.distributions.Categorical.entropy
writer_label.write
tensorflow.Variable
t.update
batch.self.dataset.train_labeled.batch.prefetch
argv.pop
tensorflow.train.MonitoredSession
accuracies.append
path.open.write
id_class.append
tensorflow.summary.scalar
tarfile.open
tensorflow.exp
ICT.train
re.compile
numpy.frombuffer
interleave_offsets
itertools.product
augment_mirror
libml.layers.interleave
tuple.append
train_data_labels.append
easydict.EasyDict
forward
beta.beta.tf.distributions.Beta.sample
c.class_data.pop
tensorflow.round
dict.keys
_encode_png
train_session._tf_sess
cls
train_unlabeled.fn.map
tensorflow.random_shuffle
ICT
tensorflow.reduce_mean
numpy.log2
numpy.ceil
glob.glob
fn
self.eval_mode
tensorflow.reduce_sum
logsoftmax
tensorflow.contrib.distributions.Categorical
absl.flags.DEFINE_float
libml.utils.model_vars
saver
ValueError
re.compile.match
tensorflow.data.TFRecordDataset
URLS.format
dataset.batch.prefetch.make_one_shot_iterator
x.r_step.match.group
ds.batch
stack_augment
tensorflow.train.Saver.restore
libml.utils.ilog2
dataset.shuffle.shuffle
ShakeNet.classifier
tensorflow.distributions.Beta
MeanTeacher.train
self.guess_label
tensorflow.argmax
map
AblationMixMatch.train
tensorflow.train.MonitoredTrainingSession
tensorflow.log
numpy.random.shuffle
unflatten
numpy.array.keys
tar.extractfile.read
tensorflow.control_dependencies
DataSet.creator
tensorflow.split
shutil.rmtree
len
branch
VAT.train
collections.OrderedDict
tensorflow.train.NewCheckpointReader.get_tensor
batch.self.dataset.train_unlabeled.batch.prefetch
self.train_print
dataset.shuffle.prefetch
DataSetFS.creator
tensorflow.image.random_flip_left_right
PiModel
tensorflow.reduce_any
tensorflow.image.encode_png
tensorflow.train.Example.SerializeToString
dataset.shuffle.make_one_shot_iterator
tensorflow.one_hot
tensorflow.nn.softmax
tensorflow.train.Feature
x.repeat.shuffle
train_labeled.make_one_shot_iterator.get_next
sess.run.min
os.makedirs
loop.close
self.augment_pair
self.save_args
PseudoLabel.train
labels.predicted.argmax.mean
entropy_from_logits
conv_args
iterator
tensorflow.logging.set_verbosity
collect_hashes
FSMixup
tensorflow.rsqrt
libml.data.compute_mean_std
numpy.random.seed
tensorflow.layers.batch_normalization
FLAGS.batch.to_byte.data.map.batch.prefetch.make_one_shot_iterator.get_next.map
tensorflow.FixedLenFeature
tensorflow.assign_add
tensorflow.train.NewCheckpointReader
tensorflow.pad
tensorflow.layers.dense
frozenset
libml.utils.get_config
print
tensorflow.random_uniform
third_party.vat_utils.generate_perturbation
numpy.zeros.max
root.dataset.take
any
numpy.median
center
self.train_step
absl.flags.DEFINE_enum
self.dataset.train_labeled.batch
tensorflow.stop_gradient
tensorflow.parse_single_example
tensorflow.layers.batch_normalization.get_shape
tensorflow.train.BytesList
self.cache_eval
PseudoLabel
get_available_gpus
config.get
tensorflow.reduce_max
ConvNet.classifier
compute_mean_std
ResNet.classifier
hasher
raw.append
mixmatch.MixMatch.train
tensorflow.maximum
os.path.abspath
tensorflow.image.decode_image
tensorflow.concat
tensorflow.placeholder
sess.run
checksums.items
session.run
tensorflow.Session
Mixup.train
tensorflow.cast
files.items
residual
parse_fn.take
tensorflow.layers.average_pooling2d
FSBaseline.train
tensorflow.pow
tensorflow.train.AdamOptimizer
tensorflow.glorot_normal_initializer
_bytes_feature
sorted
kwargs.items
tensorflow.train.summary_iterator
open.write
libml.utils.setup_tf
numpy.array
tensorflow.greater
tensorflow.ones
MixMatch
libml.utils.get_available_gpus
parse_fn
libml.data.dataset
FLAGS.batch.ds.batch.prefetch.make_one_shot_iterator
train_unlabeled.make_one_shot_iterator.get_next
numpy.stack
libml.layers.kl_divergence_from_logits
numpy.concatenate.append
tensorflow.train.ExponentialMovingAverage
tensorflow.group
urllib.request.urlretrieve
self.session.run
numpy.concatenate
split
tensorflow.get_collection.extend
get_class.dataset.map.batch.map
FileExistsError
x.data.map.batch.prefetch
tensorflow.gradients
min
tempfile.NamedTemporaryFile
CNN13.classifier
tarfile.open.extractfile
train_data_batches.append
numpy.max
f.write
writer.write
mixmatch.MixMatch
train_files.data.dataset.skip
FLAGS.seed.data.split.split
os.path.exists
libml.utils.find_latest_checkpoint
tensorflow.reshape
FLAGS.batch.to_byte.data.map.batch.prefetch.make_one_shot_iterator
tensorflow.train.Scaffold
dataset.batch.prefetch
batch.mean
tuple
MixMode.augment_pair
tensorflow.distributions.Categorical
config
tensorflow.python_io.TFRecordWriter
img.hasher.digest
summary_dict
get_class.dataset.map.batch
self.eval_stats
Mixup
collect_hashes.add
FLAGS.dataset.data.DATASETS
tensorflow.clip_by_value
tensorflow.data.Dataset.range
libml.data.DATA_DIR.os.path.join.open.read
self.tune
augment
i.class_id.append
tensorflow.py_func.append
FLAGS.batch.ds.batch.prefetch
Model.__init__
scipy.io.loadmat
average_grads.append
loop.update
libml.layers.interleave.append
train_session.run
libml.data.DataSet.creator
json.dump
numpy.zeros
FLAGS.batch.to_byte.data.map.batch.prefetch.make_one_shot_iterator.get_next
dataset.batch.prefetch.make_one_shot_iterator.get_next
kl_divergence_with_logit
tensorflow.random_crop
FLAGS.p_unlabeled.split
x.repeat
tensorflow.get_collection.append
FLAGS.batch.to_byte.data.map.batch.prefetch
absl.app.run
dict.items
tensorflow.constant
tensorflow.to_float
os.path.dirname
find_latest_checkpoint
images.reshape
tensorflow.transpose
tensorflow.abs
absl.flags.register_validator
set.add
numpy.concatenate.argmax
self.tmp.print_queue.append
sum
str
range
frozenset.append
to_byte.data.map.batch
stats.append
tensorflow.train.ExponentialMovingAverage.apply
tensorflow.train.replica_device_setter
leaky_relu
json.dumps
numpy.array.max
FileNotFoundError
tensorflow.layers.conv2d
unlabel.append
enumerate
get_normalized_vector
tensorflow.py_func
absl.flags.DEFINE_integer
tensorflow.python.client.device_lib.list_local_devices
dict
data.make_one_shot_iterator.get_next.append
get_logits
parse_fn.concatenate
libml.data.DATA_DIR.os.path.join.open.read.split
x.data.map.batch
tensorflow.layers.max_pooling2d
dataset.batch
dataset.make_one_shot_iterator.get_next
tensorflow.assign
tensorflow.nn.sparse_softmax_cross_entropy_with_logits
lr.tf.train.AdamOptimizer.minimize
tensorflow.ConfigProto
numpy.sqrt
PiModel.train
VAT
get_latest_global_step
numpy.transpose
tensorflow.gather
self._create_initial_files
renorm
collections.defaultdict
dataset.shuffle.map
tensorflow.square
isinstance
libml.layers.MixMode
zip
get_class.dataset.map.batch.make_one_shot_iterator
data.make_one_shot_iterator.get_next
open
scipy.io.loadmat.flatten
train_files.data.dataset.take
libml.layers.shakeshake
sess.run.max
self.model
tensorflow.contrib.distributions.kl_divergence
tensorflow.sqrt
MeanTeacher
tensorflow.stack
set
tensorflow.to_int32
self.add_summaries
absl.flags.DEFINE_bool
tensorflow.random_normal_initializer
tensorflow.nn.softmax_cross_entropy_with_logits_v2
ema.average
MixMatch.train
scipy.io.loadmat.reshape
tensorflow.train.get_or_create_global_step
dataset.test.repeat
os.path.isdir
tqdm.tqdm
interleave_offsets.append
DATASETS.update
dataset
FSBaseline
augment_shift
root.dataset.skip
FSMixup.train

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

carlini commented 1 year ago

I do not understand what action you are proposing, but this project is designed to reproduce a particular paper, and we will keep the dependencies as is to keep the code reproducible.