Skip to content

Commit

Permalink
add document detail (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangxudong authored Jan 17, 2025
1 parent bd9aac8 commit f175907
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 5 deletions.
1 change: 1 addition & 0 deletions docker/Dockerfile_tf210
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN pip3 install -r /EasyRec/requirements/runtime.txt -i http://mirrors.aliyun
RUN pip3 install -r /EasyRec/requirements/extra.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
RUN pip3 install https://easyrec.oss-cn-beijing.aliyuncs.com/3rdparty/graphlearn-1.1.0-cp38-cp38-linux_x86_64.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
# RUN pip3 install http://easyrec.oss-cn-beijing.aliyuncs.com/releases/pai_automl-0.0.1rc1-py3-none-any.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
RUN pip3 install tensorflow_probability==0.18.0
RUN pip3 install https://dlc-task.oss-cn-hangzhou.aliyuncs.com/whl/common_io-0.4.1%2Btunnel-py2.py3-none-any.whl -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
RUN cd /EasyRec && python setup.py install
RUN rm -rf /EasyRec
Expand Down
11 changes: 11 additions & 0 deletions docs/source/feature/feature.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ RawFeature:连续值特征
-DossHost=oss-cn-beijing-internal.aliyuncs.com
-Dwith_evaluator=1;
.. code:: protobuf
feature_config:{
features {
input_names: "ctr"
feature_type: RawFeature
}
}
也可以为每个RawFeature添加一个Field Embedding(原始特征值乘上一个可学习embedding参数),如下:

.. code:: protobuf
feature_config:{
Expand Down
34 changes: 31 additions & 3 deletions docs/source/quick_start/local_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,39 @@

#### 本地Anaconda安装

温馨提示:**在搭载Apple M系列芯片的MacBook上必须使用TensorFlow 2.5或更高版本**,安装方法请查看TF官方文档。

Demo实验中使用的环境为 `python=3.6.8` + `tenserflow=1.12.0`

```bash
conda create -n py36_tf12 python=3.6.8
conda activate py36_tf12
pip install tensorflow==1.12.0
pip install tensorflow_probability==0.5.0
```

注意:必须要安装`tensorflow_probability`包,需要根据tensorflow的版本安装对应版本的`tensorflow_probability`包。

常见版本对应关系:

| TensorFlow版本 | TensorFlowProbability版本 |
|--------------|-------------------------|
| 1.12 | 0.5.0 |
| 1.15 | 0.8.0 |
| 2.5.0 | 0.13.0 |
| 2.6.0 | 0.14.0 |
| 2.7.0 | 0.15.0 |
| 2.8.0 | 0.16.0 |
| 2.10 | 0.18.0 |
| 2.12 | 0.20.0 |

其他版本对应关系请查看链接:[Releases · tensorflow/probability](https://github.com/tensorflow/probability/releases)

```bash
git clone https://github.com/alibaba/EasyRec.git
cd EasyRec
bash scripts/init.sh
python setup.py install

```

#### Docker镜像启动
Expand All @@ -33,13 +52,22 @@ Docker的环境为`python=3.6.9` + `tenserflow=1.15.5`
```bash
git clone https://github.com/alibaba/EasyRec.git
cd EasyRec
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.7.4
docker run -td --network host -v /local_path/EasyRec:/docker_path/EasyRec mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.7.4
docker pull mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.8.5
docker run -td --network host -v /local_path/EasyRec:/docker_path/EasyRec mybigpai-public-registry.cn-beijing.cr.aliyuncs.com/easyrec/easyrec:py36-tf1.15-0.8.5
docker exec -it <CONTAINER_ID> bash
```

##### 方法二:自行构建Docker镜像

我们提供四个版本的tensorflow镜像构建示例,对应的脚本路径如下:

- scripts/build_docker_tf112.sh
- scripts/build_docker_tf115.sh
- scripts/build_docker_tf210.sh
- scripts/build_docker_tf212.sh

默认使用`tensorflow 1.15`的版本,示例脚本如下,请根据需要替换脚本路径:

```bash
git clone https://github.com/alibaba/EasyRec.git
cd EasyRec
Expand Down
4 changes: 2 additions & 2 deletions docs/source/vector_retrieve.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pai -name easy_rec_ext -project algo_public_dev

## 使用示例

### 1. 创建查询表
### 1. 创建索引表

```sql
create table doc_table(pk BIGINT,vector string) partitioned by (pt string);
Expand All @@ -53,7 +53,7 @@ VALUES
;
```

### 2. 创建索引表
### 2. 创建查询表

```sql
create table query_table(pk BIGINT,vector string) partitioned by (pt string);
Expand Down

0 comments on commit f175907

Please sign in to comment.