Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] De-flake doctests #37743

Merged
merged 64 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5984f1e
Rename `"model_state_dict"` to `"model"`
bveeramani Nov 22, 2022
8f58490
Revert "Rename `"model_state_dict"` to `"model"`"
bveeramani Nov 22, 2022
63432eb
Merge remote-tracking branch 'upstream/master'
bveeramani Dec 5, 2022
2c33947
Merge remote-tracking branch 'upstream/master'
bveeramani Dec 6, 2022
89694a0
Merge remote-tracking branch 'upstream/master'
bveeramani Dec 19, 2022
fe60ca3
Merge remote-tracking branch 'upstream/master'
bveeramani Dec 27, 2022
d45ae9a
Merge remote-tracking branch 'upstream/master'
bveeramani Jan 2, 2023
c703dfc
Merge remote-tracking branch 'upstream/master'
bveeramani Jan 6, 2023
81dd25c
Merge remote-tracking branch 'upstream/master'
bveeramani Jan 19, 2023
fba788e
Merge remote-tracking branch 'upstream/master'
bveeramani Jan 24, 2023
de05655
Update annotations.py
bveeramani Jan 26, 2023
fd2ff91
Revert "Update annotations.py"
bveeramani Jan 26, 2023
7c3ac36
Merge remote-tracking branch 'upstream/master'
bveeramani Feb 14, 2023
9c7b546
Merge remote-tracking branch 'upstream/master'
bveeramani Feb 28, 2023
9d7a15f
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 2, 2023
4f02efe
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 2, 2023
46f43d9
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 6, 2023
a644307
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 10, 2023
e5d0bf1
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 20, 2023
fe7286c
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 21, 2023
51b3a09
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 24, 2023
79f8be9
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 28, 2023
53bede6
Merge remote-tracking branch 'upstream/master'
bveeramani Mar 28, 2023
7cec6e3
Merge remote-tracking branch 'upstream/master'
bveeramani Apr 10, 2023
9407930
Merge remote-tracking branch 'upstream/master'
bveeramani Apr 17, 2023
67ae591
Merge remote-tracking branch 'upstream/master'
bveeramani Apr 18, 2023
93414b8
Merge remote-tracking branch 'upstream/master'
bveeramani May 1, 2023
fcfa9a5
Merge remote-tracking branch 'upstream/master'
bveeramani May 2, 2023
fbfe52d
Merge remote-tracking branch 'upstream/master'
bveeramani May 3, 2023
16132de
Merge remote-tracking branch 'upstream/master'
bveeramani May 10, 2023
4302db7
Merge remote-tracking branch 'upstream/master'
bveeramani May 12, 2023
ce56268
Merge remote-tracking branch 'upstream/master'
bveeramani May 15, 2023
7ac7203
Merge remote-tracking branch 'upstream/master'
bveeramani May 16, 2023
cd2d66d
Merge remote-tracking branch 'upstream/master'
bveeramani May 19, 2023
10fe686
Merge remote-tracking branch 'upstream/master'
bveeramani May 24, 2023
5959b7d
Merge remote-tracking branch 'upstream/master'
bveeramani May 25, 2023
3cd76b3
Merge remote-tracking branch 'upstream/master'
bveeramani May 26, 2023
7939f16
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 1, 2023
1ef4712
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 13, 2023
603bf64
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 14, 2023
73dd0fb
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 15, 2023
edd6fa6
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 21, 2023
07aefcf
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 22, 2023
ed021f1
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 26, 2023
f0d61f1
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 29, 2023
40f488f
Merge remote-tracking branch 'upstream/master'
bveeramani Jun 30, 2023
1742f5d
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 3, 2023
d5dc07a
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 5, 2023
b9cbe98
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 7, 2023
7050c96
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 11, 2023
6b658cf
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 11, 2023
a2a8887
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 14, 2023
193b9f4
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 17, 2023
e65c3d5
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 18, 2023
8be7eeb
Merge branch 'master' of https://github.com/ray-project/ray
bveeramani Jul 19, 2023
415ec40
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 21, 2023
2952150
Initial commit
bveeramani Jul 25, 2023
cb9c0c0
Update key-concepts.rst
bveeramani Jul 25, 2023
e0dea08
Update python.bzl
bveeramani Jul 25, 2023
3d41f31
Update tensorflow_checkpoint.py
bveeramani Jul 25, 2023
c6931ac
Merge remote-tracking branch 'upstream/master' into deflake-doctest4
bveeramani Jul 25, 2023
ddd7980
Merge remote-tracking branch 'upstream/master' into deflake-doctest4
bveeramani Jul 25, 2023
f5af84f
Merge remote-tracking branch 'upstream/master'
bveeramani Jul 25, 2023
0ba45e1
Merge branch 'master' into deflake-doctest4
bveeramani Jul 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bazel/python.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def doctest(files, gpu = False, name="doctest", deps=[], srcs=[], data=[], args=
"--doctest-modules",
"--doctest-glob='*.md'",
"-c=$(location //bazel:conftest.py)",
"--disable-warnings",
"-v"
] + args + ["$(location :%s)" % file for file in files],
data = ["//bazel:conftest.py"] + files + data,
Expand Down
5 changes: 3 additions & 2 deletions doc/source/data/key-concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,11 @@ or remote filesystems.

transformed_ds.write_parquet("/tmp/iris")

print(sorted(os.listdir("/tmp/iris")))
print(os.listdir("/tmp/iris"))

.. testoutput::

:options: +MOCK

['..._000000.parquet', '..._000001.parquet']


Expand Down
9 changes: 9 additions & 0 deletions python/ray/data/read_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1635,6 +1635,15 @@ def read_sql(
For examples of reading from larger databases like MySQL and PostgreSQL, see
:ref:`Reading from SQL Databases <reading_sql>`.

.. testcode::
:hide:

import os
try:
os.remove("example.db")
except OSError:
pass

.. testcode::

import sqlite3
Expand Down
16 changes: 11 additions & 5 deletions python/ray/train/tensorflow/tensorflow_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,20 @@ def from_model(
A :py:class:`TensorflowCheckpoint` containing the specified model.

Examples:

.. testcode::

.. testcode::
from ray.train.tensorflow import TensorflowCheckpoint
import tensorflow as tf

from ray.train.tensorflow import TensorflowCheckpoint
import tensorflow as tf
model = tf.keras.applications.resnet.ResNet101()
checkpoint = TensorflowCheckpoint.from_model(model)

.. testoutput::
:options: +MOCK
:hide:

model = tf.keras.applications.resnet.ResNet101()
checkpoint = TensorflowCheckpoint.from_model(model)
... # Model may or may not be downloaded

"""
checkpoint = cls.from_dict(
Expand Down