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

[Bug] fix extrace_archive default parameter #6333

Merged
merged 1 commit into from
Sep 21, 2023

Conversation

paoxiaode
Copy link
Collaborator

Description

Fix overwrite default parameter in extrace_archive function

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • I've leverage the tools to beautify the python and c++ code.
  • The PR is complete and small, read the Google eng practice (CL equals to PR) to understand more about small PR. In DGL, we consider PRs with less than 200 lines of core code change are small (example, test and documentation could be exempted).

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 14, 2023

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 14, 2023

Commit ID: 0732cb8

Build ID: 1

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

@dgl-bot

@dgl-bot
Copy link
Collaborator

dgl-bot commented Sep 15, 2023

Commit ID: 190f8258541767a523186918c580a7b71c31cc13

Build ID: 2

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@frozenbugs
Copy link
Collaborator

There are many places are using this extract_archive, for those didn't specify the overwrite, please double check whether it is safe to the change.

python/dgl/data/knowledge_graph.py:    extract_archive,
python/dgl/data/knowledge_graph.py:        extract_archive(tgz_path, self.raw_path)
python/dgl/data/movielens.py:    extract_archive,
python/dgl/data/movielens.py:        extract_archive(zip_file_path, self.raw_dir, overwrite=True)
python/dgl/data/qm9_edge.py:from .utils import _get_dgl_url, download, extract_archive
python/dgl/data/gindt.py:    extract_archive,
python/dgl/data/gindt.py:        extract_archive(zip_file_path, self.raw_path)
python/dgl/data/utils.py:    "extract_archive",
python/dgl/data/utils.py:def extract_archive(file, target_dir, overwrite=False):
python/dgl/data/dgl_dataset.py:from .utils import download, extract_archive, get_download_dir, makedirs
python/dgl/data/dgl_dataset.py:            extract_archive(zip_file_path, self.raw_path)
(dgl-dev-gpu-117) ubuntu@ip-172-31-28-63:~/github/dgl$ grep extract_archive -r examples/
examples/pytorch/gcmc/data.py:from dgl.data.utils import download, extract_archive, get_download_dir
examples/pytorch/gcmc/data.py:        extract_archive(zip_file_path, "{}/{}".format(download_dir, name))
examples/pytorch/ggnn/data_utils.py:    extract_archive,
examples/pytorch/ggnn/data_utils.py:        extract_archive(zip_file_path, extract_dir)
examples/pytorch/transformer/dataset/utils.py:        extract_archive("scripts.zip", "scripts")
examples/pytorch/jtnn/jtnn/datautils.py:    extract_archive,
examples/pytorch/jtnn/jtnn/datautils.py:        extract_archive(self.zip_file_path, "{}/jtnn".format(self.dir))
examples/pytorch/ogb/line/reading_data.py:    extract_archive,
examples/pytorch/ogb/line/reading_data.py:        extract_archive(zip_file_path, "{}/{}".format(dir, name))
Binary file examples/pytorch/ogb/deepwalk/__pycache__/reading_data.cpython-37.pyc matches
examples/pytorch/ogb/deepwalk/reading_data.py:    extract_archive,
examples/pytorch/ogb/deepwalk/reading_data.py:        extract_archive(zip_file_path, "{}/{}".format(dir, name))
(dgl-dev-gpu-117) ubuntu@ip-172-31-28-63:~/github/dgl$ grep extract_archive -r tests/
tests/python/common/data/test_utils.py:def test_extract_archive():
tests/python/common/data/test_utils.py:            data.utils.extract_archive(gz_path, dst_dir, overwrite=True)
tests/python/common/data/test_utils.py:            data.utils.extract_archive(tar_path, dst_dir, overwrite=True)
tests/python/common/data/test_utils.py:    test_extract_archive()
Binary file tests/python/common/data/__pycache__/test_data.cpython-37-pytest-7.2.1.pyc matches
Binary file tests/python/common/data/__pycache__/test_utils.cpython-37-pytest-7.2.1.pyc matches
tests/python/common/data/test_data.py:def test_extract_archive():
tests/python/common/data/test_data.py:            data.utils.extract_archive(gz_path, dst_dir, overwrite=True)
tests/python/common/data/test_data.py:            data.utils.extract_archive(tar_path, dst_dir, overwrite=True)

@frozenbugs frozenbugs merged commit 6a9142c into dmlc:master Sep 21, 2023
2 checks passed
peizhou001 pushed a commit to peizhou001/dgl that referenced this pull request Nov 27, 2023
DominikaJedynak pushed a commit to DominikaJedynak/dgl that referenced this pull request Mar 12, 2024
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

Successfully merging this pull request may close these issues.

None yet

3 participants