phanein / deepwalk

DeepWalk - Deep Learning for Graphs
http://www.perozzi.net/projects/deepwalk/
Other
2.69k stars 825 forks source link

Project dependencies may have API risk issues #134

Open PyDeps opened 2 years ago

PyDeps commented 2 years ago

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

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

wheel>=0.23.0
Cython>=0.20.2
six>=1.7.3
gensim>=1.0.0
scipy>=0.15.0
psutil>=2.1.1
networkx>=2.0

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 gensim can be changed to >=1.0.0rc1,<=3.1.0. The version constraint of dependency gensim can be changed to >=4.0.0,<=4.2.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 gensim
KeyedVectors.load_word2vec_format
The calling methods from the all methods
l.strip.split
set
join
files.append
row.extend
shuffles.append
main
kwargs.get
logger.setLevel
fout.write
setup
self.make_consistent
self.remove_self_loops
sys.exit
isinstance
self.order
x.tocoo
clf.predict
rand.shuffle
parser.parse_args
path.isfile
pdb.pm
list
args_list.append
open.read
G.random_walk
rand.random
sys.__excepthook__
zip
os.path.dirname
iterkeys
self.Graph.super.__init__
sum
serialized_walks.WalksCorpus
MultiLabelBinarizer
os.getcwd
logger.debug
dict
LogisticRegression
i.y_test.append
filter
l.strip
train_percent.all_results.append
f1_score
G.iterkeys
format
other.self.append
self.iteritems
hasattr
all_results.keys
self.keys
graph.load_edgelist
logging.basicConfig
permutations
y_test_.tocoo
iter
int
open
from_adjlist
convert_func
i.G.append
rand.randint
serialized_walks.write_walks_to_disk
logger.info
path.append
G.make_undirected
loadmat
adjlist.extend
sys.stderr.isatty
self.degree
p.cpu_affinity
probs_.argsort
enumerate
parser.add_argument
time
cpu_count
KeyedVectors.load_word2vec_format
rand.choice
G.degree
numpy.asarray
i.y_train.append
serialized_walks.count_textfiles
self.Skipgram.super.__init__
graph.load_matfile
len
graph.load_adjacencylist
skshuffle
y_train_.tocoo
walks.append
grouper
executor.map
k.probs_.argsort.self.classes_.tolist
Counter
y.G.append
graph.grouper
iteritems
graph.build_deepwalk_corpus
line.split
p.set_cpu_affinity
self.TopKRanker.super.predict_proba
traceback.print_exception
mlb.fit_transform
args.log.upper
Exception
from_numpy
ProcessPoolExecutor
G.keys
super
process
x.self.remove
map
TopKRanker
i.G.add
Word2Vec
issparse
ArgumentParser
getattr
print
graph.build_deepwalk_corpus_iter
sys.path.insert
defaultdict
sorted
x.G.append
range
random.Random
os.getpid
zip_longest
Graph
all_labels.append
open.read.replace
G_input.nodes
G.nodes
Skipgram
clf.fit
logging.getLogger
sparse2graph
str
c.update
model.wv.save_word2vec_format
G.make_consistent
psutil.Process

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