Skip to content

Commit 91cbb26

Browse files
committed
upate
Signed-off-by: Chi Zhang <czhangseu@gmail.com>
1 parent 411155c commit 91cbb26

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/tutorial-check.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ jobs:
3333
python -m pip install --upgrade pip
3434
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
3535
pip install -e ".[yuanrong]"
36-
- name: Run tutorials
36+
pip install nbconvert ipykernel
37+
- name: Run Python tutorials
3738
run: |
3839
export TQ_NUM_THREADS=2
3940
export RAY_DEDUP_LOGS=0
40-
for file in tutorial/*.py; do python3 "$file"; done
41+
for file in tutorial/*.py; do python3 "$file"; done
42+
- name: Run notebook tutorials
43+
run: |
44+
export TQ_NUM_THREADS=2
45+
export RAY_DEDUP_LOGS=0
46+
jupyter nbconvert --to notebook --execute --ExecutePreprocessor.timeout=120 tutorial/basic.ipynb

tests/e2e/test_kv_interface_e2e.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,7 @@ def assert_nested_tensor_equal(nested_a, nested_b, msg=""):
182182
"""Assert two nested (jagged) tensors are equal component-wise."""
183183
components_a = list(nested_a)
184184
components_b = list(nested_b)
185-
assert len(components_a) == len(components_b), (
186-
f"{msg} Length mismatch: {len(components_a)} vs {len(components_b)}"
187-
)
185+
assert len(components_a) == len(components_b), f"{msg} Length mismatch: {len(components_a)} vs {len(components_b)}"
188186
for i, (a, b) in enumerate(zip(components_a, components_b, strict=True)):
189187
assert torch.equal(a, b), f"{msg} Component {i} not equal: {a} vs {b}"
190188

@@ -529,7 +527,6 @@ def test_kv_batch_put_returns_cumulative_fields(self, controller, tq_api):
529527
class TestKVGetE2E:
530528
"""End-to-end tests for kv_batch_get functionality."""
531529

532-
533530
def test_kv_batch_get_nested_tensor(self, controller, tq_api):
534531
partition_id = "test_partition"
535532
keys = []
@@ -548,7 +545,6 @@ def test_kv_batch_get_nested_tensor(self, controller, tq_api):
548545
assert_nested_tensor_equal(retrieved["data"], torch.nested.as_nested_tensor(data_list, layout=torch.jagged))
549546
tq_api.kv_clear(keys=keys, partition_id=partition_id)
550547

551-
552548
def test_kv_batch_get_single_key(self, controller, tq_api):
553549
"""Test getting data for a single key."""
554550
partition_id = "test_partition"

0 commit comments

Comments
 (0)