Skip to content

Commit 6e1ddbc

Browse files
committed
remove example to fix doctest
Signed-off-by: Timothy Seah <tseah@anyscale.com>
1 parent a744ad0 commit 6e1ddbc

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

python/ray/train/_internal/checkpoint_manager.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,6 @@ def _insert_into_sorted_list(
2828
key: The key function to use to sort the list.
2929
checkpoint_to_report_index: A dictionary mapping checkpoints to report indices.
3030
Used to break ties when scores are equal.
31-
32-
Examples:
33-
34-
>>> list = []
35-
>>> _insert_into_sorted_list(list, {"a": 1, "b": 0}, lambda x: x["a"])
36-
>>> list
37-
[{'a': 1, 'b': 0}]
38-
>>> _insert_into_sorted_list(list, {"a": 3, "b": 1}, lambda x: x["a"])
39-
>>> list
40-
[{'a': 1, 'b': 0}, {'a': 3, 'b': 1}]
41-
>>> _insert_into_sorted_list(list, {"a": 4, "b": 2}, lambda x: x["a"])
42-
>>> list
43-
[{'a': 1, 'b': 0}, {'a': 3, 'b': 1}, {'a': 4, 'b': 2}]
44-
>>> _insert_into_sorted_list(list, {"a": 1, "b": 3}, lambda x: x["a"])
45-
>>> list
46-
[{'a': 1, 'b': 0}, {'a': 1, 'b': 3}, {'a': 3, 'b': 1}, {'a': 4, 'b': 2}]
4731
"""
4832
checkpoint_to_report_index = checkpoint_to_report_index or {}
4933
# TODO: optimize this with sortedlist, batching, etc

0 commit comments

Comments
 (0)