jason9693 / MusicTransformer-tensorflow2.0

implementation of music transformer with tensorflow-2.0 (ICLR2019)
MIT License
353 stars 81 forks source link

Project dependencies may have API risk issues #48

Open PyDeps opened 1 year ago

PyDeps commented 1 year ago

Hi, In MusicTransformer-tensorflow2.0, inappropriate dependency versioning constraints can cause risks.

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

absl-py==0.7.1
alembic==1.0.11
appdirs==1.4.3
asciimatics==1.11.0
asn1crypto==0.24.0
astor==0.8.0
bc-dvc-init==0.3.0
boto3==1.9.115
botocore==1.12.180
certifi==2018.1.18
chardet==3.0.4
Click==7.0
cloudpickle==1.1.1
colorama==0.4.1
config==0.4.2
configobj==5.0.6
configparser==3.7.4
contextlib2==0.5.5
cryptography==2.3
databricks-cli==0.8.7
decorator==4.4.0
distro==1.4.0
docker==4.0.2
docutils==0.14
dvc==0.50.1
entrypoints==0.3
Flask==1.0.3
funcy==1.12
future==0.17.1
gast==0.2.2
git-url-parse==1.2.2
gitdb2==2.0.5
GitPython==2.1.11
google-pasta==0.1.6
grandalf==0.6
grpcio==1.21.1
gunicorn==19.9.0
h5py==2.9.0
humanize==0.5.1
idna==2.6
inflect==2.1.0
itsdangerous==1.1.0
Jinja2==2.10.1
jmespath==0.9.4
jsonpath-ng==1.4.3
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.0
keyring==10.6.0
keyrings.alt==3.0
Mako==1.0.12
Markdown==3.1.1
MarkupSafe==1.1.1
mido==1.2.9
mlflow==1.0.0
nanotime==0.5.2
networkx==2.3
numpy==1.16.4
pandas==0.24.2
pathspec==0.5.9
pbr==5.3.1
Pillow==6.2.0
ply==3.11
pretty-midi==0.2.8
progress==1.5
protobuf==3.8.0
psutil==5.6.6
pyasn1==0.4.5
pycrypto==2.6.1
pyfiglet==0.8.post1
pygobject==3.26.1
pyparsing==2.4.0
python-apt==1.6.4
python-dateutil==2.8.0
python-editor==1.0.4
pytz==2019.1
pyxdg==0.26
PyYAML==5.1.1
querystring-parser==1.2.3
requests==2.22.0
ruamel.yaml==0.15.97
s3transfer==0.2.1
schema==0.7.0
SecretStorage==2.3.1
shortuuid==0.5.0
simplejson==3.16.0
six==1.12.0
smmap2==2.0.5
SQLAlchemy==1.3.5
sqlparse==0.3.0
ssh-import-id==5.7
tabulate==0.8.3
tb-nightly==1.14.0a20190603
tensorflow-gpu==2.0.0b1
termcolor==1.1.0
tf-estimator-nightly==1.14.0.dev2019060501
tfp-nightly==0.8.0.dev20190807
treelib==1.5.5
urllib3==1.24.2
wcwidth==0.1.7
websocket-client==0.56.0
Werkzeug==0.15.4
wrapt==1.11.1
zc.lockfile==1.4

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 Flask can be changed to >=0.11,<=0.12.5. The version constraint of dependency future can be changed to >=0.12.0,<=0.18.2. The version constraint of dependency networkx can be changed to >=2.0,<=2.8.4. The version constraint of dependency pyasn1 can be changed to >=0.4.1,<=0.4.8.

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 Flask
json.load
json.dump
The calling methods from the future
datetime.datetime.now
The calling methods from the networkx
max
The calling methods from the pyasn1
open
The calling methods from the all methods
ControlSeq.feat_dims
TransformerLoss
self.TransformerLoss.super.__init__
argparse.ArgumentParser.parse_args
tensorflow.equal
preprocess_midi_files_under
preprocess_midi
NoteSeq.from_midi_file
Encoder
f.join
tensorflow.cast
DecoderLayer
predictions.y.metric.numpy
result.sequence.EventSeq.from_array.to_note_seq
sum
datetime.datetime.now
tf.argmax
itertools.chain
tf.executing_eagerly
tensorflow.python.keras.optimizer_v2.adam.Adam
model.MusicTransformer.train_on_batch
self.layernorm3
math.sqrt
self._set_metrics
data.Data.slide_seq2seq_batch
numpy.roll
pickle.dump
random.sample
c.numpy
kwargs.kargs.self.to_midi.write
numpy.append
es.to_array.EventSeq.from_array.to_note_seq.to_midi_file
predictions.tf.nn.softmax.out_tar.metric.numpy
os.makedirs
numpy.shape
numpy.float32
self.sanity_check
rga
self._distribution_strategy.experimental_run_v2
split_last_dimension
self.Encoder
model.MusicTransformerDecoder.compile
self.FFN_pre
NoteSeq.from_midi
MusicTransformer.__prepare_train_data
EventSeq.from_array
tf.transpose
tensorflow.constant
self.MusicTransformerDecoder.super.__init__
tensorflow.matmul
list.append
numpy.ones
RelativeGlobalAttention
PositionEmbeddingV2.__get_angles
self._skewing
self.TransformerLoss.super.call
pretty_midi.Note
MusicTransformer.save_weights
math.sin
tf.distribute.MirroredStrategy.scope
tensorflow.range
midi.instruments.append
self.__load_config
self.layernorm1
model.MusicTransformer.reset_metrics
model.MusicTransformerDecoder.generate
ControlSeq
result_metric.append
weights.append
math.log
copy.deepcopy
range
self.Encoder.super.__init__
self.Decoder.super.__init__
deprecated.sequence.EventSeq.from_array
self.rga
tf.summary.scalar
metric.reset_states
self.PositionEmbeddingV2.super.__init__
self._qe_masking
tf.ones
tensorflow.pad
min
tensorflow.add
progress.bar.Bar.iter
super
tensorflow.logical_not
self.CustomSchedule.super.__init__
EventSeq.from_note_seq.to_array
ctrl_seq_list.append
name.lower.lower
tf.nn.top_k
self.FFN_suf
d.items
tensorflow.math.minimum
math.exp
self.model.save
name.lower.endswith
path.split
numpy.ones.note_count.pitch_count.note_count.tolist
self.rga2
tape.gradient
Decoder
EventSeq.from_note_seq
utils.attention_image_summary
tensorflow.summary.image
ControlSeq.feat_dims.values
tf.concat.numpy
self.layernorm2
pickle.load
deprecated.sequence.EventSeq.from_array.to_note_seq
tensorflow.ones_like
self.fc
get_masked_with_pad_tensor
progress.bar.Bar
es_seq_list.append
self.Wk
tensorflow.expand_dims
tensorflow.python.keras.layers.Dropout
tensorflow.io.TFRecordWriter
enumerate
tf.reshape
data.Data
datetime.datetime.now.strftime
len
self.process_midi_from_dir
numpy.concatenate
DynamicPositionEmbedding
model.MusicTransformerDecoder
json.load
self.__prepare_train_data
max
tensorflow.argmax
i.self.enc_layers
tf.summary.image
self.EncoderLayer.super.__init__
collections.OrderedDict
EventSeq.feat_dims.values
self.notes.sort
tensorflow.sequence_mask
phist.np.array.astype
ControlSeq.feat_dims.items
tensorflow.train.BytesList
argparse.ArgumentParser.add_argument
model.MusicTransformer.evaluate
self.__dist_train_step
shape_list
utils.fill_with_placeholder
deprecated.sequence.EventSeq.feat_ranges
MusicTransformer.load_weights
note_events.append
i.self.dec_layers
print
metric
EventSeq.feat_ranges
res.append
tensorflow.reduce_max
self.Wq
controls.append
argparse.ArgumentParser
join
tensorflow.train.Int64List
self.CustomSchedule.super.get_config
eval
tensorflow.math.equal
model.MusicTransformerDecoder.evaluate
numpy.power
filter.append
tensorflow.python.keras.metrics.SparseCategoricalAccuracy
tensorflow.python.keras.layers.LayerNormalization
self.call
numpy.sin
tensorflow.math.mod
es.to_array.EventSeq.from_array.to_note_seq
tf.constant
self.batch
self.get_config
tf.summary.create_file_writer.as_default
isinstance
model.MusicTransformerDecoder.sanity_check
self.save_weights
tensorflow.math.rsqrt
tensorflow.ones
tf.summary.histogram
tf.reduce_mean.numpy
numpy.arange
midi_processor.processor.decode_midi
self.add_weight
model.MusicTransformerDecoder.train_on_batch
tensorflow.math.logical_not
NoteSeq
self._distribution_strategy.reduce
note_events.sort
MusicTransformer
self.Wv
self.dropout2
EventSeq
self.add_notes
_rel_pitch
p.split
numpy.array
tf.nn.softmax
numpy.searchsorted
midi_processor.processor.encode_midi
self.loss
open
self.load_weights
tensorflow.train.Feature
self.Decoder
int
deprecated.sequence.EventSeq.dim.events.events.all
p.grad.data.norm
model.MusicTransformer
tensorflow.transpose
utils.find_files_by_extensions
zip
numpy.zeros
self.MTFitCallback.super.__init__
self.pos_encoding
self.MusicTransformer.super.__init__
self.DecoderLayer.super.__init__
tensorflow.nn.softmax
utils.get_masked_with_pad_tensor
self._get_left_embedding
format
tensorflow.one_hot
os.walk
tf.cast
result_array.append
MusicTransformer.generate
tensorflow.nn.softmax_cross_entropy_with_logits
tensorflow.python.keras.layers.Dense
self.dropout1
EventSeq.feat_dims
self._get_seq
self._get_seq.append
tf.concat
Event
random.uniform
tf.name_scope
tensorflow.print
model.MusicTransformer.compile
event_seq.to_note_seq.to_midi_file
tensorflow.math.pow
self.__train_step
self.dropout
EventSeq.feat_ranges.items
tensorflow.summary.histogram
model.MusicTransformerDecoder.reset_metrics
r.numpy
predictions.tf.argmax.numpy
random.randrange
tf.summary.create_file_writer
tensorflow.einsum
self.optimizer.apply_gradients
numpy.cos
predictions.target.metric.numpy
deprecated.sequence.EventSeq.dim
EventSeq.get_velocity_bins
self.load_ckpt_file
pretty_midi.Instrument
EncoderLayer
str
numpy.uint8.ndens.np.array.reshape
self.embedding
custom.callback.CustomSchedule
tf.expand_dims
tensorflow.math.sqrt
pretty_midi.PrettyMIDI
tensorflow.reshape
filter
list
tensorflow.maximum
x.get_shape
x.get_shape.as_list
self.load_config_file
data.Data.seq2seq_batch
tensorflow.shape
tf.GradientTape
json.dump
os.path.join
tf.print
predictions.tf.nn.softmax.y.metric.numpy
super.__init__
result.sequence.EventSeq.from_array.to_note_seq.to_midi_file
model.MusicTransformerDecoder.save
EventSeq.dim
tensorflow_probability.distributions.Categorical
tf.distribute.MirroredStrategy
item.split.split
self.to_midi
array.astype
Control
tensorflow_probability.distributions.Categorical.sample
self.dropout3
tensorflow.concat
tensorflow.python.keras.layers.Embedding
os.path.exists
model.MusicTransformer.save
_has_ext
tf.reduce_mean
deprecated.sequence.ControlSeq.feat_ranges
EventSeq.feat_dims.items

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