Unverified Commit c23a61bd authored by Jinjing Zhou's avatar Jinjing Zhou Committed by GitHub
Browse files

fix s3 link (#1310)

parent 349a48bd
......@@ -48,11 +48,11 @@ DGL-KE provides five knowledge graphs:
| Dataset | #nodes | #edges | #relations |
|---------|--------|--------|------------|
| [FB15k](https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/FB15k.zip) | 14951 | 592213 | 1345 |
| [FB15k-237](https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/FB15k-237.zip) | 14541 | 310116 | 237 |
| [wn18](https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/wn18.zip) | 40943 | 151442 | 18 |
| [wn18rr](https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/wn18rr.zip) | 40943 | 93003 | 11 |
| [Freebase](https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/Freebase.zip) | 86054151 | 338586276 | 14824 |
| [FB15k](https://data.dgl.ai/dataset/FB15k.zip) | 14951 | 592213 | 1345 |
| [FB15k-237](https://data.dgl.ai/dataset/FB15k-237.zip) | 14541 | 310116 | 237 |
| [wn18](https://data.dgl.ai/dataset/wn18.zip) | 40943 | 151442 | 18 |
| [wn18rr](https://data.dgl.ai/dataset/wn18rr.zip) | 40943 | 93003 | 11 |
| [Freebase](https://data.dgl.ai/dataset/Freebase.zip) | 86054151 | 338586276 | 14824 |
Users can specify one of the datasets with `--dataset` in `train.py` and `eval.py`.
......
......@@ -38,7 +38,7 @@ class KGDataset1:
The triples are stored as 'head_name\trelation_name\ttail_name'.
'''
def __init__(self, path, name, read_triple=True, only_train=False):
url = 'https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/{}.zip'.format(name)
url = 'https://data.dgl.ai/dataset/{}.zip'.format(name)
if not os.path.exists(os.path.join(path, name)):
print('File not found. Downloading from', url)
......@@ -105,7 +105,7 @@ class KGDataset2:
The triples are stored as 'head_nid\trelation_id\ttail_nid'.
'''
def __init__(self, path, name, read_triple=True, only_train=False):
url = 'https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/{}.zip'.format(name)
url = 'https://data.dgl.ai/dataset/{}.zip'.format(name)
if not os.path.exists(os.path.join(path, name)):
print('File not found. Downloading from', url)
......
......@@ -17,12 +17,12 @@ docker build -t dgl-lint -f Dockerfile.ci_lint .
### CPU image for kg
```bash
wget https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/FB15k.zip -P install/
wget https://data.dgl.ai/dataset/FB15k.zip -P install/
docker build -t dgl-cpu:torch-1.2.0 -f Dockerfile.ci_cpu_torch_1.2.0 .
```
### GPU image for kg
```bash
wget https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/FB15k.zip -P install/
wget https://data.dgl.ai/dataset/FB15k.zip -P install/
docker build -t dgl-gpu:torch-1.2.0 -f Dockerfile.ci_gpu_torch_1.2.0 .
```
......@@ -39,6 +39,6 @@ We repeat the experiment five times.
### Examples
We also provide the output of our implementation on test set together with the reference text.
- [GraphWriter's output](https://s3.us-east-2.amazonaws.com/dgl.ai/models/graphwriter/tmp_pred.txt)
- [Reference text](https://s3.us-east-2.amazonaws.com/dgl.ai/models/graphwriter/tmp_gold.txt)
- [GraphWriter's output](https://data.dgl.ai/models/graphwriter/tmp_pred.txt)
- [Reference text](https://data.dgl.ai/models/graphwriter/tmp_gold.txt)
wget https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/AGENDA.tar.gz
wget https://data.dgl.ai/dataset/AGENDA.tar.gz
mkdir data
tar -C data/ -xvzf AGENDA.tar.gz
......@@ -24,7 +24,7 @@ class AminerDataset(object):
"""
def __init__(self, path):
self.url = 'https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/aminer.zip'
self.url = 'https://data.dgl.ai/dataset/aminer.zip'
if not os.path.exists(os.path.join(path, 'aminer.txt')):
print('File not found. Downloading from', self.url)
......
......@@ -124,11 +124,11 @@ directory, with three statistics logged in `generation_stats.txt` under `eval_re
We also provide a jupyter notebook where you can visualize the generated molecules
![](https://s3.us-east-2.amazonaws.com/dgl.ai/model_zoo/drug_discovery/dgmg/DGMG_ZINC_canonical_vis.png)
![](https://data.dgl.ai/model_zoo/drug_discovery/dgmg/DGMG_ZINC_canonical_vis.png)
and compare their property distributions against the training molecule property distributions
![](https://s3.us-east-2.amazonaws.com/dgl.ai/model_zoo/drug_discovery/dgmg/DGMG_ZINC_canonical_dist.png)
![](https://data.dgl.ai/model_zoo/drug_discovery/dgmg/DGMG_ZINC_canonical_dist.png)
You can download the notebook with `wget https://data.dgl.ai/dgllife/dgmg/eval_jupyter.ipynb`.
......
......@@ -111,9 +111,9 @@ on the training and validation set for reference.
[8] visualizes the weights of atoms in readout for possible interpretations like the figure below.
We provide a jupyter notebook for performing the visualization and you can download it with
`wget https://s3.us-east-2.amazonaws.com/dgl.ai/model_zoo/drug_discovery/AttentiveFP/atom_weight_visualization.ipynb`.
`wget https://data.dgl.ai/model_zoo/drug_discovery/AttentiveFP/atom_weight_visualization.ipynb`.
![](https://s3.us-west-2.amazonaws.com/dgl-data/dgllife/attentive_fp_vis_example.png)
![](https://data.dgl.ai/dgllife/attentive_fp_vis_example.png)
## Dataset Customization
......
......@@ -28,7 +28,7 @@ data_filename = 'modelnet40-sampled-2048.h5'
local_path = args.dataset_path or os.path.join(get_download_dir(), data_filename)
if not os.path.exists(local_path):
download('https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/modelnet40-sampled-2048.h5', local_path)
download('https://data.dgl.ai/dataset/modelnet40-sampled-2048.h5', local_path)
CustomDataLoader = partial(
DataLoader,
......
......@@ -4,7 +4,7 @@ NOTE: this version is not using NodeFlow yet.
This example only work with Python 3.6+
First, download and extract from https://dgl.ai.s3.us-east-2.amazonaws.com/dataset/ml-1m.tar.gz
First, download and extract from https://data.dgl.ai/dataset/ml-1m.tar.gz
One can then run the following to train PinSage on MovieLens-1M:
......
......@@ -56,7 +56,7 @@ class ListDataset(Dataset):
def _get_sudoku_dataset(segment='train'):
assert segment in ['train', 'valid', 'test']
url = "https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/sudoku-hard.zip"
url = "https://data.dgl.ai/dataset/sudoku-hard.zip"
zip_fname = "/tmp/sudoku-hard.zip"
dest_dir = '/tmp/sudoku-hard/'
......
......@@ -20,7 +20,7 @@ def solve_sudoku(puzzle):
model_filename = os.path.join(model_path, 'rrn-sudoku.pkl')
if not os.path.exists(model_filename):
print('Downloading model...')
url = 'https://s3.us-east-2.amazonaws.com/dgl.ai/models/rrn-sudoku.pkl'
url = 'https://data.dgl.ai/models/rrn-sudoku.pkl'
urllib.request.urlretrieve(url, model_filename)
model = torch.load(model_filename, map_location='cpu')
......
......@@ -4,8 +4,8 @@ import os
from dgl.data.utils import *
_urls = {
'wmt': 'https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/wmt14bpe_de_en.zip',
'scripts': 'https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/transformer_scripts.zip',
'wmt': 'https://data.dgl.ai/dataset/wmt14bpe_de_en.zip',
'scripts': 'https://data.dgl.ai/dataset/transformer_scripts.zip',
}
def prepare_dataset(dataset_name):
......
......@@ -224,7 +224,7 @@ class NeighborSampler(NodeFlowSampler):
layer :math:`i+1` are in layer :math:`i`. All the edges are from nodes
in layer :math:`i` to layer :math:`i+1`.
.. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/sampling/NodeFlow.png
.. image:: https://data.dgl.ai/tutorial/sampling/NodeFlow.png
As an analogy to mini-batch training, the ``batch_size`` here is equal to the number
of the initial seed nodes (number of nodes in the last layer).
......
......@@ -82,7 +82,7 @@ class NodeFlow(DGLBaseGraph):
We store extra information, such as the node and edge mapping from
the NodeFlow graph to the parent graph.
.. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/api/sampling.nodeflow.png
.. image:: https://data.dgl.ai/api/sampling.nodeflow.png
DO NOT create NodeFlow object directly. Use sampling method to
generate NodeFlow instead.
......
......@@ -32,7 +32,7 @@ At the end of this tutorial, we hope you get a brief feeling of how DGL works.
# 33). The network is visualized as follows with the color indicating the
# community:
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/img/karate-club.png
# .. image:: https://data.dgl.ai/tutorial/img/karate-club.png
# :align: center
#
# The task is to predict which side (0 or 33) each member tends to join given
......@@ -135,7 +135,7 @@ print(G.nodes[[10, 11]].data['feat'])
# node will update its own feature with information sent from neighboring
# nodes. A graphical demonstration is displayed below.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/1_first/mailbox.png
# .. image:: https://data.dgl.ai/tutorial/1_first/mailbox.png
# :alt: mailbox
# :align: center
#
......@@ -266,7 +266,7 @@ draw(0) # draw the prediction of the first epoch
plt.close()
###############################################################################
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/1_first/karate0.png
# .. image:: https://data.dgl.ai/tutorial/1_first/karate0.png
# :height: 300px
# :width: 400px
# :align: center
......@@ -278,7 +278,7 @@ plt.close()
ani = animation.FuncAnimation(fig, draw, frames=len(all_logits), interval=200)
###############################################################################
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/1_first/karate.gif
# .. image:: https://data.dgl.ai/tutorial/1_first/karate.gif
# :height: 300px
# :width: 400px
# :align: center
......
......@@ -30,7 +30,7 @@ networks to this problem has been a popular approach recently. This can be seen
# In this tutorial, you learn how to perform batched graph classification
# with DGL. The example task objective is to classify eight types of topologies shown here.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/batch/dataset_overview.png
# .. image:: https://data.dgl.ai/tutorial/batch/dataset_overview.png
# :align: center
#
# Implement a synthetic dataset :class:`data.MiniGCDataset` in DGL. The dataset has eight
......@@ -64,7 +64,7 @@ plt.show()
# a batch of graphs can be viewed as a large graph that has many disjointed
# connected components. Below is a visualization that gives the general idea.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/batch/batch.png
# .. image:: https://data.dgl.ai/tutorial/batch/batch.png
# :width: 400pt
# :align: center
#
......@@ -91,7 +91,7 @@ def collate(samples):
# ----------------
# Graph classification proceeds as follows.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/batch/graph_classifier.png
# .. image:: https://data.dgl.ai/tutorial/batch/graph_classifier.png
#
# From a batch of graphs, perform message passing and graph convolution
# for nodes to communicate with others. After message passing, compute a
......@@ -254,16 +254,16 @@ print('Accuracy of argmax predictions on the test set: {:4f}%'.format(
###############################################################################
# The animation here plots the probability that a trained model predicts the correct graph type.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/batch/test_eval4.gif
# .. image:: https://data.dgl.ai/tutorial/batch/test_eval4.gif
#
# To understand the node and graph representations that a trained model learned,
# we use `t-SNE, <https://lvdmaaten.github.io/tsne/>`_ for dimensionality reduction
# and visualization.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/batch/tsne_node2.png
# .. image:: https://data.dgl.ai/tutorial/batch/tsne_node2.png
# :align: center
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/batch/tsne_graph2.png
# .. image:: https://data.dgl.ai/tutorial/batch/tsne_graph2.png
# :align: center
#
# The two small figures on the top separately visualize node representations after one and two
......
......@@ -46,7 +46,7 @@ using the heterograph class and its associated API.
# The following diagram shows several entities in the ACM dataset and the relationships among them
# (taken from `Shi et al., 2015 <https://arxiv.org/pdf/1511.04854.pdf>`_).
#
# .. figure:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/hetero/acm-example.png#
# .. figure:: https://data.dgl.ai/tutorial/hetero/acm-example.png#
#
# This graph has three types of entities that correspond to papers, authors, and publication venues.
# It also contains three types of edges that connect the following:
......@@ -70,7 +70,7 @@ using the heterograph class and its associated API.
# marked with a rating, then each rating value could correspond to a different edge type.
# The following diagram shows an example of user-item interactions as a heterograph.
#
# .. figure:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/hetero/recsys-example.png
# .. figure:: https://data.dgl.ai/tutorial/hetero/recsys-example.png
#
#
# Knowledge graph
......@@ -81,7 +81,7 @@ using the heterograph class and its associated API.
# occupation (item P106) is politician (item Q82955). The relationships are shown in the following.
# diagram.
#
# .. figure:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/hetero/kg-example.png
# .. figure:: https://data.dgl.ai/tutorial/hetero/kg-example.png
#
###############################################################################
......@@ -144,7 +144,7 @@ ratings = dgl.heterograph(
import scipy.io
import urllib.request
data_url = 'https://s3.us-east-2.amazonaws.com/dgl.ai/dataset/ACM.mat'
data_url = 'https://data.dgl.ai/dataset/ACM.mat'
data_file_path = '/tmp/ACM.mat'
urllib.request.urlretrieve(data_url, data_file_path)
......
......@@ -567,6 +567,6 @@ for i in range(n_epochs):
#
# For full examples, see `Benchmark SSE on multi-GPUs <https://github.com/dmlc/dgl/tree/master/examples/mxnet/sse>`_ on Github.
#
# .. |image0| image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/img/floodfill-paths.gif
# .. |image1| image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/img/neighbor-sampling.gif
# .. |image2| image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/img/sse.gif
# .. |image0| image:: https://data.dgl.ai/tutorial/img/floodfill-paths.gif
# .. |image1| image:: https://data.dgl.ai/tutorial/img/neighbor-sampling.gif
# .. |image2| image:: https://data.dgl.ai/tutorial/img/sse.gif
......@@ -55,7 +55,7 @@ structure-free normalization, in the style of attention.
# embedding :math:`h_i^{(l+1)}` of layer :math:`l+1` from the embeddings of
# layer :math:`l`.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/gat.png
# .. image:: https://data.dgl.ai/tutorial/gat/gat.png
# :width: 450px
# :align: center
#
......@@ -355,7 +355,7 @@ for epoch in range(30):
# to their labels, whereas the edges are colored according to the magnitude of
# the attention weights, which can be referred with the colorbar on the right.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/cora-attention.png
# .. image:: https://data.dgl.ai/tutorial/gat/cora-attention.png
# :width: 600px
# :align: center
#
......@@ -383,7 +383,7 @@ for epoch in range(30):
#
# As a reference, here is the histogram if all the nodes have uniform attention weight distribution.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/cora-attention-uniform-hist.png
# .. image:: https://data.dgl.ai/tutorial/gat/cora-attention-uniform-hist.png
# :width: 250px
# :align: center
#
......@@ -453,7 +453,7 @@ for epoch in range(30):
# learning curves of GAT and GCN are presented below; what is evident is the
# dramatic performance adavantage of GAT over GCN.
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/ppi-curve.png
# .. image:: https://data.dgl.ai/tutorial/gat/ppi-curve.png
# :width: 300px
# :align: center
#
......@@ -475,7 +475,7 @@ for epoch in range(30):
#
# Again, comparing with uniform distribution:
#
# .. image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/ppi-uniform-hist.png
# .. image:: https://data.dgl.ai/tutorial/gat/ppi-uniform-hist.png
# :width: 250px
# :align: center
#
......@@ -502,7 +502,7 @@ for epoch in range(30):
# * See the optimized `full example <https://github.com/dmlc/dgl/blob/master/examples/pytorch/gat/gat.py>`_.
# * The next tutorial describes how to speedup GAT models by parallelizing multiple attention heads and SPMV optimization.
#
# .. |image2| image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/cora-attention-hist.png
# .. |image5| image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/ppi-first-layer-hist.png
# .. |image6| image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/ppi-second-layer-hist.png
# .. |image7| image:: https://s3.us-east-2.amazonaws.com/dgl.ai/tutorial/gat/ppi-final-layer-hist.png
# .. |image2| image:: https://data.dgl.ai/tutorial/gat/cora-attention-hist.png
# .. |image5| image:: https://data.dgl.ai/tutorial/gat/ppi-first-layer-hist.png
# .. |image6| image:: https://data.dgl.ai/tutorial/gat/ppi-second-layer-hist.png
# .. |image7| image:: https://data.dgl.ai/tutorial/gat/ppi-final-layer-hist.png
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment