dmlc--dgl
701c6fe754
* Auto fix update-version * Auto fix setup.py * Auto fix update-version * Auto fix setup.py * [Doc] Change random.py to random_partition.py in guide on distributed partition pipeline (#4438) * Update distributed-preprocessing.rst * Update Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal> * fix unpinning when tensoradaptor is not available (#4450) * [Doc] fix print issue in tutorial (#4459) * [Example][Refactor] Refactor RGCN example (#4327) * Refactor full graph entity classification * Refactor rgcn with sampling * README update * Update * Results update * Respect default setting of self_loop=false in entity.py * Update * Update README * Update for multi-gpu * Update * [doc] fix invalid link in user guide (#4468) * [Example] directional_GSN for ogbg-molpcba (#4405) * version-1 * version-2 * version-3 * update examples/README * Update .gitignore * update performance in README, delete scripts * 1st approving review * 2nd approving review Co-authored-by: Mufei Li <mufeili1996@gmail.com> * Clarify the message name, which is 'm'. (#4462) Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal> Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com> * [Refactor] Auto fix view.py. (#4461) Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal> Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com> * [Example] SEAL for OGBL (#4291) * [Example] SEAL for OGBL * update index * update * fix readme typo * add seal sampler * modify set ops * prefetch * efficiency test * update * optimize * fix ScatterAdd dtype issue * update sampler style * update Co-authored-by: Quan Gan <coin2028@hotmail.com> * [CI] use https instead of http (#4488) * [BugFix] fix crash due to incorrect dtype in dgl.to_block() (#4487) * [BugFix] fix crash due to incorrect dtype in dgl.to_block() * fix test failure in TF * [Feature] Make TensorAdapter Stream Aware (#4472) * Allocate tensors in DGL's current stream * make tensoradaptor stream-aware * replace TAemtpy with cpu allocator * fix typo * try fix cpu allocation * clean header * redirect AllocDataSpace as well * resolve comments * [Build][Doc] Specify the sphinx version (#4465) Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com> * reformat * reformat * Auto fix update-version * Auto fix setup.py * reformat * reformat Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-29.ap-northeast-1.compute.internal> Co-authored-by: Rhett Ying <85214957+Rhett-Ying@users.noreply.github.com> Co-authored-by: Mufei Li <mufeili1996@gmail.com> Co-authored-by: Ubuntu <ubuntu@ip-172-31-9-26.ap-northeast-1.compute.internal> Co-authored-by: Xin Yao <xiny@nvidia.com> Co-authored-by: Chang Liu <chang.liu@utexas.edu> Co-authored-by: Zhiteng Li <55398076+ZHITENGLI@users.noreply.github.com> Co-authored-by: Minjie Wang <wmjlyjemaine@gmail.com> Co-authored-by: rudongyu <ru_dongyu@outlook.com> Co-authored-by: Quan Gan <coin2028@hotmail.com>
70 行
2.0 KiB
Python
70 行
2.0 KiB
Python
"""
|
|
This is the global script that set the version information of DGL.
|
|
This script runs and update all the locations that related to versions
|
|
List of affected files:
|
|
- dgl-root/python/dgl/_ffi/libinfo.py
|
|
- dgl-root/include/dgl/runtime/c_runtime_api.h
|
|
- dgl-root/conda/dgl/meta.yaml
|
|
"""
|
|
import os
|
|
import re
|
|
# current version
|
|
# We use the version of the incoming release for code
|
|
# that is under development
|
|
__version__ = "0.9" + os.getenv('DGL_PRERELEASE', '')
|
|
print(__version__)
|
|
|
|
# Implementations
|
|
|
|
|
|
def update(file_name, pattern, repl):
|
|
update = []
|
|
hit_counter = 0
|
|
need_update = False
|
|
for l in open(file_name):
|
|
result = re.findall(pattern, l)
|
|
if result:
|
|
assert len(result) == 1
|
|
hit_counter += 1
|
|
if result[0] != repl:
|
|
l = re.sub(pattern, repl, l)
|
|
need_update = True
|
|
print("%s: %s->%s" % (file_name, result[0], repl))
|
|
else:
|
|
print("%s: version is already %s" % (file_name, repl))
|
|
|
|
update.append(l)
|
|
if hit_counter != 1:
|
|
raise RuntimeError("Cannot find version in %s" % file_name)
|
|
|
|
if need_update:
|
|
with open(file_name, "w") as output_file:
|
|
for l in update:
|
|
output_file.write(l)
|
|
|
|
|
|
def main():
|
|
curr_dir = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
|
|
proj_root = os.path.abspath(os.path.join(curr_dir, ".."))
|
|
# python path
|
|
update(os.path.join(proj_root, "python", "dgl", "_ffi", "libinfo.py"),
|
|
r"(?<=__version__ = \")[.0-9a-z]+", __version__)
|
|
# C++ header
|
|
update(
|
|
os.path.join(
|
|
proj_root,
|
|
"include",
|
|
"dgl",
|
|
"runtime",
|
|
"c_runtime_api.h"),
|
|
"(?<=DGL_VERSION \")[.0-9a-z]+",
|
|
__version__)
|
|
# conda
|
|
for path in ["dgl"]:
|
|
update(os.path.join(proj_root, "conda", path, "meta.yaml"),
|
|
"(?<=version: \")[.0-9a-z]+", __version__)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|