id int64 1 6.07M | name stringlengths 1 295 | code stringlengths 12 426k | language stringclasses 1
value | source_file stringlengths 5 202 | start_line int64 1 158k | end_line int64 1 158k | repo dict |
|---|---|---|---|---|---|---|---|
2,801 | _console_callback | def _console_callback(self, name: str, data: str) -> None:
# logger.info("console callback: %s, %s", name, data)
if self._backend and self._backend.interface:
self._backend.interface.publish_output(name, data) | python | wandb/sdk/wandb_run.py | 1,409 | 1,412 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,802 | _console_raw_callback | def _console_raw_callback(self, name: str, data: str) -> None:
# logger.info("console callback: %s, %s", name, data)
# NOTE: console output is only allowed on the process which installed the callback
# this will prevent potential corruption in the socket to the service. Other methods
#... | python | wandb/sdk/wandb_run.py | 1,415 | 1,427 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,803 | _tensorboard_callback | def _tensorboard_callback(
self, logdir: str, save: bool = True, root_logdir: str = ""
) -> None:
logger.info("tensorboard callback: %s, %s", logdir, save)
if self._backend and self._backend.interface:
self._backend.interface.publish_tbdata(logdir, save, root_logdir) | python | wandb/sdk/wandb_run.py | 1,429 | 1,434 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,804 | _set_library | def _set_library(self, library: _WandbSetup) -> None:
self._wl = library | python | wandb/sdk/wandb_run.py | 1,436 | 1,437 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,805 | _set_backend | def _set_backend(self, backend: "wandb.sdk.backend.backend.Backend") -> None:
self._backend = backend | python | wandb/sdk/wandb_run.py | 1,439 | 1,440 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,806 | _set_internal_run_interface | def _set_internal_run_interface(
self,
interface: Union[
"wandb.sdk.interface.interface_queue.InterfaceQueue",
"wandb.sdk.interface.interface_grpc.InterfaceGrpc",
],
) -> None:
self._internal_run_interface = interface | python | wandb/sdk/wandb_run.py | 1,442 | 1,449 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,807 | _set_reporter | def _set_reporter(self, reporter: Reporter) -> None:
self._reporter = reporter | python | wandb/sdk/wandb_run.py | 1,451 | 1,452 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,808 | _set_teardown_hooks | def _set_teardown_hooks(self, hooks: List[TeardownHook]) -> None:
self._teardown_hooks = hooks | python | wandb/sdk/wandb_run.py | 1,454 | 1,455 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,809 | _set_run_obj | def _set_run_obj(self, run_obj: RunRecord) -> None:
self._run_obj = run_obj
self._entity = run_obj.entity
self._project = run_obj.project
# Grab the config from resuming
if run_obj.config:
c_dict = config_util.dict_no_value_from_proto_list(run_obj.config.update)
... | python | wandb/sdk/wandb_run.py | 1,457 | 1,485 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,810 | _set_run_obj_offline | def _set_run_obj_offline(self, run_obj: RunRecord) -> None:
self._run_obj_offline = run_obj | python | wandb/sdk/wandb_run.py | 1,487 | 1,488 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,811 | _add_singleton | def _add_singleton(
self, data_type: str, key: str, value: Dict[Union[int, str], str]
) -> None:
"""Store a singleton item to wandb config.
A singleton in this context is a piece of data that is continually
logged with the same value in each history step, but represented
as ... | python | wandb/sdk/wandb_run.py | 1,490 | 1,517 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,812 | _log | def _log(
self,
data: Dict[str, Any],
step: Optional[int] = None,
commit: Optional[bool] = None,
) -> None:
if not isinstance(data, Mapping):
raise ValueError("wandb.log must be passed a dictionary")
if any(not isinstance(key, str) for key in data.keys())... | python | wandb/sdk/wandb_run.py | 1,519 | 1,553 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,813 | log | def log(
self,
data: Dict[str, Any],
step: Optional[int] = None,
commit: Optional[bool] = None,
sync: Optional[bool] = None,
) -> None:
"""Log a dictonary of data to the current run's history.
Use `wandb.log` to log data from runs, such as scalars, images, vi... | python | wandb/sdk/wandb_run.py | 1,558 | 1,750 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,814 | save | def save(
self,
glob_str: Optional[str] = None,
base_path: Optional[str] = None,
policy: "PolicyName" = "live",
) -> Union[bool, List[str]]:
"""Ensure all files matching `glob_str` are synced to wandb with the policy specified.
Arguments:
glob_str: (strin... | python | wandb/sdk/wandb_run.py | 1,754 | 1,782 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,815 | _save | def _save(
self,
glob_str: Optional[str] = None,
base_path: Optional[str] = None,
policy: "PolicyName" = "live",
) -> Union[bool, List[str]]:
if policy not in ("live", "end", "now"):
raise ValueError(
'Only "live" "end" and "now" policies are curre... | python | wandb/sdk/wandb_run.py | 1,784 | 1,852 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,816 | restore | def restore(
self,
name: str,
run_path: Optional[str] = None,
replace: bool = False,
root: Optional[str] = None,
) -> Union[None, TextIO]:
return restore(
name,
run_path or self._get_path(),
replace,
root or self._settin... | python | wandb/sdk/wandb_run.py | 1,855 | 1,867 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,817 | finish | def finish(
self, exit_code: Optional[int] = None, quiet: Optional[bool] = None
) -> None:
"""Mark a run as finished, and finish uploading all data.
This is used when creating multiple runs in the same process. We automatically
call this method when your script exits or if you use t... | python | wandb/sdk/wandb_run.py | 1,871 | 1,883 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,818 | _finish | def _finish(
self, exit_code: Optional[int] = None, quiet: Optional[bool] = None
) -> None:
if quiet is not None:
self._quiet = quiet
with telemetry.context(run=self) as tel:
tel.feature.finish = True
logger.info(f"finishing run {self._get_path()}")
# ... | python | wandb/sdk/wandb_run.py | 1,885 | 1,915 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,819 | join | def join(self, exit_code: Optional[int] = None) -> None:
"""Deprecated alias for `finish()` - use finish instead."""
deprecate.deprecate(
field_name=deprecate.Deprecated.run__join,
warning_message=(
"wandb.run.join() is deprecated, please use wandb.run.finish()."
... | python | wandb/sdk/wandb_run.py | 1,919 | 1,927 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,820 | status | def status(
self,
) -> RunStatus:
"""Get sync info from the internal backend, about the current run's sync status."""
if not self._backend or not self._backend.interface:
return RunStatus()
handle_run_status = self._backend.interface.deliver_request_run_status()
... | python | wandb/sdk/wandb_run.py | 1,931 | 1,952 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,821 | plot_table | def plot_table(
vega_spec_name: str,
data_table: "wandb.Table",
fields: Dict[str, Any],
string_fields: Optional[Dict[str, Any]] = None,
) -> CustomChart:
"""Create a custom plot on a table.
Arguments:
vega_spec_name: the name of the spec for the plot
... | python | wandb/sdk/wandb_run.py | 1,955 | 1,972 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,822 | _add_panel | def _add_panel(
self, visualize_key: str, panel_type: str, panel_config: dict
) -> None:
config = {
"panel_type": panel_type,
"panel_config": panel_config,
}
self._config_callback(val=config, key=("_wandb", "visualize", visualize_key)) | python | wandb/sdk/wandb_run.py | 1,974 | 1,981 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,823 | _set_globals | def _set_globals(self) -> None:
module.set_global(
run=self,
config=self.config,
log=self.log,
summary=self.summary,
save=self.save,
use_artifact=self.use_artifact,
log_artifact=self.log_artifact,
define_metric=self.... | python | wandb/sdk/wandb_run.py | 1,983 | 1,996 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,824 | _redirect | def _redirect(
self,
stdout_slave_fd: Optional[int],
stderr_slave_fd: Optional[int],
console: Optional[SettingsConsole] = None,
) -> None:
if console is None:
console = self._settings._console
# only use raw for service to minimize potential changes
... | python | wandb/sdk/wandb_run.py | 1,998 | 2,106 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,825 | wrap_fallback | def wrap_fallback() -> None:
if self._out_redir:
self._out_redir.uninstall()
if self._err_redir:
self._err_redir.uninstall()
msg = (
"Tensorflow detected. Stream redirection is not support... | python | wandb/sdk/wandb_run.py | 2,046 | 2,057 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,826 | _restore | def _restore(self) -> None:
logger.info("restore")
# TODO(jhr): drain and shutdown all threads
if self._out_redir:
self._out_redir.uninstall()
if self._err_redir:
self._err_redir.uninstall()
logger.info("restore done") | python | wandb/sdk/wandb_run.py | 2,108 | 2,115 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,827 | _atexit_cleanup | def _atexit_cleanup(self, exit_code: Optional[int] = None) -> None:
if self._backend is None:
logger.warning("process exited without backend configured")
return
if self._atexit_cleanup_called:
return
self._atexit_cleanup_called = True
exit_code = exit... | python | wandb/sdk/wandb_run.py | 2,117 | 2,154 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,828 | _console_start | def _console_start(self) -> None:
logger.info("atexit reg")
self._hooks = ExitHooks()
manager = self._wl and self._wl._get_manager()
if not manager:
self._hooks.hook()
# NB: manager will perform atexit hook like behavior for outstanding runs
atexit.re... | python | wandb/sdk/wandb_run.py | 2,156 | 2,166 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,829 | _console_stop | def _console_stop(self) -> None:
self._restore()
if self._output_writer:
self._output_writer.close()
self._output_writer = None | python | wandb/sdk/wandb_run.py | 2,168 | 2,172 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,830 | _on_init | def _on_init(self) -> None:
if self._backend and self._backend.interface:
logger.info("communicating current version")
version_handle = self._backend.interface.deliver_check_version(
current_version=wandb.__version__
)
version_result = version_hand... | python | wandb/sdk/wandb_run.py | 2,174 | 2,185 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,831 | _on_start | def _on_start(self) -> None:
# would like to move _set_global to _on_ready to unify _on_start and _on_attach
# (we want to do the set globals after attach)
# TODO(console) However _console_start calls Redirect that uses `wandb.run` hence breaks
# TODO(jupyter) However _header calls _head... | python | wandb/sdk/wandb_run.py | 2,187 | 2,208 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,832 | _on_attach | def _on_attach(self) -> None:
"""Event triggered when run is attached to another run."""
with telemetry.context(run=self) as tel:
tel.feature.attach = True
self._set_globals()
self._is_attached = True
self._on_ready() | python | wandb/sdk/wandb_run.py | 2,210 | 2,217 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,833 | _register_telemetry_import_hooks | def _register_telemetry_import_hooks(
self,
) -> None:
def _telemetry_import_hook(
run: "Run",
module: Any,
) -> None:
with telemetry.context(run=run) as tel:
try:
name = getattr(module, "__name__", None)
... | python | wandb/sdk/wandb_run.py | 2,219 | 2,241 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,834 | _telemetry_import_hook | def _telemetry_import_hook(
run: "Run",
module: Any,
) -> None:
with telemetry.context(run=run) as tel:
try:
name = getattr(module, "__name__", None)
if name is not None:
setattr(tel.imports_finis... | python | wandb/sdk/wandb_run.py | 2,222 | 2,232 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,835 | _on_ready | def _on_ready(self) -> None:
"""Event triggered when run is ready for the user."""
self._register_telemetry_import_hooks()
# start reporting any telemetry changes
self._telemetry_obj_active = True
self._telemetry_flush()
# object is about to be returned to the user, don... | python | wandb/sdk/wandb_run.py | 2,243 | 2,256 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,836 | _make_job_source_reqs | def _make_job_source_reqs(self) -> Tuple[List[str], Dict[str, Any], Dict[str, Any]]:
import pkg_resources
installed_packages_list = sorted(
f"{d.key}=={d.version}" for d in iter(pkg_resources.working_set)
)
input_types = TypeRegistry.type_of(self.config.as_dict()).to_json()
... | python | wandb/sdk/wandb_run.py | 2,258 | 2,267 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,837 | _construct_job_artifact | def _construct_job_artifact(
self,
name: str,
source_dict: "JobSourceDict",
installed_packages_list: List[str],
patch_path: Optional[os.PathLike] = None,
) -> "Artifact":
job_artifact = wandb.Artifact(name, type="job")
if patch_path and os.path.exists(patch_pa... | python | wandb/sdk/wandb_run.py | 2,269 | 2,284 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,838 | _create_image_job | def _create_image_job(
self,
input_types: Dict[str, Any],
output_types: Dict[str, Any],
installed_packages_list: List[str],
docker_image_name: Optional[str] = None,
args: Optional[List[str]] = None,
) -> Optional["Artifact"]:
docker_image_name = docker_image_n... | python | wandb/sdk/wandb_run.py | 2,286 | 2,313 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,839 | _log_job_artifact_with_image | def _log_job_artifact_with_image(
self, docker_image_name: str, args: Optional[List[str]] = None
) -> Artifact:
packages, in_types, out_types = self._make_job_source_reqs()
job_artifact = self._create_image_job(
in_types,
out_types,
packages,
a... | python | wandb/sdk/wandb_run.py | 2,315 | 2,332 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,840 | _on_probe_exit | def _on_probe_exit(self, probe_handle: MailboxProbe) -> None:
handle = probe_handle.get_mailbox_handle()
if handle:
result = handle.wait(timeout=0)
if not result:
return
probe_handle.set_probe_result(result)
assert self._backend and self._backe... | python | wandb/sdk/wandb_run.py | 2,334 | 2,343 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,841 | _on_progress_exit | def _on_progress_exit(self, progress_handle: MailboxProgress) -> None:
probe_handles = progress_handle.get_probe_handles()
assert probe_handles and len(probe_handles) == 1
result = probe_handles[0].get_probe_result()
if not result:
return
self._footer_file_pusher_sta... | python | wandb/sdk/wandb_run.py | 2,345 | 2,354 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,842 | _on_finish | def _on_finish(self) -> None:
trigger.call("on_finished")
if self._run_status_checker is not None:
self._run_status_checker.stop()
self._console_stop() # TODO: there's a race here with jupyter console logging
assert self._backend and self._backend.interface
exit_h... | python | wandb/sdk/wandb_run.py | 2,356 | 2,405 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,843 | _unregister_telemetry_import_hooks | def _unregister_telemetry_import_hooks(run_id: str) -> None:
import_telemetry_set = telemetry.list_telemetry_imports()
for module_name in import_telemetry_set:
unregister_post_import_hook(module_name, run_id) | python | wandb/sdk/wandb_run.py | 2,408 | 2,411 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,844 | _on_final | def _on_final(self) -> None:
self._footer(
self._sampled_history,
self._final_summary,
self._poll_exit_response,
self._server_info_response,
self._check_version,
self._reporter,
self._quiet,
settings=self._settings,
... | python | wandb/sdk/wandb_run.py | 2,413 | 2,424 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,845 | define_metric | def define_metric(
self,
name: str,
step_metric: Union[str, wandb_metric.Metric, None] = None,
step_sync: Optional[bool] = None,
hidden: Optional[bool] = None,
summary: Optional[str] = None,
goal: Optional[str] = None,
overwrite: Optional[bool] = None,
... | python | wandb/sdk/wandb_run.py | 2,428 | 2,460 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,846 | _define_metric | def _define_metric(
self,
name: str,
step_metric: Union[str, wandb_metric.Metric, None] = None,
step_sync: Optional[bool] = None,
hidden: Optional[bool] = None,
summary: Optional[str] = None,
goal: Optional[str] = None,
overwrite: Optional[bool] = None,
... | python | wandb/sdk/wandb_run.py | 2,462 | 2,531 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,847 | watch | def watch( # type: ignore
self,
models,
criterion=None,
log="gradients",
log_freq=100,
idx=None,
log_graph=False,
) -> None:
wandb.watch(models, criterion, log, log_freq, idx, log_graph) | python | wandb/sdk/wandb_run.py | 2,535 | 2,544 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,848 | unwatch | def unwatch(self, models=None) -> None: # type: ignore
wandb.unwatch(models=models) | python | wandb/sdk/wandb_run.py | 2,548 | 2,549 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,849 | _swap_artifact_name | def _swap_artifact_name(self, artifact_name: str, use_as: Optional[str]) -> str:
artifact_key_string = use_as or artifact_name
replacement_artifact_info = self._launch_artifact_mapping.get(
artifact_key_string
)
if replacement_artifact_info is not None:
new_name =... | python | wandb/sdk/wandb_run.py | 2,552 | 2,584 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,850 | _detach | def _detach(self) -> None:
pass | python | wandb/sdk/wandb_run.py | 2,586 | 2,587 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,851 | link_artifact | def link_artifact(
self,
artifact: Union[public.Artifact, Artifact],
target_path: str,
aliases: Optional[List[str]] = None,
) -> None:
"""Link the given artifact to a portfolio (a promoted collection of artifacts).
The linked artifact will be visible in the UI for th... | python | wandb/sdk/wandb_run.py | 2,591 | 2,631 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,852 | use_artifact | def use_artifact(
self,
artifact_or_name: Union[str, public.Artifact, Artifact],
type: Optional[str] = None,
aliases: Optional[List[str]] = None,
use_as: Optional[str] = None,
) -> Union[public.Artifact, Artifact]:
"""Declare an artifact as an input to a run.
... | python | wandb/sdk/wandb_run.py | 2,635 | 2,739 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,853 | log_artifact | def log_artifact(
self,
artifact_or_path: Union[wandb_artifacts.Artifact, StrPath],
name: Optional[str] = None,
type: Optional[str] = None,
aliases: Optional[List[str]] = None,
) -> wandb_artifacts.Artifact:
"""Declare an artifact as an output of a run.
Argum... | python | wandb/sdk/wandb_run.py | 2,743 | 2,776 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,854 | upsert_artifact | def upsert_artifact(
self,
artifact_or_path: Union[wandb_artifacts.Artifact, str],
name: Optional[str] = None,
type: Optional[str] = None,
aliases: Optional[List[str]] = None,
distributed_id: Optional[str] = None,
) -> wandb_artifacts.Artifact:
"""Declare (or ... | python | wandb/sdk/wandb_run.py | 2,780 | 2,830 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,855 | finish_artifact | def finish_artifact(
self,
artifact_or_path: Union[wandb_artifacts.Artifact, str],
name: Optional[str] = None,
type: Optional[str] = None,
aliases: Optional[List[str]] = None,
distributed_id: Optional[str] = None,
) -> wandb_artifacts.Artifact:
"""Finishes a n... | python | wandb/sdk/wandb_run.py | 2,834 | 2,884 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,856 | _log_artifact | def _log_artifact(
self,
artifact_or_path: Union[wandb_artifacts.Artifact, StrPath],
name: Optional[str] = None,
type: Optional[str] = None,
aliases: Optional[List[str]] = None,
distributed_id: Optional[str] = None,
finalize: bool = True,
is_user_created: ... | python | wandb/sdk/wandb_run.py | 2,886 | 2,944 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,857 | _public_api | def _public_api(self, overrides: Optional[Dict[str, str]] = None) -> PublicApi:
overrides = {"run": self._run_id}
run_obj = self._run_obj
if run_obj is not None:
overrides["entity"] = run_obj.entity
overrides["project"] = run_obj.project
return public.Api(override... | python | wandb/sdk/wandb_run.py | 2,946 | 2,952 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,858 | _assert_can_log_artifact | def _assert_can_log_artifact(self, artifact) -> None: # type: ignore
if not self._settings._offline:
try:
public_api = self._public_api()
expected_type = public.Artifact.expected_type(
public_api.client,
artifact.name,
... | python | wandb/sdk/wandb_run.py | 2,955 | 2,974 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,859 | _prepare_artifact | def _prepare_artifact(
self,
artifact_or_path: Union[wandb_artifacts.Artifact, StrPath],
name: Optional[str] = None,
type: Optional[str] = None,
aliases: Optional[List[str]] = None,
) -> Tuple[wandb_artifacts.Artifact, List[str]]:
if isinstance(artifact_or_path, (str,... | python | wandb/sdk/wandb_run.py | 2,976 | 3,005 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,860 | alert | def alert(
self,
title: str,
text: str,
level: Optional[Union[str, "AlertLevel"]] = None,
wait_duration: Union[int, float, timedelta, None] = None,
) -> None:
"""Launch an alert with the given title and text.
Arguments:
title: (str) The title of t... | python | wandb/sdk/wandb_run.py | 3,009 | 3,040 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,861 | __enter__ | def __enter__(self) -> "Run":
return self | python | wandb/sdk/wandb_run.py | 3,042 | 3,043 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,862 | __exit__ | def __exit__(
self,
exc_type: Type[BaseException],
exc_val: BaseException,
exc_tb: TracebackType,
) -> bool:
exit_code = 0 if exc_type is None else 1
self._finish(exit_code)
return exc_type is None | python | wandb/sdk/wandb_run.py | 3,045 | 3,053 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,863 | mark_preempting | def mark_preempting(self) -> None:
"""Mark this run as preempting.
Also tells the internal process to immediately report this to server.
"""
if self._backend and self._backend.interface:
self._backend.interface.publish_preempting() | python | wandb/sdk/wandb_run.py | 3,057 | 3,063 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,864 | _header | def _header(
check_version: Optional["CheckVersionResponse"] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
# printer = printer or get_printer(settings._jupyter)
Run._header_version_check_info(
check_version, s... | python | wandb/sdk/wandb_run.py | 3,071 | 3,083 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,865 | _header_version_check_info | def _header_version_check_info(
check_version: Optional["CheckVersionResponse"] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if not check_version or settings._offline:
return
# printer = printer or get_print... | python | wandb/sdk/wandb_run.py | 3,086 | 3,103 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,866 | _header_wandb_version_info | def _header_wandb_version_info(
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if settings.quiet or settings.silent:
return
# printer = printer or get_printer(settings._jupyter)
# TODO: add this to a higher verbosity ... | python | wandb/sdk/wandb_run.py | 3,106 | 3,118 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,867 | _header_sync_info | def _header_sync_info(
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
# printer = printer or get_printer(settings._jupyter)
if settings._offline:
printer.display(
[
f"W&B syncing is set to {... | python | wandb/sdk/wandb_run.py | 3,121 | 3,141 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,868 | _header_run_info | def _header_run_info(
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if settings._offline or settings.silent:
return
run_url = settings.run_url
project_url = settings.project_url
sweep_url = settings.sweep_url... | python | wandb/sdk/wandb_run.py | 3,144 | 3,205 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,869 | _footer | def _footer(
sampled_history: Optional["SampledHistoryResponse"] = None,
final_summary: Optional["GetSummaryResponse"] = None,
poll_exit_response: Optional[PollExitResponse] = None,
server_info_response: Optional[ServerInfoResponse] = None,
check_version: Optional["CheckVersionRe... | python | wandb/sdk/wandb_run.py | 3,213 | 3,257 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,870 | _footer_exit_status_info | def _footer_exit_status_info(
exit_code: Optional[int],
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if settings.silent:
return
status = "(success)." if not exit_code else f"(failed {exit_code})."
info = [
... | python | wandb/sdk/wandb_run.py | 3,260 | 3,277 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,871 | _footer_file_pusher_status_info | def _footer_file_pusher_status_info(
poll_exit_responses: Optional[
Union[PollExitResponse, List[Optional[PollExitResponse]]]
] = None,
*,
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if not poll_exit_responses:
return
if isinsta... | python | wandb/sdk/wandb_run.py | 3,281 | 3,314 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,872 | _footer_single_run_file_pusher_status_info | def _footer_single_run_file_pusher_status_info(
poll_exit_response: Optional[PollExitResponse] = None,
*,
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
# todo: is this same as settings._offline?
if not poll_exit_response:
return
progress = p... | python | wandb/sdk/wandb_run.py | 3,317 | 3,353 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,873 | _footer_multiple_runs_file_pusher_status_info | def _footer_multiple_runs_file_pusher_status_info(
poll_exit_responses: List[Optional[PollExitResponse]],
*,
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
# todo: is this same as settings._offline?
if not all(poll_exit_responses):
return
meg... | python | wandb/sdk/wandb_run.py | 3,356 | 3,404 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,874 | _footer_sync_info | def _footer_sync_info(
poll_exit_response: Optional[PollExitResponse] = None,
quiet: Optional[bool] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if settings.silent:
return
# printer = printer or get_... | python | wandb/sdk/wandb_run.py | 3,407 | 3,440 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,875 | _footer_log_dir_info | def _footer_log_dir_info(
quiet: Optional[bool] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if (quiet or settings.quiet) or settings.silent:
return
log_dir = settings.log_user or settings.log_internal
... | python | wandb/sdk/wandb_run.py | 3,443 | 3,457 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,876 | _footer_history_summary_info | def _footer_history_summary_info(
history: Optional["SampledHistoryResponse"] = None,
summary: Optional["GetSummaryResponse"] = None,
quiet: Optional[bool] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if (quiet o... | python | wandb/sdk/wandb_run.py | 3,460 | 3,529 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,877 | _footer_local_warn | def _footer_local_warn(
server_info_response: Optional[ServerInfoResponse] = None,
quiet: Optional[bool] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if (quiet or settings.quiet) or settings.silent:
return
... | python | wandb/sdk/wandb_run.py | 3,532 | 3,557 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,878 | _footer_server_messages | def _footer_server_messages(
server_info_response: Optional[ServerInfoResponse] = None,
quiet: Optional[bool] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if (quiet or settings.quiet) or settings.silent:
retu... | python | wandb/sdk/wandb_run.py | 3,560 | 3,580 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,879 | _footer_version_check_info | def _footer_version_check_info(
check_version: Optional["CheckVersionResponse"] = None,
quiet: Optional[bool] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if not check_version:
return
if settings._of... | python | wandb/sdk/wandb_run.py | 3,583 | 3,608 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,880 | _footer_reporter_warn_err | def _footer_reporter_warn_err(
reporter: Optional[Reporter] = None,
quiet: Optional[bool] = None,
*,
settings: "Settings",
printer: Union["PrinterTerm", "PrinterJupyter"],
) -> None:
if (quiet or settings.quiet) or settings.silent:
return
if not r... | python | wandb/sdk/wandb_run.py | 3,611 | 3,638 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,881 | restore | def restore(
name: str,
run_path: Optional[str] = None,
replace: bool = False,
root: Optional[str] = None,
) -> Union[None, TextIO]:
"""Download the specified file from cloud storage.
File is placed into the current directory or run directory.
By default, will only download the file if it d... | python | wandb/sdk/wandb_run.py | 3,642 | 3,695 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,882 | finish | def finish(exit_code: Optional[int] = None, quiet: Optional[bool] = None) -> None:
"""Mark a run as finished, and finish uploading all data.
This is used when creating multiple runs in the same process.
We automatically call this method when your script exits.
Arguments:
exit_code: Set to some... | python | wandb/sdk/wandb_run.py | 3,705 | 3,716 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,883 | __init__ | def __init__(self, base_artifact: "ArtifactInterface"):
super().__setattr__("base_artifact", base_artifact) | python | wandb/sdk/wandb_run.py | 3,722 | 3,723 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,884 | __getattr__ | def __getattr__(self, __name: str) -> Any:
raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name) | python | wandb/sdk/wandb_run.py | 3,725 | 3,726 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,885 | __setattr__ | def __setattr__(self, __name: str, __value: Any) -> None:
raise ArtifactNotLoggedError(artifact=self.base_artifact, attr=__name) | python | wandb/sdk/wandb_run.py | 3,728 | 3,729 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,886 | __bool__ | def __bool__(self) -> bool:
return False | python | wandb/sdk/wandb_run.py | 3,731 | 3,732 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,887 | __init__ | def __init__(self, api: PublicApi, future: Any):
self._api = api
self._instance = InvalidArtifact(self)
self._future = future | python | wandb/sdk/wandb_run.py | 3,744 | 3,747 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,888 | __getattr__ | def __getattr__(self, item: str) -> Any:
return getattr(self._instance, item) | python | wandb/sdk/wandb_run.py | 3,749 | 3,750 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,889 | wait | def wait(self, timeout: Optional[int] = None) -> ArtifactInterface:
if not self._instance:
future_get = self._future.get(timeout)
if not future_get:
raise WaitTimeoutError(
"Artifact upload wait timed out, failed to fetch Artifact response"
... | python | wandb/sdk/wandb_run.py | 3,752 | 3,768 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,890 | id | def id(self) -> Optional[str]:
return self._instance.id | python | wandb/sdk/wandb_run.py | 3,771 | 3,772 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,891 | source_version | def source_version(self) -> Optional[str]:
return self._instance.source_version | python | wandb/sdk/wandb_run.py | 3,775 | 3,776 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,892 | version | def version(self) -> str:
return self._instance.version | python | wandb/sdk/wandb_run.py | 3,779 | 3,780 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,893 | name | def name(self) -> str:
return self._instance.name | python | wandb/sdk/wandb_run.py | 3,783 | 3,784 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,894 | type | def type(self) -> str:
return self._instance.type | python | wandb/sdk/wandb_run.py | 3,787 | 3,788 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,895 | entity | def entity(self) -> str:
return self._instance.entity | python | wandb/sdk/wandb_run.py | 3,791 | 3,792 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,896 | project | def project(self) -> str:
return self._instance.project | python | wandb/sdk/wandb_run.py | 3,795 | 3,796 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,897 | manifest | def manifest(self) -> "ArtifactManifest":
return self._instance.manifest | python | wandb/sdk/wandb_run.py | 3,799 | 3,800 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,898 | digest | def digest(self) -> str:
return self._instance.digest | python | wandb/sdk/wandb_run.py | 3,803 | 3,804 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,899 | state | def state(self) -> str:
return self._instance.state | python | wandb/sdk/wandb_run.py | 3,807 | 3,808 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,900 | size | def size(self) -> int:
return self._instance.size | python | wandb/sdk/wandb_run.py | 3,811 | 3,812 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.