wandb 0.18.6__py3-none-win_amd64.whl → 0.19.0__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package_readme.md +8 -0
- wandb/__init__.py +5 -7
- wandb/__init__.pyi +51 -30
- wandb/analytics/sentry.py +4 -10
- wandb/apis/importers/internals/internal.py +6 -6
- wandb/apis/importers/internals/protocols.py +11 -7
- wandb/apis/public/api.py +5 -1
- wandb/apis/public/jobs.py +1 -7
- wandb/apis/public/reports.py +6 -17
- wandb/apis/public/runs.py +12 -10
- wandb/bin/gpu_stats.exe +0 -0
- wandb/bin/wandb-core +0 -0
- wandb/cli/cli.py +9 -45
- wandb/env.py +3 -5
- wandb/errors/links.py +1 -1
- wandb/errors/term.py +1 -6
- wandb/filesync/dir_watcher.py +3 -3
- wandb/filesync/step_upload.py +2 -5
- wandb/integration/fastai/__init__.py +1 -6
- wandb/integration/gym/__init__.py +1 -7
- wandb/integration/keras/callbacks/metrics_logger.py +1 -8
- wandb/integration/keras/callbacks/model_checkpoint.py +1 -8
- wandb/integration/keras/keras.py +3 -5
- wandb/integration/lightgbm/__init__.py +1 -1
- wandb/integration/sb3/sb3.py +1 -7
- wandb/integration/sklearn/utils.py +1 -1
- wandb/integration/tensorboard/log.py +1 -2
- wandb/integration/torch/wandb_torch.py +1 -1
- wandb/integration/ultralytics/bbox_utils.py +9 -2
- wandb/jupyter.py +4 -4
- wandb/proto/v3/wandb_internal_pb2.py +31 -31
- wandb/proto/v3/wandb_settings_pb2.py +2 -2
- wandb/proto/v3/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v4/wandb_internal_pb2.py +31 -31
- wandb/proto/v4/wandb_settings_pb2.py +2 -2
- wandb/proto/v4/wandb_telemetry_pb2.py +4 -4
- wandb/proto/v5/wandb_internal_pb2.py +31 -31
- wandb/proto/v5/wandb_settings_pb2.py +2 -2
- wandb/proto/v5/wandb_telemetry_pb2.py +4 -4
- wandb/proto/wandb_deprecated.py +3 -11
- wandb/proto/wandb_generate_deprecated.py +3 -7
- wandb/sdk/artifacts/artifact.py +3 -11
- wandb/sdk/artifacts/artifact_file_cache.py +2 -5
- wandb/sdk/artifacts/artifact_saver.py +2 -6
- wandb/sdk/artifacts/storage_handlers/gcs_handler.py +2 -4
- wandb/sdk/artifacts/storage_handlers/local_file_handler.py +2 -4
- wandb/sdk/artifacts/storage_handlers/s3_handler.py +2 -4
- wandb/sdk/backend/backend.py +1 -1
- wandb/sdk/data_types/base_types/wb_value.py +20 -10
- wandb/sdk/data_types/histogram.py +1 -3
- wandb/sdk/data_types/object_3d.py +2 -6
- wandb/sdk/data_types/table.py +1 -1
- wandb/sdk/data_types/utils.py +1 -2
- wandb/sdk/data_types/video.py +15 -4
- wandb/sdk/integration_utils/auto_logging.py +1 -8
- wandb/sdk/interface/interface.py +12 -5
- wandb/sdk/interface/interface_queue.py +0 -6
- wandb/sdk/interface/interface_shared.py +9 -0
- wandb/sdk/interface/router.py +1 -2
- wandb/sdk/interface/router_queue.py +0 -3
- wandb/sdk/interface/router_relay.py +0 -2
- wandb/sdk/internal/file_stream.py +1 -4
- wandb/sdk/internal/flow_control.py +1 -1
- wandb/sdk/internal/handler.py +8 -5
- wandb/sdk/internal/internal.py +3 -17
- wandb/sdk/internal/internal_api.py +3 -10
- wandb/sdk/internal/internal_util.py +0 -3
- wandb/sdk/internal/job_builder.py +20 -12
- wandb/sdk/internal/progress.py +1 -5
- wandb/sdk/internal/sender.py +9 -15
- wandb/sdk/internal/settings_static.py +4 -10
- wandb/sdk/internal/system/assets/cpu.py +2 -2
- wandb/sdk/internal/system/assets/disk.py +3 -3
- wandb/sdk/internal/system/assets/gpu.py +7 -7
- wandb/sdk/internal/system/assets/gpu_amd.py +1 -7
- wandb/sdk/internal/system/assets/interfaces.py +11 -13
- wandb/sdk/internal/system/assets/ipu.py +1 -1
- wandb/sdk/internal/system/assets/memory.py +2 -2
- wandb/sdk/internal/system/assets/open_metrics.py +2 -8
- wandb/sdk/internal/system/assets/trainium.py +3 -9
- wandb/sdk/internal/system/system_info.py +14 -13
- wandb/sdk/internal/system/system_monitor.py +5 -12
- wandb/sdk/internal/tb_watcher.py +1 -1
- wandb/sdk/internal/writer.py +2 -4
- wandb/sdk/launch/__init__.py +2 -1
- wandb/sdk/launch/agent/run_queue_item_file_saver.py +1 -7
- wandb/sdk/launch/create_job.py +2 -3
- wandb/sdk/launch/runner/abstract.py +1 -6
- wandb/sdk/launch/runner/kubernetes_monitor.py +2 -4
- wandb/sdk/lib/apikey.py +2 -6
- wandb/sdk/lib/fsm.py +12 -6
- wandb/sdk/lib/ipython.py +1 -6
- wandb/sdk/lib/module.py +0 -3
- wandb/sdk/lib/progress.py +2 -3
- wandb/sdk/lib/run_moment.py +1 -7
- wandb/sdk/lib/server.py +10 -24
- wandb/sdk/lib/sock_client.py +0 -5
- wandb/sdk/service/server.py +3 -12
- wandb/sdk/service/server_sock.py +0 -2
- wandb/sdk/service/service.py +5 -5
- wandb/sdk/wandb_init.py +215 -166
- wandb/sdk/wandb_login.py +17 -27
- wandb/sdk/wandb_run.py +129 -161
- wandb/sdk/wandb_settings.py +978 -1760
- wandb/sdk/wandb_setup.py +87 -94
- wandb/sdk/wandb_watch.py +1 -1
- wandb/sync/sync.py +1 -2
- wandb/util.py +7 -40
- wandb/wandb_controller.py +10 -12
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/METADATA +14 -4
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/RECORD +114 -120
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/WHEEL +1 -1
- wandb/integration/magic.py +0 -556
- wandb/magic.py +0 -3
- wandb/sdk/lib/_settings_toposort_generate.py +0 -159
- wandb/sdk/lib/_settings_toposort_generated.py +0 -250
- wandb/sdk/lib/reporting.py +0 -99
- wandb/sdk/lib/tracelog.py +0 -255
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/entry_points.txt +0 -0
- {wandb-0.18.6.dist-info → wandb-0.19.0.dist-info}/licenses/LICENSE +0 -0
@@ -1,159 +0,0 @@
|
|
1
|
-
import inspect
|
2
|
-
import sys
|
3
|
-
from typing import Dict, List, Set, Tuple
|
4
|
-
|
5
|
-
from wandb.errors import UsageError
|
6
|
-
from wandb.sdk.wandb_settings import Settings
|
7
|
-
|
8
|
-
if sys.version_info >= (3, 8):
|
9
|
-
from typing import get_type_hints
|
10
|
-
else:
|
11
|
-
from typing_extensions import get_type_hints
|
12
|
-
|
13
|
-
|
14
|
-
template = """
|
15
|
-
__all__ = ("SETTINGS_TOPOLOGICALLY_SORTED", "_Setting")
|
16
|
-
|
17
|
-
import sys
|
18
|
-
from typing import Tuple
|
19
|
-
|
20
|
-
if sys.version_info >= (3, 8):
|
21
|
-
from typing import Final, Literal
|
22
|
-
else:
|
23
|
-
from typing_extensions import Final, Literal
|
24
|
-
|
25
|
-
|
26
|
-
_Setting = Literal[
|
27
|
-
$settings_literal_list
|
28
|
-
]
|
29
|
-
|
30
|
-
SETTINGS_TOPOLOGICALLY_SORTED: Final[Tuple[_Setting, ...]] = (
|
31
|
-
$settings_topologically_sorted
|
32
|
-
)
|
33
|
-
"""
|
34
|
-
|
35
|
-
|
36
|
-
class Graph:
|
37
|
-
# A simple class representing an unweighted directed graph
|
38
|
-
# that uses an adjacency list representation.
|
39
|
-
# We use to ensure that we don't have cyclic dependencies in the settings
|
40
|
-
# and that modifications to the settings are applied in the correct order.
|
41
|
-
def __init__(self) -> None:
|
42
|
-
self.adj_list: Dict[str, Set[str]] = {}
|
43
|
-
|
44
|
-
def add_node(self, node: str) -> None:
|
45
|
-
if node not in self.adj_list:
|
46
|
-
self.adj_list[node] = set()
|
47
|
-
|
48
|
-
def add_edge(self, node1: str, node2: str) -> None:
|
49
|
-
self.adj_list[node1].add(node2)
|
50
|
-
|
51
|
-
def get_neighbors(self, node: str) -> Set[str]:
|
52
|
-
return self.adj_list[node]
|
53
|
-
|
54
|
-
# return a list of nodes sorted in topological order
|
55
|
-
def topological_sort_dfs(self) -> List[str]:
|
56
|
-
sorted_copy = {k: sorted(v) for k, v in self.adj_list.items()}
|
57
|
-
|
58
|
-
sorted_nodes: List[str] = []
|
59
|
-
visited_nodes: Set[str] = set()
|
60
|
-
current_nodes: Set[str] = set()
|
61
|
-
|
62
|
-
def visit(n: str) -> None:
|
63
|
-
if n in visited_nodes:
|
64
|
-
return None
|
65
|
-
if n in current_nodes:
|
66
|
-
raise UsageError("Cyclic dependency detected in wandb.Settings")
|
67
|
-
|
68
|
-
current_nodes.add(n)
|
69
|
-
for neighbor in sorted_copy[n]:
|
70
|
-
visit(neighbor)
|
71
|
-
|
72
|
-
current_nodes.remove(n)
|
73
|
-
visited_nodes.add(n)
|
74
|
-
sorted_nodes.append(n)
|
75
|
-
|
76
|
-
return None
|
77
|
-
|
78
|
-
for node in self.adj_list:
|
79
|
-
if node not in visited_nodes:
|
80
|
-
visit(node)
|
81
|
-
|
82
|
-
return sorted_nodes
|
83
|
-
|
84
|
-
|
85
|
-
def _get_modification_order(
|
86
|
-
settings: Settings,
|
87
|
-
) -> Tuple[Tuple[str, ...], Tuple[str, ...]]:
|
88
|
-
"""Return the order in which settings should be modified, based on dependencies."""
|
89
|
-
dependency_graph = Graph()
|
90
|
-
|
91
|
-
props = tuple(get_type_hints(Settings).keys())
|
92
|
-
|
93
|
-
# discover prop dependencies from validator methods and runtime hooks
|
94
|
-
|
95
|
-
prefix = "_validate_"
|
96
|
-
symbols = set(dir(settings))
|
97
|
-
validator_methods = tuple(sorted(m for m in symbols if m.startswith(prefix)))
|
98
|
-
|
99
|
-
# extract dependencies from validator methods
|
100
|
-
for m in validator_methods:
|
101
|
-
setting = m.split(prefix)[1]
|
102
|
-
dependency_graph.add_node(setting)
|
103
|
-
# if the method is not static, inspect its code to find the attributes it depends on
|
104
|
-
if (
|
105
|
-
not isinstance(Settings.__dict__[m], staticmethod)
|
106
|
-
and not isinstance(Settings.__dict__[m], classmethod)
|
107
|
-
and Settings.__dict__[m].__code__.co_argcount > 0
|
108
|
-
):
|
109
|
-
unbound_closure_vars = inspect.getclosurevars(Settings.__dict__[m]).unbound
|
110
|
-
dependencies = (v for v in unbound_closure_vars if v in props)
|
111
|
-
for d in dependencies:
|
112
|
-
dependency_graph.add_node(d)
|
113
|
-
dependency_graph.add_edge(setting, d)
|
114
|
-
|
115
|
-
# extract dependencies from props' runtime hooks
|
116
|
-
default_props = settings._default_props()
|
117
|
-
for prop, spec in default_props.items():
|
118
|
-
if "hook" not in spec:
|
119
|
-
continue
|
120
|
-
|
121
|
-
dependency_graph.add_node(prop)
|
122
|
-
|
123
|
-
hook = spec["hook"]
|
124
|
-
if callable(hook):
|
125
|
-
hook = [hook]
|
126
|
-
|
127
|
-
for h in hook:
|
128
|
-
unbound_closure_vars = inspect.getclosurevars(h).unbound
|
129
|
-
dependencies = (v for v in unbound_closure_vars if v in props)
|
130
|
-
for d in dependencies:
|
131
|
-
dependency_graph.add_node(d)
|
132
|
-
dependency_graph.add_edge(prop, d)
|
133
|
-
|
134
|
-
modification_order = dependency_graph.topological_sort_dfs()
|
135
|
-
return props, tuple(modification_order)
|
136
|
-
|
137
|
-
|
138
|
-
def generate(settings: Settings) -> None:
|
139
|
-
_settings_literal_list, _settings_topologically_sorted = _get_modification_order(
|
140
|
-
settings
|
141
|
-
)
|
142
|
-
settings_literal_list = ", ".join(f'"{s}"' for s in _settings_literal_list)
|
143
|
-
settings_topologically_sorted = ", ".join(
|
144
|
-
f'"{s}"' for s in _settings_topologically_sorted
|
145
|
-
)
|
146
|
-
|
147
|
-
print(
|
148
|
-
template.replace(
|
149
|
-
"$settings_literal_list",
|
150
|
-
settings_literal_list,
|
151
|
-
).replace(
|
152
|
-
"$settings_topologically_sorted",
|
153
|
-
settings_topologically_sorted,
|
154
|
-
)
|
155
|
-
)
|
156
|
-
|
157
|
-
|
158
|
-
if __name__ == "__main__":
|
159
|
-
generate(Settings())
|
@@ -1,250 +0,0 @@
|
|
1
|
-
# DO NOT EDIT -- GENERATED BY: `generate-tool.py --generate`
|
2
|
-
__all__ = ("SETTINGS_TOPOLOGICALLY_SORTED", "_Setting")
|
3
|
-
|
4
|
-
import sys
|
5
|
-
from typing import Tuple
|
6
|
-
|
7
|
-
if sys.version_info >= (3, 8):
|
8
|
-
from typing import Final, Literal
|
9
|
-
else:
|
10
|
-
from typing_extensions import Final, Literal
|
11
|
-
|
12
|
-
|
13
|
-
_Setting = Literal[
|
14
|
-
"_args",
|
15
|
-
"_aws_lambda",
|
16
|
-
"_cli_only_mode",
|
17
|
-
"_code_path_local",
|
18
|
-
"_colab",
|
19
|
-
"_cuda",
|
20
|
-
"_disable_meta",
|
21
|
-
"_disable_service",
|
22
|
-
"_disable_setproctitle",
|
23
|
-
"_disable_stats",
|
24
|
-
"_disable_update_check",
|
25
|
-
"_disable_viewer",
|
26
|
-
"_disable_machine_info",
|
27
|
-
"_executable",
|
28
|
-
"_extra_http_headers",
|
29
|
-
"_file_stream_max_bytes",
|
30
|
-
"_file_stream_transmit_interval",
|
31
|
-
"_file_stream_retry_max",
|
32
|
-
"_file_stream_retry_wait_min_seconds",
|
33
|
-
"_file_stream_retry_wait_max_seconds",
|
34
|
-
"_file_stream_timeout_seconds",
|
35
|
-
"_file_transfer_retry_max",
|
36
|
-
"_file_transfer_retry_wait_min_seconds",
|
37
|
-
"_file_transfer_retry_wait_max_seconds",
|
38
|
-
"_file_transfer_timeout_seconds",
|
39
|
-
"_flow_control_custom",
|
40
|
-
"_flow_control_disabled",
|
41
|
-
"_graphql_retry_max",
|
42
|
-
"_graphql_retry_wait_min_seconds",
|
43
|
-
"_graphql_retry_wait_max_seconds",
|
44
|
-
"_graphql_timeout_seconds",
|
45
|
-
"_internal_check_process",
|
46
|
-
"_internal_queue_timeout",
|
47
|
-
"_ipython",
|
48
|
-
"_jupyter",
|
49
|
-
"_jupyter_name",
|
50
|
-
"_jupyter_path",
|
51
|
-
"_jupyter_root",
|
52
|
-
"_kaggle",
|
53
|
-
"_live_policy_rate_limit",
|
54
|
-
"_live_policy_wait_time",
|
55
|
-
"_log_level",
|
56
|
-
"_network_buffer",
|
57
|
-
"_noop",
|
58
|
-
"_notebook",
|
59
|
-
"_offline",
|
60
|
-
"_sync",
|
61
|
-
"_os",
|
62
|
-
"_platform",
|
63
|
-
"_proxies",
|
64
|
-
"_python",
|
65
|
-
"_runqueue_item_id",
|
66
|
-
"_require_legacy_service",
|
67
|
-
"_save_requirements",
|
68
|
-
"_service_transport",
|
69
|
-
"_service_wait",
|
70
|
-
"_shared",
|
71
|
-
"_start_datetime",
|
72
|
-
"_start_time",
|
73
|
-
"_stats_pid",
|
74
|
-
"_stats_sampling_interval",
|
75
|
-
"_stats_sample_rate_seconds",
|
76
|
-
"_stats_samples_to_average",
|
77
|
-
"_stats_join_assets",
|
78
|
-
"_stats_neuron_monitor_config_path",
|
79
|
-
"_stats_open_metrics_endpoints",
|
80
|
-
"_stats_open_metrics_filters",
|
81
|
-
"_stats_disk_paths",
|
82
|
-
"_stats_buffer_size",
|
83
|
-
"_tmp_code_dir",
|
84
|
-
"_tracelog",
|
85
|
-
"_unsaved_keys",
|
86
|
-
"_windows",
|
87
|
-
"allow_val_change",
|
88
|
-
"anonymous",
|
89
|
-
"api_key",
|
90
|
-
"azure_account_url_to_access_key",
|
91
|
-
"base_url",
|
92
|
-
"code_dir",
|
93
|
-
"colab_url",
|
94
|
-
"config_paths",
|
95
|
-
"console",
|
96
|
-
"console_multipart",
|
97
|
-
"credentials_file",
|
98
|
-
"deployment",
|
99
|
-
"disable_code",
|
100
|
-
"disable_git",
|
101
|
-
"disable_hints",
|
102
|
-
"disable_job_creation",
|
103
|
-
"disabled",
|
104
|
-
"docker",
|
105
|
-
"email",
|
106
|
-
"entity",
|
107
|
-
"files_dir",
|
108
|
-
"force",
|
109
|
-
"fork_from",
|
110
|
-
"resume_from",
|
111
|
-
"git_commit",
|
112
|
-
"git_remote",
|
113
|
-
"git_remote_url",
|
114
|
-
"git_root",
|
115
|
-
"heartbeat_seconds",
|
116
|
-
"host",
|
117
|
-
"http_proxy",
|
118
|
-
"https_proxy",
|
119
|
-
"identity_token_file",
|
120
|
-
"ignore_globs",
|
121
|
-
"init_timeout",
|
122
|
-
"is_local",
|
123
|
-
"job_name",
|
124
|
-
"job_source",
|
125
|
-
"label_disable",
|
126
|
-
"launch",
|
127
|
-
"launch_config_path",
|
128
|
-
"log_dir",
|
129
|
-
"log_internal",
|
130
|
-
"log_symlink_internal",
|
131
|
-
"log_symlink_user",
|
132
|
-
"log_user",
|
133
|
-
"login_timeout",
|
134
|
-
"mode",
|
135
|
-
"notebook_name",
|
136
|
-
"program",
|
137
|
-
"program_abspath",
|
138
|
-
"program_relpath",
|
139
|
-
"project",
|
140
|
-
"project_url",
|
141
|
-
"quiet",
|
142
|
-
"reinit",
|
143
|
-
"relogin",
|
144
|
-
"resume",
|
145
|
-
"resume_fname",
|
146
|
-
"resumed",
|
147
|
-
"root_dir",
|
148
|
-
"run_group",
|
149
|
-
"run_id",
|
150
|
-
"run_job_type",
|
151
|
-
"run_mode",
|
152
|
-
"run_name",
|
153
|
-
"run_notes",
|
154
|
-
"run_tags",
|
155
|
-
"run_url",
|
156
|
-
"sagemaker_disable",
|
157
|
-
"save_code",
|
158
|
-
"settings_system",
|
159
|
-
"settings_workspace",
|
160
|
-
"show_colors",
|
161
|
-
"show_emoji",
|
162
|
-
"show_errors",
|
163
|
-
"show_info",
|
164
|
-
"show_warnings",
|
165
|
-
"silent",
|
166
|
-
"start_method",
|
167
|
-
"strict",
|
168
|
-
"summary_errors",
|
169
|
-
"summary_timeout",
|
170
|
-
"summary_warnings",
|
171
|
-
"sweep_id",
|
172
|
-
"sweep_param_path",
|
173
|
-
"sweep_url",
|
174
|
-
"symlink",
|
175
|
-
"sync_dir",
|
176
|
-
"sync_file",
|
177
|
-
"sync_symlink_latest",
|
178
|
-
"table_raise_on_max_row_limit_exceeded",
|
179
|
-
"timespec",
|
180
|
-
"tmp_dir",
|
181
|
-
"username",
|
182
|
-
"wandb_dir",
|
183
|
-
]
|
184
|
-
|
185
|
-
SETTINGS_TOPOLOGICALLY_SORTED: Final[Tuple[_Setting, ...]] = (
|
186
|
-
"_service_wait",
|
187
|
-
"_stats_sample_rate_seconds",
|
188
|
-
"_stats_samples_to_average",
|
189
|
-
"_stats_sampling_interval",
|
190
|
-
"anonymous",
|
191
|
-
"api_key",
|
192
|
-
"base_url",
|
193
|
-
"console",
|
194
|
-
"job_source",
|
195
|
-
"mode",
|
196
|
-
"project",
|
197
|
-
"run_id",
|
198
|
-
"start_method",
|
199
|
-
"_aws_lambda",
|
200
|
-
"program",
|
201
|
-
"_code_path_local",
|
202
|
-
"_colab",
|
203
|
-
"_disable_machine_info",
|
204
|
-
"_disable_meta",
|
205
|
-
"_disable_stats",
|
206
|
-
"_network_buffer",
|
207
|
-
"_flow_control_disabled",
|
208
|
-
"_flow_control_custom",
|
209
|
-
"_ipython",
|
210
|
-
"_jupyter",
|
211
|
-
"_kaggle",
|
212
|
-
"_noop",
|
213
|
-
"_notebook",
|
214
|
-
"disabled",
|
215
|
-
"_offline",
|
216
|
-
"_shared",
|
217
|
-
"_stats_neuron_monitor_config_path",
|
218
|
-
"run_mode",
|
219
|
-
"_start_datetime",
|
220
|
-
"timespec",
|
221
|
-
"root_dir",
|
222
|
-
"wandb_dir",
|
223
|
-
"tmp_dir",
|
224
|
-
"_tmp_code_dir",
|
225
|
-
"_windows",
|
226
|
-
"colab_url",
|
227
|
-
"is_local",
|
228
|
-
"deployment",
|
229
|
-
"disable_code",
|
230
|
-
"disable_git",
|
231
|
-
"disable_job_creation",
|
232
|
-
"files_dir",
|
233
|
-
"_proxies",
|
234
|
-
"http_proxy",
|
235
|
-
"https_proxy",
|
236
|
-
"log_dir",
|
237
|
-
"log_internal",
|
238
|
-
"log_symlink_internal",
|
239
|
-
"log_symlink_user",
|
240
|
-
"log_user",
|
241
|
-
"project_url",
|
242
|
-
"resume_fname",
|
243
|
-
"run_url",
|
244
|
-
"settings_system",
|
245
|
-
"settings_workspace",
|
246
|
-
"sweep_url",
|
247
|
-
"sync_dir",
|
248
|
-
"sync_file",
|
249
|
-
"sync_symlink_latest",
|
250
|
-
)
|
wandb/sdk/lib/reporting.py
DELETED
@@ -1,99 +0,0 @@
|
|
1
|
-
"""reporting."""
|
2
|
-
|
3
|
-
import logging
|
4
|
-
|
5
|
-
logger = logging.getLogger("wandb")
|
6
|
-
|
7
|
-
|
8
|
-
class _Reporter:
|
9
|
-
def __init__(self, settings):
|
10
|
-
self._settings = settings
|
11
|
-
self._errors = []
|
12
|
-
self._warnings = []
|
13
|
-
self._num_errors = 0
|
14
|
-
self._num_warnings = 0
|
15
|
-
self._context = dict()
|
16
|
-
|
17
|
-
def error(self, __s, *args):
|
18
|
-
pass
|
19
|
-
|
20
|
-
def warning(self, __s, *args):
|
21
|
-
show = self._settings.show_warnings
|
22
|
-
summary = self._settings.summary_warnings
|
23
|
-
if show is not None or summary is not None:
|
24
|
-
s = __s % args
|
25
|
-
self._num_warnings += 1
|
26
|
-
if show is not None:
|
27
|
-
if self._num_warnings <= show or show == 0:
|
28
|
-
print("[WARNING]", s)
|
29
|
-
if self._num_warnings == show:
|
30
|
-
print("not showing any more warnings")
|
31
|
-
if summary is not None:
|
32
|
-
if self._num_warnings <= summary or summary == 0:
|
33
|
-
self._warnings.append(s)
|
34
|
-
|
35
|
-
def info(self, __s, *args):
|
36
|
-
if self._settings.show_info:
|
37
|
-
print(("[INFO]" + __s) % args)
|
38
|
-
|
39
|
-
def internal(self, __s, *args):
|
40
|
-
pass
|
41
|
-
|
42
|
-
def problem(self, bool, __s=None, *args):
|
43
|
-
pass
|
44
|
-
|
45
|
-
def set_context(self, __d=None, **kwargs):
|
46
|
-
if __d:
|
47
|
-
self._context.update(__d)
|
48
|
-
self._context.update(**kwargs)
|
49
|
-
|
50
|
-
def clear_context(self, keys=None):
|
51
|
-
if keys is None:
|
52
|
-
self._context = dict()
|
53
|
-
return
|
54
|
-
for k in keys:
|
55
|
-
self._context.pop(k, None)
|
56
|
-
|
57
|
-
@property
|
58
|
-
def warning_count(self):
|
59
|
-
return self._num_warnings
|
60
|
-
|
61
|
-
@property
|
62
|
-
def error_count(self):
|
63
|
-
return self._num_errors
|
64
|
-
|
65
|
-
@property
|
66
|
-
def warning_lines(self):
|
67
|
-
return self._warnings
|
68
|
-
|
69
|
-
@property
|
70
|
-
def error_lines(self):
|
71
|
-
return self._errors
|
72
|
-
|
73
|
-
|
74
|
-
class Reporter:
|
75
|
-
_instance = None
|
76
|
-
|
77
|
-
def __init__(self, settings=None):
|
78
|
-
if Reporter._instance is not None:
|
79
|
-
return
|
80
|
-
if settings is None:
|
81
|
-
logging.error("internal issue: reporter not setup")
|
82
|
-
|
83
|
-
Reporter._instance = _Reporter(settings)
|
84
|
-
|
85
|
-
def __getattr__(self, name):
|
86
|
-
return getattr(self._instance, name)
|
87
|
-
|
88
|
-
|
89
|
-
def setup_reporter(settings):
|
90
|
-
# fixme: why?
|
91
|
-
# if not settings.is_frozen():
|
92
|
-
# logging.error("internal issue: settings not frozen")
|
93
|
-
r = Reporter(settings=settings)
|
94
|
-
return r
|
95
|
-
|
96
|
-
|
97
|
-
def get_reporter():
|
98
|
-
r = Reporter()
|
99
|
-
return r
|