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,701 | get | def get(self, *args):
return self._items.get(*args) | python | wandb/sdk/wandb_config.py | 189 | 190 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,702 | persist | def persist(self):
"""Call the callback if it's set."""
if self._callback:
self._callback(data=self._as_dict()) | python | wandb/sdk/wandb_config.py | 192 | 195 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,703 | setdefaults | def setdefaults(self, d):
d = wandb_helper.parse_config(d)
# strip out keys already configured
d = {k: v for k, v in d.items() if k not in self._items}
d = self._sanitize_dict(d)
self._items.update(d)
if self._callback:
self._callback(data=d) | python | wandb/sdk/wandb_config.py | 197 | 204 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,704 | update_locked | def update_locked(self, d, user=None, _allow_val_change=None):
if user not in self._users:
self._users[user] = self._users_cnt
self._users_inv[self._users_cnt] = user
object.__setattr__(self, "_users_cnt", self._users_cnt + 1)
num = self._users[user]
for k, ... | python | wandb/sdk/wandb_config.py | 206 | 220 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,705 | _load_defaults | def _load_defaults(self):
conf_dict = config_util.dict_from_config_file("config-defaults.yaml")
if conf_dict is not None:
self.update(conf_dict) | python | wandb/sdk/wandb_config.py | 222 | 225 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,706 | _sanitize_dict | def _sanitize_dict(
self,
config_dict,
allow_val_change=None,
ignore_keys: Optional[set] = None,
):
sanitized = {}
self._raise_value_error_on_nested_artifact(config_dict)
for k, v in config_dict.items():
if ignore_keys and k in ignore_keys:
... | python | wandb/sdk/wandb_config.py | 227 | 240 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,707 | _sanitize | def _sanitize(self, key, val, allow_val_change=None):
# TODO: enable WBValues in the config in the future
# refuse all WBValues which is all Media and Histograms
if isinstance(val, wandb.sdk.data_types.base_types.wb_value.WBValue):
raise ValueError("WBValue objects cannot be added to... | python | wandb/sdk/wandb_config.py | 242 | 270 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,708 | _raise_value_error_on_nested_artifact | def _raise_value_error_on_nested_artifact(self, v, nested=False):
# we can't swap nested artifacts because their root key can be locked by other values
# best if we don't allow nested artifacts until we can lock nested keys in the config
if isinstance(v, dict) and check_dict_contains_nested_arti... | python | wandb/sdk/wandb_config.py | 272 | 279 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,709 | __init__ | def __init__(self, config):
object.__setattr__(self, "__dict__", dict(config)) | python | wandb/sdk/wandb_config.py | 283 | 284 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,710 | __setattr__ | def __setattr__(self, name, value):
raise AttributeError("Error: wandb.run.config_static is a readonly object") | python | wandb/sdk/wandb_config.py | 286 | 287 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,711 | __setitem__ | def __setitem__(self, key, val):
raise AttributeError("Error: wandb.run.config_static is a readonly object") | python | wandb/sdk/wandb_config.py | 289 | 290 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,712 | keys | def keys(self):
return self.__dict__.keys() | python | wandb/sdk/wandb_config.py | 292 | 293 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,713 | __getitem__ | def __getitem__(self, key):
return self.__dict__[key] | python | wandb/sdk/wandb_config.py | 295 | 296 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,714 | __str__ | def __str__(self):
return str(self.__dict__) | python | wandb/sdk/wandb_config.py | 298 | 299 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,715 | __init__ | def __init__(
self,
interface: InterfaceBase,
stop_polling_interval: int = 15,
retry_polling_interval: int = 5,
) -> None:
self._interface = interface
self._stop_polling_interval = stop_polling_interval
self._retry_polling_interval = retry_polling_interval
... | python | wandb/sdk/wandb_run.py | 169 | 195 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,716 | start | def start(self) -> None:
self._stop_thread.start()
self._network_status_thread.start() | python | wandb/sdk/wandb_run.py | 197 | 199 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,717 | _loop_check_status | def _loop_check_status(
self,
*,
lock: threading.Lock,
set_handle: Any,
timeout: int,
request: Any,
process: Any,
) -> None:
local_handle: Optional[MailboxHandle] = None
join_requested = False
while not join_requested:
time_... | python | wandb/sdk/wandb_run.py | 201 | 242 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,718 | check_network_status | def check_network_status(self) -> None:
def _process_network_status(result: Result) -> None:
network_status = result.response.network_status_response
for hr in network_status.network_responses:
if (
hr.http_status_code == 200 or hr.http_status_code == ... | python | wandb/sdk/wandb_run.py | 244 | 265 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,719 | _process_network_status | def _process_network_status(result: Result) -> None:
network_status = result.response.network_status_response
for hr in network_status.network_responses:
if (
hr.http_status_code == 200 or hr.http_status_code == 0
): # we use 0 for non-http er... | python | wandb/sdk/wandb_run.py | 245 | 257 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,720 | check_stop_status | def check_stop_status(self) -> None:
def _process_stop_status(result: Result) -> None:
stop_status = result.response.stop_status_response
if stop_status.run_should_stop:
# TODO(frz): This check is required
# until WB-3606 is resolved on server side.
... | python | wandb/sdk/wandb_run.py | 267 | 283 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,721 | _process_stop_status | def _process_stop_status(result: Result) -> None:
stop_status = result.response.stop_status_response
if stop_status.run_should_stop:
# TODO(frz): This check is required
# until WB-3606 is resolved on server side.
if not wandb.agents.pyagent.is_runn... | python | wandb/sdk/wandb_run.py | 268 | 275 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,722 | stop | def stop(self) -> None:
self._join_event.set()
with self._stop_status_lock:
if self._stop_status_handle:
self._stop_status_handle.abandon()
with self._network_status_lock:
if self._network_status_handle:
self._network_status_handle.abandon(... | python | wandb/sdk/wandb_run.py | 285 | 292 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,723 | join | def join(self) -> None:
self.stop()
self._stop_thread.join()
self._network_status_thread.join() | python | wandb/sdk/wandb_run.py | 294 | 297 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,724 | _attach | def _attach(cls, func: Callable) -> Callable:
@functools.wraps(func)
def wrapper(self: Type["Run"], *args: Any, **kwargs: Any) -> Any:
# * `_attach_id` is only assigned in service hence for all non-service cases
# it will be a passthrough.
# * `_attach_pid` is only as... | python | wandb/sdk/wandb_run.py | 307 | 336 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,725 | wrapper | def wrapper(self: Type["Run"], *args: Any, **kwargs: Any) -> Any:
# * `_attach_id` is only assigned in service hence for all non-service cases
# it will be a passthrough.
# * `_attach_pid` is only assigned in _init (using _attach_pid guarantees single attach):
# - for n... | python | wandb/sdk/wandb_run.py | 309 | 334 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,726 | _noop_on_finish | def _noop_on_finish(cls, message: str = "", only_warn: bool = False) -> Callable:
def decorator_fn(func: Callable) -> Callable:
@functools.wraps(func)
def wrapper_fn(self: Type["Run"], *args: Any, **kwargs: Any) -> Any:
if not getattr(self, "_is_finished", False):
... | python | wandb/sdk/wandb_run.py | 339 | 358 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,727 | decorator_fn | def decorator_fn(func: Callable) -> Callable:
@functools.wraps(func)
def wrapper_fn(self: Type["Run"], *args: Any, **kwargs: Any) -> Any:
if not getattr(self, "_is_finished", False):
return func(self, *args, **kwargs)
default_message = (
... | python | wandb/sdk/wandb_run.py | 340 | 356 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,728 | wrapper_fn | def wrapper_fn(self: Type["Run"], *args: Any, **kwargs: Any) -> Any:
if not getattr(self, "_is_finished", False):
return func(self, *args, **kwargs)
default_message = (
f"Run ({self.id}) is finished. The call to `{func.__name__}` will be ignored. ... | python | wandb/sdk/wandb_run.py | 342 | 354 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,729 | _noop | def _noop(cls, func: Callable) -> Callable:
@functools.wraps(func)
def wrapper(self: Type["Run"], *args: Any, **kwargs: Any) -> Any:
# `_attach_id` is only assigned in service hence for all service cases
# it will be a passthrough. We don't pickle non-service so again a way
... | python | wandb/sdk/wandb_run.py | 361 | 395 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,730 | wrapper | def wrapper(self: Type["Run"], *args: Any, **kwargs: Any) -> Any:
# `_attach_id` is only assigned in service hence for all service cases
# it will be a passthrough. We don't pickle non-service so again a way
# to see that we are in non-service case
if getattr(self, "_atta... | python | wandb/sdk/wandb_run.py | 363 | 393 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,731 | __init__ | def __init__(
self,
settings: Settings,
config: Optional[Dict[str, Any]] = None,
sweep_config: Optional[Dict[str, Any]] = None,
launch_config: Optional[Dict[str, Any]] = None,
) -> None:
# pid is set, so we know if this run object was initialized by this process
... | python | wandb/sdk/wandb_run.py | 531 | 545 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,732 | _init | def _init(
self,
settings: Settings,
config: Optional[Dict[str, Any]] = None,
sweep_config: Optional[Dict[str, Any]] = None,
launch_config: Optional[Dict[str, Any]] = None,
) -> None:
self._settings = settings
self._config = wandb_config.Config()
self.... | python | wandb/sdk/wandb_run.py | 547 | 670 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,733 | _set_iface_pid | def _set_iface_pid(self, iface_pid: int) -> None:
self._iface_pid = iface_pid | python | wandb/sdk/wandb_run.py | 672 | 673 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,734 | _set_iface_port | def _set_iface_port(self, iface_port: int) -> None:
self._iface_port = iface_port | python | wandb/sdk/wandb_run.py | 675 | 676 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,735 | _handle_launch_artifact_overrides | def _handle_launch_artifact_overrides(self) -> None:
if self._settings.launch and (os.environ.get("WANDB_ARTIFACTS") is not None):
try:
artifacts: Dict[str, Any] = json.loads(
os.environ.get("WANDB_ARTIFACTS", "{}")
)
except (ValueError... | python | wandb/sdk/wandb_run.py | 678 | 699 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,736 | _initialize_launch_artifact_maps | def _initialize_launch_artifact_maps(self, artifacts: Dict[str, Any]) -> None:
for key, item in artifacts.items():
self._launch_artifact_mapping[key] = item
artifact_sequence_tuple_or_slot = key.split(":")
if len(artifact_sequence_tuple_or_slot) == 2:
sequenc... | python | wandb/sdk/wandb_run.py | 701 | 711 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,737 | _telemetry_callback | def _telemetry_callback(self, telem_obj: telemetry.TelemetryRecord) -> None:
self._telemetry_obj.MergeFrom(telem_obj)
self._telemetry_obj_dirty = True
self._telemetry_flush() | python | wandb/sdk/wandb_run.py | 713 | 716 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,738 | _telemetry_flush | def _telemetry_flush(self) -> None:
if not self._telemetry_obj_active:
return
if not self._telemetry_obj_dirty:
return
if self._backend and self._backend.interface:
serialized = self._telemetry_obj.SerializeToString()
if serialized == self._telemet... | python | wandb/sdk/wandb_run.py | 718 | 729 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,739 | _freeze | def _freeze(self) -> None:
self._frozen = True | python | wandb/sdk/wandb_run.py | 731 | 732 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,740 | __setattr__ | def __setattr__(self, attr: str, value: object) -> None:
if getattr(self, "_frozen", None) and not hasattr(self, attr):
raise Exception(f"Attribute {attr} is not supported on Run object.")
super().__setattr__(attr, value) | python | wandb/sdk/wandb_run.py | 734 | 737 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,741 | _update_settings | def _update_settings(self, settings: Settings) -> None:
self._settings = settings
self._init_from_settings(settings) | python | wandb/sdk/wandb_run.py | 739 | 741 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,742 | _init_from_settings | def _init_from_settings(self, settings: Settings) -> None:
if settings.entity is not None:
self._entity = settings.entity
if settings.project is not None:
self._project = settings.project
if settings.run_group is not None:
self._group = settings.run_group
... | python | wandb/sdk/wandb_run.py | 743 | 757 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,743 | _make_proto_run | def _make_proto_run(self, run: RunRecord) -> None:
"""Populate protocol buffer RunData for interface/interface."""
if self._entity is not None:
run.entity = self._entity
if self._project is not None:
run.project = self._project
if self._group is not None:
... | python | wandb/sdk/wandb_run.py | 759 | 784 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,744 | _populate_git_info | def _populate_git_info(self) -> None:
# Use user provided git info if available otherwise resolve it from the environment
try:
repo = GitRepo(
root=self._settings.git_root,
remote=self._settings.git_remote,
remote_url=self._settings.git_remote_... | python | wandb/sdk/wandb_run.py | 786 | 798 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,745 | __deepcopy__ | def __deepcopy__(self, memo: Dict[int, Any]) -> "Run":
return self | python | wandb/sdk/wandb_run.py | 800 | 801 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,746 | __getstate__ | def __getstate__(self) -> Any:
"""Return run state as a custom pickle."""
# We only pickle in service mode
if not self._settings or self._settings._disable_service:
return
_attach_id = self._attach_id
if not _attach_id:
return
return dict(
... | python | wandb/sdk/wandb_run.py | 803 | 817 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,747 | __setstate__ | def __setstate__(self, state: Any) -> None:
"""Set run state from a custom pickle."""
if not state:
return
_attach_id = state.get("_attach_id")
if not _attach_id:
return
if state["_init_pid"] == os.getpid():
raise RuntimeError("attach in the ... | python | wandb/sdk/wandb_run.py | 819 | 831 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,748 | _torch | def _torch(self) -> "wandb.wandb_torch.TorchHistory":
if self._torch_history is None:
self._torch_history = wandb.wandb_torch.TorchHistory()
return self._torch_history | python | wandb/sdk/wandb_run.py | 834 | 837 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,749 | settings | def settings(self) -> Settings:
"""A frozen copy of run's Settings object."""
cp = self._settings.copy()
cp.freeze()
return cp | python | wandb/sdk/wandb_run.py | 841 | 845 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,750 | dir | def dir(self) -> str:
"""The directory where files associated with the run are saved."""
return self._settings.files_dir | python | wandb/sdk/wandb_run.py | 849 | 851 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,751 | config | def config(self) -> wandb_config.Config:
"""Config object associated with this run."""
return self._config | python | wandb/sdk/wandb_run.py | 855 | 857 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,752 | config_static | def config_static(self) -> wandb_config.ConfigStatic:
return wandb_config.ConfigStatic(self._config) | python | wandb/sdk/wandb_run.py | 861 | 862 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,753 | name | def name(self) -> Optional[str]:
"""Display name of the run.
Display names are not guaranteed to be unique and may be descriptive.
By default, they are randomly generated.
"""
if self._name:
return self._name
if not self._run_obj:
return None
... | python | wandb/sdk/wandb_run.py | 866 | 876 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,754 | name | def name(self, name: str) -> None:
with telemetry.context(run=self) as tel:
tel.feature.set_run_name = True
self._name = name
if self._backend and self._backend.interface:
run = self._backend.interface._make_run(self)
self._backend.interface.publish_run(run) | python | wandb/sdk/wandb_run.py | 880 | 886 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,755 | notes | def notes(self) -> Optional[str]:
"""Notes associated with the run, if there are any.
Notes can be a multiline string and can also use markdown and latex equations
inside `$$`, like `$x + 3$`.
"""
if self._notes:
return self._notes
if not self._run_obj:
... | python | wandb/sdk/wandb_run.py | 890 | 900 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,756 | notes | def notes(self, notes: str) -> None:
self._notes = notes
if self._backend and self._backend.interface:
run = self._backend.interface._make_run(self)
self._backend.interface.publish_run(run) | python | wandb/sdk/wandb_run.py | 904 | 908 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,757 | tags | def tags(self) -> Optional[Tuple]:
"""Tags associated with the run, if there are any."""
if self._tags:
return self._tags
run_obj = self._run_obj or self._run_obj_offline
if run_obj:
return tuple(run_obj.tags)
return None | python | wandb/sdk/wandb_run.py | 912 | 919 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,758 | tags | def tags(self, tags: Sequence) -> None:
with telemetry.context(run=self) as tel:
tel.feature.set_run_tags = True
self._tags = tuple(tags)
if self._backend and self._backend.interface:
run = self._backend.interface._make_run(self)
self._backend.interface.publis... | python | wandb/sdk/wandb_run.py | 923 | 929 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,759 | id | def id(self) -> str:
"""Identifier for this run."""
if TYPE_CHECKING:
assert self._run_id is not None
return self._run_id | python | wandb/sdk/wandb_run.py | 933 | 937 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,760 | sweep_id | def sweep_id(self) -> Optional[str]:
"""ID of the sweep associated with the run, if there is one."""
if not self._run_obj:
return None
return self._run_obj.sweep_id or None | python | wandb/sdk/wandb_run.py | 941 | 945 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,761 | _get_path | def _get_path(self) -> str:
parts = [
e for e in [self._entity, self._project, self._run_id] if e is not None
]
return "/".join(parts) | python | wandb/sdk/wandb_run.py | 947 | 951 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,762 | path | def path(self) -> str:
"""Path to the run.
Run paths include entity, project, and run ID, in the format
`entity/project/run_id`.
"""
return self._get_path() | python | wandb/sdk/wandb_run.py | 955 | 961 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,763 | _get_start_time | def _get_start_time(self) -> float:
return (
self._start_time
if not self._run_obj
else (self._run_obj.start_time.ToMicroseconds() / 1e6)
) | python | wandb/sdk/wandb_run.py | 963 | 968 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,764 | start_time | def start_time(self) -> float:
"""Unix timestamp (in seconds) of when the run started."""
return self._get_start_time() | python | wandb/sdk/wandb_run.py | 972 | 974 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,765 | _get_starting_step | def _get_starting_step(self) -> int:
return self._starting_step if not self._run_obj else self._run_obj.starting_step | python | wandb/sdk/wandb_run.py | 976 | 977 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,766 | starting_step | def starting_step(self) -> int:
"""The first step of the run."""
return self._get_starting_step() | python | wandb/sdk/wandb_run.py | 981 | 983 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,767 | resumed | def resumed(self) -> bool:
"""True if the run was resumed, False otherwise."""
return self._run_obj.resumed if self._run_obj else False | python | wandb/sdk/wandb_run.py | 987 | 989 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,768 | step | def step(self) -> int:
"""Current value of the step.
This counter is incremented by `wandb.log`.
"""
return self._step | python | wandb/sdk/wandb_run.py | 993 | 998 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,769 | project_name | def project_name(self) -> str:
run_obj = self._run_obj or self._run_obj_offline
return run_obj.project if run_obj else "" | python | wandb/sdk/wandb_run.py | 1,000 | 1,002 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,770 | mode | def mode(self) -> str:
"""For compatibility with `0.9.x` and earlier, deprecate eventually."""
deprecate.deprecate(
field_name=deprecate.Deprecated.run__mode,
warning_message=(
"The mode property of wandb.run is deprecated "
"and will be removed in... | python | wandb/sdk/wandb_run.py | 1,006 | 1,015 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,771 | offline | def offline(self) -> bool:
return self._settings._offline | python | wandb/sdk/wandb_run.py | 1,019 | 1,020 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,772 | disabled | def disabled(self) -> bool:
return self._settings._noop | python | wandb/sdk/wandb_run.py | 1,024 | 1,025 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,773 | _get_group | def _get_group(self) -> str:
run_obj = self._run_obj or self._run_obj_offline
return run_obj.run_group if run_obj else "" | python | wandb/sdk/wandb_run.py | 1,027 | 1,029 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,774 | group | def group(self) -> str:
"""Name of the group associated with the run.
Setting a group helps the W&B UI organize runs in a sensible way.
If you are doing a distributed training you should give all of the
runs in the training the same group.
If you are doing crossvalidation y... | python | wandb/sdk/wandb_run.py | 1,033 | 1,043 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,775 | job_type | def job_type(self) -> str:
run_obj = self._run_obj or self._run_obj_offline
return run_obj.job_type if run_obj else "" | python | wandb/sdk/wandb_run.py | 1,047 | 1,049 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,776 | project | def project(self) -> str:
"""Name of the W&B project associated with the run."""
return self.project_name() | python | wandb/sdk/wandb_run.py | 1,053 | 1,055 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,777 | log_code | def log_code(
self,
root: Optional[str] = ".",
name: Optional[str] = None,
include_fn: Callable[[str], bool] = _is_py_path,
exclude_fn: Callable[[str], bool] = filenames.exclude_wandb_fn,
) -> Optional[Artifact]:
"""Save the current state of your code to a W&B Artifac... | python | wandb/sdk/wandb_run.py | 1,059 | 1,120 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,778 | get_url | def get_url(self) -> Optional[str]:
"""Return the url for the W&B run, if there is one.
Offline runs will not have a url.
"""
if self._settings._offline:
wandb.termwarn("URL not available in offline run")
return None
return self._settings.run_url | python | wandb/sdk/wandb_run.py | 1,122 | 1,130 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,779 | get_project_url | def get_project_url(self) -> Optional[str]:
"""Return the url for the W&B project associated with the run, if there is one.
Offline runs will not have a project url.
"""
if self._settings._offline:
wandb.termwarn("URL not available in offline run")
return None
... | python | wandb/sdk/wandb_run.py | 1,132 | 1,140 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,780 | get_sweep_url | def get_sweep_url(self) -> Optional[str]:
"""Return the url for the sweep associated with the run, if there is one."""
if self._settings._offline:
wandb.termwarn("URL not available in offline run")
return None
return self._settings.sweep_url | python | wandb/sdk/wandb_run.py | 1,142 | 1,147 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,781 | url | def url(self) -> Optional[str]:
"""The W&B url associated with the run."""
return self.get_url() | python | wandb/sdk/wandb_run.py | 1,151 | 1,153 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,782 | entity | def entity(self) -> str:
"""The name of the W&B entity associated with the run.
Entity can be a user name or the name of a team or organization.
"""
return self._entity or "" | python | wandb/sdk/wandb_run.py | 1,157 | 1,162 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,783 | _label_internal | def _label_internal(
self,
code: Optional[str] = None,
repo: Optional[str] = None,
code_version: Optional[str] = None,
) -> None:
with telemetry.context(run=self) as tel:
if code and RE_LABEL.match(code):
tel.label.code_string = code
if... | python | wandb/sdk/wandb_run.py | 1,164 | 1,176 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,784 | _label | def _label(
self,
code: Optional[str] = None,
repo: Optional[str] = None,
code_version: Optional[str] = None,
**kwargs: str,
) -> None:
if self._settings.label_disable:
return
for k, v in (("code", code), ("repo", repo), ("code_version", code_versi... | python | wandb/sdk/wandb_run.py | 1,178 | 1,204 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,785 | _label_probe_lines | def _label_probe_lines(self, lines: List[str]) -> None:
if not lines:
return
parsed = telemetry._parse_label_lines(lines)
if not parsed:
return
label_dict = {}
code = parsed.get("code") or parsed.get("c")
if code:
label_dict["code"] = c... | python | wandb/sdk/wandb_run.py | 1,206 | 1,222 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,786 | _label_probe_main | def _label_probe_main(self) -> None:
m = sys.modules.get("__main__")
if not m:
return
doc = getattr(m, "__doc__", None)
if not doc:
return
doclines = doc.splitlines()
self._label_probe_lines(doclines) | python | wandb/sdk/wandb_run.py | 1,224 | 1,233 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,787 | _label_probe_notebook | def _label_probe_notebook(self, notebook: Any) -> None:
logger.info("probe notebook")
lines = None
try:
data = notebook.probe_ipynb()
cell0 = data.get("cells", [])[0]
lines = cell0.get("source")
# kaggle returns a string instead of a list
... | python | wandb/sdk/wandb_run.py | 1,236 | 1,250 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,788 | display | def display(self, height: int = 420, hidden: bool = False) -> bool:
"""Display this run in jupyter."""
if self._settings._jupyter and ipython.in_jupyter():
ipython.display_html(self.to_html(height, hidden))
return True
else:
wandb.termwarn(".display() only wor... | python | wandb/sdk/wandb_run.py | 1,253 | 1,260 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,789 | to_html | def to_html(self, height: int = 420, hidden: bool = False) -> str:
"""Generate HTML containing an iframe displaying the current run."""
url = self._settings.run_url + "?jupyter=true"
style = f"border:none;width:100%;height:{height}px;"
prefix = ""
if hidden:
style += ... | python | wandb/sdk/wandb_run.py | 1,263 | 1,271 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,790 | _repr_mimebundle_ | def _repr_mimebundle_(
self, include: Optional[Any] = None, exclude: Optional[Any] = None
) -> Dict[str, str]:
return {"text/html": self.to_html(hidden=True)} | python | wandb/sdk/wandb_run.py | 1,273 | 1,276 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,791 | _config_callback | def _config_callback(
self,
key: Optional[Union[Tuple[str, ...], str]] = None,
val: Optional[Any] = None,
data: Optional[Dict[str, object]] = None,
) -> None:
logger.info(f"config_cb {key} {val} {data}")
if self._backend and self._backend.interface:
self._... | python | wandb/sdk/wandb_run.py | 1,279 | 1,287 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,792 | _config_artifact_callback | def _config_artifact_callback(
self, key: str, val: Union[str, Artifact, dict]
) -> Union[Artifact, public.Artifact]:
# artifacts can look like dicts as they are passed into the run config
# since the run config stores them on the backend as a dict with fields shown
# in wandb.util.a... | python | wandb/sdk/wandb_run.py | 1,289 | 1,324 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,793 | _set_config_wandb | def _set_config_wandb(self, key: str, val: Any) -> None:
self._config_callback(key=("_wandb", key), val=val) | python | wandb/sdk/wandb_run.py | 1,326 | 1,327 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,794 | _summary_update_callback | def _summary_update_callback(self, summary_record: SummaryRecord) -> None:
if self._backend and self._backend.interface:
self._backend.interface.publish_summary(summary_record) | python | wandb/sdk/wandb_run.py | 1,330 | 1,332 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,795 | _on_progress_get_summary | def _on_progress_get_summary(self, handle: MailboxProgress) -> None:
pass
# TODO(jhr): enable printing for get_summary in later mailbox dev phase
# line = "Waiting for run.summary data..."
# self._printer.display(line) | python | wandb/sdk/wandb_run.py | 1,334 | 1,338 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,796 | _summary_get_current_summary_callback | def _summary_get_current_summary_callback(self) -> Dict[str, Any]:
if not self._backend or not self._backend.interface:
return {}
handle = self._backend.interface.deliver_get_summary()
result = handle.wait(
timeout=self._settings.summary_timeout,
on_progress=s... | python | wandb/sdk/wandb_run.py | 1,340 | 1,351 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,797 | _metric_callback | def _metric_callback(self, metric_record: MetricRecord) -> None:
if self._backend and self._backend.interface:
self._backend.interface._publish_metric(metric_record) | python | wandb/sdk/wandb_run.py | 1,353 | 1,355 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,798 | _datatypes_callback | def _datatypes_callback(self, fname: str) -> None:
if not self._backend or not self._backend.interface:
return
files: "FilesDict" = dict(files=[(GlobStr(glob.escape(fname)), "now")])
self._backend.interface.publish_files(files) | python | wandb/sdk/wandb_run.py | 1,357 | 1,361 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,799 | _visualization_hack | def _visualization_hack(self, row: Dict[str, Any]) -> Dict[str, Any]:
# TODO(jhr): move visualize hack somewhere else
chart_keys = set()
for k in row:
if isinstance(row[k], Visualize):
key = row[k].get_config_key(k)
value = row[k].get_config_value(k)
... | python | wandb/sdk/wandb_run.py | 1,363 | 1,386 | {
"name": "Git-abouvier/wandb",
"url": "https://github.com/Git-abouvier/wandb.git",
"license": "MIT",
"stars": 0,
"forks": 0
} |
2,800 | _partial_history_callback | def _partial_history_callback(
self,
row: Dict[str, Any],
step: Optional[int] = None,
commit: Optional[bool] = None,
) -> None:
row = row.copy()
if row:
row = self._visualization_hack(row)
if self._backend and self._backend.interface:
... | python | wandb/sdk/wandb_run.py | 1,388 | 1,407 | {
"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.