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

add document detail #518

Merged
merged 19 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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参数),如下:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原始特征值乘上一个可学习embedding参数: 这种怎么操作呢?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
这个就是原来文档里提供的方式,但没有提供不转embedding的方式

现在我分成两个case写了


.. 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芯片的MacBook上必须使用TensorFlow 2.5或更高版本**。

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_robability`包。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要根据tensorflow的版本安装对应版本的tensorflow_probability包。
robability 少了一个p

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已修复


常见版本对应关系:

| 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
Loading