Repository navigation
Expand file tree
/
Copy pathconf.py
More file actions
136 lines (119 loc) · 3.95 KB
/
Copy pathconf.py
File metadata and controls
136 lines (119 loc) · 3.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import os
import sys
from datetime import datetime
# Add the source directories to Python path
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../sagemaker-core/src'))
sys.path.insert(0, os.path.abspath('../sagemaker-train/src'))
sys.path.insert(0, os.path.abspath('../sagemaker-serve/src'))
sys.path.insert(0, os.path.abspath('../sagemaker-mlops/src'))
project = 'SageMaker Python SDK V3'
copyright = f'{datetime.now().year}, Amazon Web Services'
author = 'Amazon Web Services'
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx',
'myst_nb',
'sphinx_book_theme',
'sphinx_design',
'sphinx_copybutton'
]
templates_path = ['_templates']
# Serve robots.txt at the docs site root. ReadTheDocs serves robots.txt only from
# the default version, so it must live on this V3/default build (not the V2 build).
# It opts the deprecated V2 docs (/en/v2/) out of AI-training crawls. Sphinx copies
# files listed here verbatim into the build root.
html_extra_path = ['robots.txt']
exclude_patterns = [
'_build',
'Thumbs.db',
'.DS_Store',
'sagemaker-core/docs/*',
'sagemaker-core/CHANGELOG.md',
'sagemaker-core/CONTRIBUTING.md',
]
# Suppress specific warnings
suppress_warnings = [
'myst.header', # header level warnings from notebooks
'toc.not_readable', # toctree warnings for symlinked files
'ref.python', # "more than one target found" for duplicate class names
'autosummary', # autosummary import failures for internal modules
]
html_theme = 'sphinx_book_theme'
html_theme_options = {
'repository_url': 'https://github.com/aws/sagemaker-python-sdk',
'use_repository_button': True,
'use_issues_button': True,
'use_edit_page_button': False,
'path_to_docs': 'docs/',
'show_navbar_depth': 2,
'show_toc_level': 2,
'collapse_navbar': True,
'announcement': 'This is V3 documentation. <a href="https://sagemaker.readthedocs.io/en/v2/">View V2 docs</a>',
}
html_static_path = ['_static']
html_css_files = ['custom.css']
html_js_files = ['feedback.js']
html_context = {
'display_github': True,
'github_user': 'aws',
'github_repo': 'sagemaker-python-sdk',
'github_version': 'master',
'conf_py_path': '/docs/',
'version_warning': True,
'version_warning_text': 'This is the V3 documentation. For V2 documentation, visit the legacy docs.',
}
nb_execution_mode = 'off'
nb_execution_allow_errors = True
# Autodoc configuration
autodoc_default_options = {
'members': True,
'undoc-members': True,
'show-inheritance': True,
'private-members': False,
}
# Generate autosummary stubs recursively
autosummary_generate = True
# Suppress internal/implementation modules not intended for users
exclude_patterns += [
'*/telemetry*',
'*/tools*',
'*/container_drivers*',
'*/runtime_environment*',
'*/model_server*',
'*/detector*',
'*/validations*',
'*/image_retriever*',
]
# Modules that fail to import due to runtime dependencies or side effects
autodoc_mock_imports = [
'triton_python_backend_utils',
'sagemaker.serve.model_server.in_process_model_server.app',
'sagemaker.serve.model_server.multi_model_server.inference',
'sagemaker.serve.model_server.tensorflow_serving.inference',
'sagemaker.serve.model_server.torchserve.inference',
'sagemaker.serve.model_server.torchserve.xgboost_inference',
'sagemaker.serve.model_server.triton.model',
# Heavy runtime dependencies — mock to avoid slow/failing imports during doc build
'boto3',
'botocore',
'torch',
'tensorflow',
'sklearn',
'numpy',
'pandas',
'scipy',
'xgboost',
'lightgbm',
'mlflow',
'pyspark',
'transformers',
'datasets',
'trl',
]
suppress_warnings = ['autodoc.import_error']
# Speed up builds: only regenerate autosummary stubs if they don't exist
autosummary_generate_overwrite = False