Skip to content

Commit

Permalink
Refine docs: unify file name in en and zh_CN
Browse files Browse the repository at this point in the history
  • Loading branch information
Seventeen17 committed Sep 3, 2021
1 parent b788832 commit 0f5c454
Show file tree
Hide file tree
Showing 57 changed files with 65 additions and 65 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Graph-Learn provides Python and C++ interfaces for graph sampling operations, an
pip install graph-learn
```

2. [Build from source](docs/en/install_en.md)
2. [Build from source](docs/en/install.md)

3. Use Docker

Expand Down
2 changes: 1 addition & 1 deletion README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Graph-Learn提供了图采样操作的Python和C++接口,并且提供了一个
pip install graph-learn
```

2. [从源码编译](docs/zh_CN/install_cn.md)
2. [从源码编译](docs/zh_CN/install.md)

3. 使用Docker

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/en/algo/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ GNN Models
:maxdepth: 2
:caption: Contents:

gnn_programming_model_en
gnn_programming_model
tf/index
torch/index
12 changes: 6 additions & 6 deletions docs/en/algo/tf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Tensorflow
:maxdepth: 2
:caption: Contents:

tf_data_layer_en
tf_model_layer_en
tf_loss_en
tf_config_en
tf_model_example_en
tf_data_layer
tf_model_layer
tf_loss
tf_config
tf_model_example
k8s
tf_custom_model_tutorial_en
tf_custom_model_tutorial
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/en/algo/torch/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ PyTorch
:maxdepth: 2
:caption: Contents:

torch_custom_model_tutorial_en
torch_custom_model_tutorial
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ src_id:int64 dst_id:int64 weight:float feature:string
0 9 0.097545 yellow:0:s2:10:0.1:0.5
```

<br />With a local file as the data source, you can use the file path directly in the script. See the next chapter "[graph object](graph_object_en.md)" for details. <br />
<br />With a local file as the data source, you can use the file path directly in the script. See the next chapter "[graph object](graph_object.md)" for details. <br />


## User API
Expand Down Expand Up @@ -289,7 +289,7 @@ user_node_decoder = gl.Decoder(attr_types=["float", "float", "float"])
edge_decoder = gl.Decoder(weighted=True)
```
<br />After constructing Decoder for each data source, add the data source to the graph and specify the corresponding Decoder, see [graph object](graph_object_en.md) for details.
<br />After constructing Decoder for each data source, add the data source to the graph and specify the corresponding Decoder, see [graph object](graph_object.md) for details.
### Decoder and NN models combined
#### attr_types, attr_dims
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ GL currently has support for the following sampling strategies, corresponding to
| random | random_with_replacement |
| topk | Return the neighbors with edge weight topK, if there are not enough neighbors, refer to the padding rule.
| in_degree | Probability sampling by vertex degree.
| full | Returns all neighbors, the expand_factor parameter does not work, the result object is SparseNodes or SparseEdges, see "[graph query](graph_query_en.md)" for the object description.
| full | Returns all neighbors, the expand_factor parameter does not work, the result object is SparseNodes or SparseEdges, see "[graph query](graph_query.md)" for the object description.


<br />Padding rules: When there is not enough data for the sampling request, the returned result needs to be filled in some way. By default, `default_neighbor_id` is used to fill in the insufficient `id`. `default_neighbor_id` defaults to 0 and can be set by `gl.set_default_neighbor_id(xx)`. To loop padding, i.e. to loop existing neighbor ids instead of `default_neighbor_id`, set the padding mode `gl.CIRCULAR`, `gl.set_padding_mode(gl.CIRCULAR)`.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Return:
"""
```

<br />Get specific values such as id, weight, attribute, etc. from `Nodes` object, refer to [API](graph_query_en.md). In GSL, vertex traversal reference `g.V()`. <br />
<br />Get specific values such as id, weight, attribute, etc. from `Nodes` object, refer to [API](graph_query.md). In GSL, vertex traversal reference `g.V()`. <br />

#### Example

Expand Down Expand Up @@ -113,7 +113,7 @@ Return:
"""
```

<br />Get specific values such as id, weight, attribute, etc. from `Edges` object, refer to [API](graph_query_en.md). In GSL, the edge traversal reference is `g.E()`. <br />
<br />Get specific values such as id, weight, attribute, etc. from `Edges` object, refer to [API](graph_query.md). In GSL, the edge traversal reference is `g.E()`. <br />

#### Example<br />

Expand Down
8 changes: 4 additions & 4 deletions docs/en/graph/graph_operator/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Graph Operators
:maxdepth: 2
:caption: Contents:

graph_query_en
graph_traverse_en
graph_sampling_en
negative_sampling_en
graph_query
graph_traverse
graph_sampling
negative_sampling
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The negative sampling operator takes an edge or vertex type as input. When edge

- Define the negative sampling operator by `g.negative_sampler()` to obtain the `NegativeSampler` object `S`.
- call `S.get(ids)`, to get the `Nodes` object.
- call the [interface](graph_query_en.md) of the `Nodes` object to get the specific values.
- call the [interface](graph_query.md) of the `Nodes` object to get the specific values.


```python
Expand Down
2 changes: 1 addition & 1 deletion docs/en/graph/gsl_en.md → docs/en/graph/gsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ The result of GSL execution is an object consisting of all wandering vertices or


### datasets
**graphlearn.Dataset** interface for constructing the result of a Query as a Numpy composed **graphlearn.Nodes**/**graphlearn.Edges** or **graphlearn. Edges** object generator. see the documentation [data_object](data_object_cn.md) for a description of objects such as Nodes.
**graphlearn.Dataset** interface for constructing the result of a Query as a Numpy composed **graphlearn.Nodes**/**graphlearn.Edges** or **graphlearn. Edges** object generator. see the documentation [data_object](data_object.md) for a description of objects such as Nodes.

```python
class Dataset:
Expand Down
10 changes: 5 additions & 5 deletions docs/en/graph/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Graph
:maxdepth: 2
:caption: Contents:

data_loader_en
graph_object_en
data_object_en
graph_operator_en
data_loader
graph_object
data_object
graph_operator
graph_operator/index
gsl_en
gsl
6 changes: 3 additions & 3 deletions docs/en/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Welcome to GraphLearn's documentation!
:caption: Contents:


install_cn
quick_start_cn
install
quick_start
graph/index
algo/index
global_config_cn
global_config
operator
other_source

File renamed without changes.
4 changes: 2 additions & 2 deletions docs/en/other_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ A `Record` contains several columns described by **Schema**.
Each column value may be in type of `Int32`, `Int64`, `Float`, `Double` or `String`.

The raw graph data will be placed in **StructuredAccessFile**s, **GL** will load it and build graph index.
Refer [HERE](graph/data_loader_en.md) for more supported raw data formats.
Refer [HERE](graph/data_loader.md) for more supported raw data formats.

The **GetRecordCount()** interface in file system should return the size in records for a **StructuredAccessFile**.

Expand All @@ -61,4 +61,4 @@ Each file system should has a unique scheme, such as ```hdfs://```.
REGISTER_FILE_SYSTEM("scheme", MyFileSystem);
```
After registration, you can use such a file path when building [Graph](graph/graph_object_en.md).
After registration, you can use such a file path when building [Graph](graph/graph_object.md).
4 changes: 2 additions & 2 deletions docs/en/quick_start_en.md → docs/en/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ git clone https://github.com/alibaba/graph-learn.git
git submodule update --init
```

Refer to [building from source](install_en.md) to build pass.
Refer to [building from source](install.md) to build pass.

### Implement your operator class

Expand Down Expand Up @@ -109,6 +109,6 @@ For example, if a new sampler named **xxxSampler**, you can call it like this:
g.sample(count).by("xxx")...
```

More information about **API** refer to [this](graph/gsl_en.md).
More information about **API** refer to [this](graph/gsl.md).


File renamed without changes.
2 changes: 1 addition & 1 deletion docs/zh_CN/algo/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ GNN模型开发
:maxdepth: 2
:caption: Contents:

gnn_programming_model_cn
gnn_programming_model
tf/index
torch/index
12 changes: 6 additions & 6 deletions docs/zh_CN/algo/tf/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Tensorflow
:maxdepth: 2
:caption: Contents:

tf_data_layer_cn
tf_model_layer_cn
tf_loss_cn
tf_config_cn
tf_model_example_cn
tf_data_layer
tf_model_layer
tf_loss
tf_config
tf_model_example
k8s
tf_custom_model_tutorial_cn
tf_custom_model_tutorial
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/zh_CN/algo/torch/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ PyTorch
:maxdepth: 2
:caption: Contents:

torch_custom_model_tutorial_cn
torch_custom_model_tutorial
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ src_id:int64 dst_id:int64 weight:float feature:string
0 9 0.097545 yellow:0:s2:10:0.1:0.5
```

<br />通过本地文件作为数据源,可以直接在脚本中使用文件路径。详见下一章“[图对象](graph_object_cn.md)”。<br />
<br />通过本地文件作为数据源,可以直接在脚本中使用文件路径。详见下一章“[图对象](graph_object.md)”。<br />

<a name="mzVG6"></a>

Expand Down Expand Up @@ -294,7 +294,7 @@ user_node_decoder = gl.Decoder(attr_types=["float", "float", "float"])
edge_decoder = gl.Decoder(weighted=True)
```
<br />对每一个数据源构建完Decoder之后,在图中加入数据源,并指定对应的Decoder,详见[图对象](graph_object_cn.md) 。
<br />对每一个数据源构建完Decoder之后,在图中加入数据源,并指定对应的Decoder,详见[图对象](graph_object.md) 。
### Decoder和NN模型结合
#### attr_types, attr_dims
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ GL目前已支持以下几种采样策略,对应产生`NeighborSampler`对象
| random_without_replacement | 无放回随机采样,邻居数不够时,参考填充规则 |
| topk | 返回边权重topK的邻居,邻居数不够时,参考填充规则 |
| in_degree | 以顶点入度为概率采样 |
| full | 返回全部的邻居,此时expand_factor参数不起作用,结果对象为SparseNodes或SparseEdges,对象描述详见“[数据查询](graph_query_cn.md#FPU74)|
| full | 返回全部的邻居,此时expand_factor参数不起作用,结果对象为SparseNodes或SparseEdges,对象描述详见“[数据查询](graph_query.md#FPU74)|


<br />填充规则:当采样要求的数据不足时,需要以某种方式填充返回结果。默认情况下,用`default_neighbor_id`填充补齐不足的`id``default_neighbor_id`默认为0,可以通过`gl.set_default_neighbor_id(xx)`来设置。如要循环填充,即循环使用已有邻居id而非`default_neighbor_id`,则设置填充模式`gl.CIRCULAR``gl.set_padding_mode(gl.CIRCULAR)`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Return:
"""
```

<br />通过`Nodes`对象获取具体的值,如id、weight、attribute等,参考[API](graph_query_cn.md)。在GSL中,顶点遍历参考`g.V()`。<br />
<br />通过`Nodes`对象获取具体的值,如id、weight、attribute等,参考[API](graph_query.md)。在GSL中,顶点遍历参考`g.V()`。<br />

<a name="aNB50"></a>
#### 示例
Expand Down Expand Up @@ -117,7 +117,7 @@ Return:
"""
```

<br />通过`Edges`对象获取具体的值,如id、weight、attribute等,参考[API](graph_query_cn.md#FPU74)。在GSL中,边遍历参考`g.E()`。<br />
<br />通过`Edges`对象获取具体的值,如id、weight、attribute等,参考[API](graph_query.md#FPU74)。在GSL中,边遍历参考`g.E()`。<br />

<a name="RVPmZ"></a>
#### 示例<br />
Expand Down
8 changes: 4 additions & 4 deletions docs/zh_CN/graph/graph_operator/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:maxdepth: 2
:caption: Contents:

graph_query_cn
graph_traverse_cn
graph_sampling_cn
negative_sampling_cn
graph_query
graph_traverse
graph_sampling
negative_sampling
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

- 通过`g.negative_sampler()`定义负采样算子,得到`NegativeSampler`对象`S`
- 调用`S.get(ids)`, 得到`Nodes`对象;
- 调用`Nodes`对象的[接口](graph_query_cn.md#FPU74)获取具体的值;
- 调用`Nodes`对象的[接口](graph_query.md#FPU74)获取具体的值;



Expand Down
2 changes: 1 addition & 1 deletion docs/zh_CN/graph/gsl_cn.md → docs/zh_CN/graph/gsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ GSL执行的结果是Query中描述的所有游走的顶点或边构成的对象

### Dataset
**graphlearn.Dataset**接口,用于将Query的结果构造为Numpy组成的**graphlearn.Nodes**/**graphlearn.Edges****graphlearn.SparseNodes**/**graphlearn.Edges**对象的生成器。Nodes等对象描述详见文档 [数据对象](data_object_cn.md)
**graphlearn.Dataset**接口,用于将Query的结果构造为Numpy组成的**graphlearn.Nodes**/**graphlearn.Edges****graphlearn.SparseNodes**/**graphlearn.Edges**对象的生成器。Nodes等对象描述详见文档 [数据对象](data_object.md)

```python
class Dataset:
Expand Down
10 changes: 5 additions & 5 deletions docs/zh_CN/graph/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:maxdepth: 2
:caption: Contents:

data_loader_cn
graph_object_cn
data_object_cn
graph_operator_cn
data_loader
graph_object
data_object
graph_operator
graph_operator/index
gsl_cn
gsl
6 changes: 3 additions & 3 deletions docs/zh_CN/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ Welcome to GraphLearn's documentation!
:caption: Contents:


install_cn
quick_start_cn
install
quick_start
graph/index
algo/index
global_config_cn
global_config
operator
other_source

File renamed without changes.
4 changes: 2 additions & 2 deletions docs/zh_CN/operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ git clone https://github.com/alibaba/graph-learn.git
git submodule update --init
```

Refer to [building from source](install_cn.md) to build pass.
Refer to [building from source](install.md) to build pass.

### Implement your operator class

Expand Down Expand Up @@ -109,6 +109,6 @@ For example, if a new sampler named **xxxSampler**, you can call it like this:
g.sample(count).by("xxx")...
```

More information about **API** refer to [this](graph/gsl_cn.md).
More information about **API** refer to [this](graph/gsl.md).


4 changes: 2 additions & 2 deletions docs/zh_CN/other_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ A `Record` contains several columns described by **Schema**.
Each column value may be in type of `Int32`, `Int64`, `Float`, `Double` or `String`.

The raw graph data will be placed in **StructuredAccessFile**s, **GL** will load it and build graph index.
Refer [HERE](graph/data_loader_cn.md) for more supported raw data formats.
Refer [HERE](graph/data_loader.md) for more supported raw data formats.

The **GetRecordCount()** interface in file system should return the size in records for a **StructuredAccessFile**.

Expand All @@ -61,4 +61,4 @@ Each file system should has a unique scheme, such as ```hdfs://```.
REGISTER_FILE_SYSTEM("scheme", MyFileSystem);
```
After registration, you can use such a file path when building [Graph](graph/graph_object_cn.md).
After registration, you can use such a file path when building [Graph](graph/graph_object.md).
2 changes: 1 addition & 1 deletion docs/zh_CN/quick_start_cn.md → docs/zh_CN/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def load_graph(args):
return g


# 调用.init()进行初始化。这里以单机运行为例,分布式详见[图对象-初始化数据](graph_object_cn.md)。
# 调用.init()进行初始化。这里以单机运行为例,分布式详见[图对象-初始化数据](graph_object.md)。
g.init()
```

Expand Down

0 comments on commit 0f5c454

Please sign in to comment.