Skip to content

Commit d3b5c4e

Browse files
Lifannrhdong
authored andcommitted
Add hyperlink to RedisBackend config doc
1 parent 194b72a commit d3b5c4e

File tree

1 file changed

+39
-38
lines changed

1 file changed

+39
-38
lines changed

tensorflow_recommenders_addons/dynamic_embedding/python/ops/dynamic_embedding_creator.py

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -112,44 +112,45 @@ def get_config(self):
112112

113113
class RedisTableConfig(object):
114114
"""
115-
RedisTableConfig config json file for connecting Redis service and
116-
assign the embedding table starage properties.
117-
An example of a configuration file is shown below:
118-
""
119-
{
120-
"redis_connection_mode": 1,
121-
"redis_master_name": "master",
122-
"redis_host_ip": [
123-
"127.0.0.1"
124-
],
125-
"redis_host_port": 6379,
126-
"redis_user": "default",
127-
"redis_password": "",
128-
"redis_db": 0,
129-
"redis_read_access_slave": False,
130-
"redis_connect_keep_alive": False,
131-
"redis_connect_timeout": 1000,
132-
"redis_socket_timeout": 1000,
133-
"redis_conn_pool_size": 20,
134-
"redis_wait_timeout": 100000000,
135-
"redis_connection_lifetime": 100,
136-
"redis_sentinel_connect_timeout": 1000,
137-
"redis_sentinel_socket_timeout": 1000,
138-
"storage_slice_import": 1,
139-
"storage_slice": 1,
140-
"keys_sending_size": 1024,
141-
"using_md5_prefix_name": False,
142-
"model_tag_import": "test",
143-
"redis_hash_tags_import": [],
144-
"model_tag_runtime": "test",
145-
"redis_hash_tags_runtime": [],
146-
"expire_model_tag_in_seconds": 604800,
147-
"table_store_mode": 1,
148-
"model_lib_abs_dir": "/tmp/"
149-
}
150-
""
151-
Refer to the default_redis_params variable in RedisTable class
152-
for the description of the JSON configuration file
115+
RedisTableConfig config json file for connecting Redis service and
116+
assign the embedding table starage properties.
117+
An example of a configuration file is shown below:
118+
```python
119+
{
120+
"redis_connection_mode": 1,
121+
"redis_master_name": "master",
122+
"redis_host_ip": [
123+
"127.0.0.1"
124+
],
125+
"redis_host_port": 6379,
126+
"redis_user": "default",
127+
"redis_password": "",
128+
"redis_db": 0,
129+
"redis_read_access_slave": False,
130+
"redis_connect_keep_alive": False,
131+
"redis_connect_timeout": 1000,
132+
"redis_socket_timeout": 1000,
133+
"redis_conn_pool_size": 20,
134+
"redis_wait_timeout": 100000000,
135+
"redis_connection_lifetime": 100,
136+
"redis_sentinel_connect_timeout": 1000,
137+
"redis_sentinel_socket_timeout": 1000,
138+
"storage_slice_import": 1,
139+
"storage_slice": 1,
140+
"keys_sending_size": 1024,
141+
"using_md5_prefix_name": False,
142+
"model_tag_import": "test",
143+
"redis_hash_tags_import": [],
144+
"model_tag_runtime": "test",
145+
"redis_hash_tags_runtime": [],
146+
"expire_model_tag_in_seconds": 604800,
147+
"table_store_mode": 1,
148+
"model_lib_abs_dir": "/tmp/"
149+
}
150+
```
151+
Refer to the [Redis table config guide](https://github.com/tensorflow/recommenders-addons/blob/master/docs/api_docs/tfra/dynamic_embedding/RedisBackend.md)
152+
and default_redis_params variable in RedisTable class
153+
to learn the description of the JSON configuration file
153154
"""
154155

155156
def __init__(

0 commit comments

Comments
 (0)