Skip to content

Commit 4b10fe6

Browse files
author
huangzhipeng
committed
format
1 parent 54f8b63 commit 4b10fe6

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ import deepwisdom as dw
2020

2121
if __name__ == "__main__":
2222

23-
api_client = dw.Client(appid="your appid", api_key="your api key", secret_key="your secret key")
23+
api_client = dw.Client(appid="your_appid", api_key="your_api_key", secret_key="your_secret_key")
2424
dw.set_client(client=api_client)
2525

26-
train_dataset = dw.Dataset.create(file_path="path to train", stage="train")
26+
train_dataset = dw.Dataset.create(file_path="path_to_train", stage="train")
2727
automl = dw.AutoML.create(dataset=train_dataset, name="sdk-demo", label_col="k", time_col="g")
2828
automl.train()
2929

30-
test_dataset = dw.Dataset.create(file_path="path to test", stage="test")
30+
test_dataset = dw.Dataset.create(file_path="path_to_test", stage="test")
3131
eval_res = automl.evaluate(test_dataset)
3232

3333
service = dw.Deployment.create(project=automl, name="sdk-demo")

docs/examples/dataset.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
```python
66
import deepwisdom as dw
77

8-
# 初始化api客户端, 传入申请的appid, api_key, secret_key
9-
api_client = dw.Client(appid=4, api_key="xx", secret_key="xxx")
10-
dw.set_client(client=api_client)
11-
12-
datasets = dw.Dataset.create(
13-
str_conn='{"host":"xxx","port":"xxx","user":"root","password":"","db":""}', # mysql/hive
14-
cloud_type=0, # 云类型: 0本地, 1Amazon, 2阿里云, 3腾讯云, 4华为云
15-
source=5, # 数据来源: 0本地文件, 1mysql, 2oracle, 3mariadb, 4hdfs, 5hive
16-
chosed_tables='[{"autotables":[{"table_name":"dataset_update_record"},{"table_name":"scene"}]}]' # 选择的table 列表。 autotables代表db,dataset_update_record|scene代表autotable下的两个表,支持多层嵌套
17-
)
8+
if __name__ == "__main__":
9+
# 初始化api客户端, 传入申请的appid, api_key, secret_key
10+
api_client = dw.Client(appid=4, api_key="xx", secret_key="xxx")
11+
dw.set_client(client=api_client)
12+
13+
datasets = dw.Dataset.create(
14+
str_conn='{"host":"xxx","port":"xxx","user":"root","password":"","db":""}', # mysql/hive
15+
cloud_type=0, # 云类型: 0本地, 1Amazon, 2阿里云, 3腾讯云, 4华为云
16+
source=5, # 数据来源: 0本地文件, 1mysql, 2oracle, 3mariadb, 4hdfs, 5hive
17+
chosed_tables='[{"autotables":[{"table_name":"dataset_update_record"},{"table_name":"scene"}]}]' # 选择的table 列表。 autotables代表db,dataset_update_record|scene代表autotable下的两个表,支持多层嵌套
18+
)
1819
```

0 commit comments

Comments
 (0)