Skip to content

Commit 991a8d5

Browse files
author
Yingda Chen
committed
change token name
1 parent 92717fa commit 991a8d5

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

cookbook/client/tinker/lora.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# - base_url: the address of the running server
2020
# - api_key: authentication token (loaded from environment variable)
2121
service_client = init_tinker_compat_client(
22-
base_url='http://www.modelscope.cn/twinkle', api_key=os.environ.get('MODELSCOPE_SDK_TOKEN'))
22+
base_url='http://www.modelscope.cn/twinkle', api_key=os.environ.get('MODELSCOPE_TOKEN'))
2323

2424
# Step 3: List models available on the server to verify the connection
2525
print('Available models:')

cookbook/client/tinker/sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
base_model = 'Qwen/Qwen3-30B-A3B-Instruct-2507'
1515
service_client = init_tinker_compat_client(
1616
base_url='http://www.modelscope.cn/twinkle',
17-
api_key=os.environ.get('MODELSCOPE_SDK_TOKEN')
17+
api_key=os.environ.get('MODELSCOPE_TOKEN')
1818
)
1919
# Step 2: Create a sampling client by loading weights from a saved checkpoint.
2020
# The model_path is a twinkle:// URI pointing to a previously saved LoRA checkpoint.

cookbook/client/tinker/self_congnition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def train():
4444

4545
# Connect to the Twinkle server running locally
4646
service_client = init_tinker_compat_client(
47-
base_url='http://www.modelscope.cn/twinkle', api_key=os.environ.get('MODELSCOPE_SDK_TOKEN'))
47+
base_url='http://www.modelscope.cn/twinkle', api_key=os.environ.get('MODELSCOPE_TOKEN'))
4848

4949
# Create a LoRA training client for the base model (rank=16 for the LoRA adapter)
5050
training_client = service_client.create_lora_training_client(base_model=base_model, rank=16)

cookbook/client/tinker/short_math_grpo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def main():
216216
# Step 2: Initialize the Tinker-compatible client
217217
logger.info('Connecting to Tinker server...')
218218
service_client = init_tinker_compat_client(
219-
base_url='http://www.modelscope.cn/twinkle', api_key=os.environ.get('MODELSCOPE_SDK_TOKEN'))
219+
base_url='http://www.modelscope.cn/twinkle', api_key=os.environ.get('MODELSCOPE_TOKEN'))
220220

221221
logger.info('Creating LoRA training client...')
222222
# Create a LoRA training client for GRPO

cookbook/client/twinkle/grpo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def train():
7575
# Step 1: Initialize the Twinkle client
7676
client = init_twinkle_client(
7777
base_url='http://127.0.0.1:8000',
78-
api_key=os.environ.get('MODELSCOPE_SDK_TOKEN'),
78+
api_key=os.environ.get('MODELSCOPE_TOKEN'),
7979
)
8080

8181
# Step 2: Prepare dataset and dataloader

cookbook/client/twinkle/sample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def sample():
3636
# Step 2: Initialize the Twinkle client to communicate with the remote server.
3737
client = init_twinkle_client(
3838
base_url='http://127.0.0.1:8000',
39-
api_key=os.environ.get('MODELSCOPE_SDK_TOKEN'),
39+
api_key=os.environ.get('MODELSCOPE_TOKEN'),
4040
)
4141

4242
# Step 3: Create the sampler client pointing to the model on the server

cookbook/client/twinkle/self_congnition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Step 2: Initialize the Twinkle client to communicate with the remote server.
2727
# - base_url: the address of the running Twinkle server
2828
# - api_key: authentication token (loaded from environment variable)
29-
client = init_twinkle_client(base_url='http://127.0.0.1:8000', api_key=os.environ.get('MODELSCOPE_SDK_TOKEN'))
29+
client = init_twinkle_client(base_url='http://127.0.0.1:8000', api_key=os.environ.get('MODELSCOPE_TOKEN'))
3030

3131
# Step 3: Query the server for existing training runs and their checkpoints.
3232
# This is useful for resuming a previous training session.

docs/source_en/Usage Guide/Server and Client/Tinker-Compatible-Client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ from twinkle_client import init_tinker_compat_client
4545
# Step 1: Initialize client (automatically patches Tinker SDK)
4646
service_client = init_tinker_compat_client(
4747
base_url='http://localhost:8000',
48-
api_key=os.environ.get('MODELSCOPE_SDK_TOKEN')
48+
api_key=os.environ.get('MODELSCOPE_TOKEN')
4949
)
5050

5151
# Step 2: Query existing training runs (optional)

docs/source_en/Usage Guide/Server and Client/Twinkle-Client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ logger = get_logger()
7676
# Step 1: Initialize client
7777
client = init_twinkle_client(
7878
base_url='http://127.0.0.1:8000',
79-
api_key=os.environ.get('MODELSCOPE_SDK_TOKEN')
79+
api_key=os.environ.get('MODELSCOPE_TOKEN')
8080
)
8181

8282
# Step 2: Query existing training runs (optional, for resuming training)

docs/source_zh/使用指引/服务端和客户端/Tinker兼容客户端.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ from twinkle_client import init_tinker_compat_client
4545
# Step 1: 初始化客户端(会自动 patch Tinker SDK)
4646
service_client = init_tinker_compat_client(
4747
base_url='http://localhost:8000',
48-
api_key=os.environ.get('MODELSCOPE_SDK_TOKEN')
48+
api_key=os.environ.get('MODELSCOPE_TOKEN')
4949
)
5050

5151
# Step 2: 查询已有训练运行(可选)

0 commit comments

Comments
 (0)