Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wb-21fd5541-sdk-testing.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

*,
allow_media_symlink: bool = False,
allow_offline_artifacts: bool = True,
allow_val_change: bool = False,
anonymous: object = object(),
api_key: str | None = None,
azure_account_url_to_access_key: dict[str, str] | None = None,
app_url_override: str | None = None,
base_url: str = 'https://api.wandb.ai',
code_dir: str | None = None,
config_paths: collections.abc.Sequence[str] | None = None,
console: Literal['auto', 'off', 'wrap', 'redirect', 'wrap_raw', 'wrap_emu'] = 'auto',
console_multipart: bool = False,
console_chunk_max_bytes: int = 0,
console_chunk_max_seconds: int = 0,
capture_loggers: dict[str, str] | None = None,
credentials_file: str = <factory>,
disable_code: bool = False,
disable_git: bool = False,
disable_git_fork_point: bool = True,
disable_job_creation: bool = True,
docker: str | None = None,
email: str | None = None,
entity: str | None = None,
organization: str | None = None,
force: bool = False,
fork_from: wandb.sdk.lib.run_moment.RunMoment | None = None,
git_commit: str | None = None,
git_remote: str = 'origin',
git_remote_url: str | None = None,
git_root: str | None = None,
heartbeat_seconds: int = 30,
host: str | None = None,
http_proxy: str | None = None,
https_proxy: str | None = None,
identity_token_file: str | None = None,
ignore_globs: collections.abc.Sequence[str] = (),
init_timeout: float = 90.0,
finish_timeout: float = 0.0,
finish_timeout_raises: bool = False,
insecure_disable_ssl: bool = False,
job_name: str | None = None,
job_source: Optional[Literal['repo', 'artifact', 'image']] = None,
label_disable: bool = False,
launch: bool = False,
launch_config_path: str | None = None,
login_timeout: float | None = None,
mode: Literal['online', 'offline', 'shared', 'disabled', 'dryrun', 'run'] = 'online',
notebook_name: str | None = None,
program: str | None = None,
program_abspath: str | None = None,
program_relpath: str | None = None,
project: str | None = None,
quiet: bool = False,
reinit: Union[Literal['default', 'return_previous', 'finish_previous', 'create_new'], bool] = 'default',
relogin: bool = False,
resume: Optional[Literal['allow', 'must', 'never', 'auto']] = None,
resume_from: wandb.sdk.lib.run_moment.RunMoment | None = None,
resumed: bool = False,
root_dir: str = <factory>,
run_group: str | None = None,
run_id: str | None = None,
run_job_type: str | None = None,
run_name: str | None = None,
run_notes: str | None = None,
run_tags: tuple[str, ...] | None = None,
sagemaker_disable: bool = False,
save_code: bool | None = None,
settings_system: str | None = None,
stop_fn: collections.abc.Callable[[], None] | None = None,
max_end_of_run_history_metrics: int = 10,
max_end_of_run_summary_metrics: int = 10,
show_colors: bool | None = None,
show_emoji: bool | None = None,
show_errors: bool = True,
show_info: bool = True,
show_warnings: bool = True,
silent: bool = False,
start_method: str | None = None,
stop_on_fatal_error: bool = False,
strict: bool | None = None,
summary_timeout: int = 60,
summary_warnings: int = 5,
sweep_id: str | None = None,
sweep_param_path: str | None = None,
symlink: bool = <factory>,
sync_tensorboard: bool | None = None,
table_raise_on_max_row_limit_exceeded: bool = False,
use_dot_wandb: bool | None = None,
username: str | None = None,
x_cli_only_mode: bool = False,
x_disable_meta: bool = False,
x_disable_stats: bool = False,
x_disable_viewer: bool = False,
x_disable_machine_info: bool = False,
x_executable: str | None = None,
x_extra_http_headers: dict[str, str] | None = None,
x_file_stream_max_bytes: int | None = None,
x_file_stream_max_line_bytes: int | None = None,
x_file_stream_transmit_interval: float | None = None,
x_file_stream_retry_max: int | None = None,
x_file_stream_retry_wait_min_seconds: float | None = None,
x_file_stream_retry_wait_max_seconds: float | None = None,
x_file_stream_timeout_seconds: float | None = None,
x_file_transfer_retry_max: int | None = None,
x_file_transfer_retry_wait_min_seconds: float | None = None,
x_file_transfer_retry_wait_max_seconds: float | None = None,
x_file_transfer_timeout_seconds: float | None = None,
x_files_dir: str | None = None,
x_flow_control_custom: bool | None = None,
x_flow_control_disabled: bool | None = None,
x_graphql_retry_max: int | None = None,
x_graphql_retry_wait_min_seconds: float | None = None,
x_graphql_retry_wait_max_seconds: float | None = None,
x_graphql_timeout_seconds: float | None = None,
x_internal_check_process: float = 8.0,
x_jupyter_name: str | None = None,
x_jupyter_path: str | None = None,
x_jupyter_root: str | None = None,
x_label: str | None = None,
x_live_policy_rate_limit: int | None = None,
x_live_policy_wait_time: int | None = None,
x_log_level: int = 20,
x_network_buffer: int | None = None,
x_primary: bool = True,
x_proxies: dict[str, str] | None = None,
x_runqueue_item_id: str | None = None,
x_save_requirements: bool = True,
x_server_side_derived_summary: bool = False,
x_server_side_expand_glob_metrics: bool = True,
x_service_transport: str | None = None,
x_service_wait: float = 30.0,
x_skip_transaction_log: bool = False,
x_start_time: float | None = None,
x_stats_pid: int = 50165,
x_stats_sampling_interval: float = 15.0,
x_stats_neuron_monitor_config_path: str | None = None,
x_stats_dcgm_exporter: str | None = None,
x_stats_open_metrics_endpoints: dict[str, str] | None = None,
x_stats_open_metrics_filters: dict[str, dict[str, str]] | collections.abc.Sequence[str] | None = None,
x_stats_open_metrics_http_headers: dict[str, str] | None = None,
x_stats_disk_paths: collections.abc.Sequence[str] | None = ('/',),
x_stats_cpu_count: int | None = None,
x_stats_cpu_logical_count: int | None = None,
x_stats_gpu_count: int | None = None,
x_stats_gpu_type: str | None = None,
x_stats_gpu_device_ids: collections.abc.Sequence[int] | None = None,
x_stats_buffer_size: int = 0,
x_stats_coreweave_metadata_base_url: str = 'http://169.254.169.254',
x_stats_coreweave_metadata_endpoint: str = '/api/v2/cloud-init/meta-data',
x_stats_track_process_tree: bool = False,
x_stats_no_cgroup: bool = False,
x_sync: bool = False,
x_sync_dir_suffix: str = '',
x_update_finish_state: bool = True

Description

Settings for the W&B SDK. This class manages configuration settings for the W&B SDK, ensuring type safety and validation of all settings. Settings are accessible as attributes and can be initialized programmatically, through environment variables (WANDB_ prefix), and with configuration files. The settings are organized into three categories:
  1. Public settings: Core configuration options that users can safely modify to customize W&B’s behavior for their specific needs.
  2. Internal settings: Settings prefixed with ‘x_’ that handle low-level SDK behavior. These settings are primarily for internal use and debugging. While they can be modified, they are not considered part of the public API and may change without notice in future versions.
  3. Computed settings: Read-only settings that are automatically derived from other settings or the environment.

Args

  • allow_media_symlink:
  • allow_offline_artifacts:
  • allow_val_change:
  • anonymous:
  • api_key:
  • azure_account_url_to_access_key:
  • app_url_override:
  • base_url:
  • code_dir:
  • config_paths:
  • console:
  • console_multipart:
  • console_chunk_max_bytes:
  • console_chunk_max_seconds:
  • capture_loggers:
  • credentials_file:
  • disable_code:
  • disable_git:
  • disable_git_fork_point:
  • disable_job_creation:
  • docker:
  • email:
  • entity:
  • organization:
  • force:
  • fork_from:
  • git_commit:
  • git_remote:
  • git_remote_url:
  • git_root:
  • heartbeat_seconds:
  • host:
  • http_proxy:
  • https_proxy:
  • identity_token_file:
  • ignore_globs:
  • init_timeout:
  • finish_timeout:
  • finish_timeout_raises:
  • insecure_disable_ssl:
  • job_name:
  • job_source:
  • label_disable:
  • launch:
  • launch_config_path:
  • login_timeout:
  • mode:
  • notebook_name:
  • program:
  • program_abspath:
  • program_relpath:
  • project:
  • quiet:
  • reinit:
  • relogin:
  • resume:
  • resume_from:
  • resumed:
  • root_dir:
  • run_group:
  • run_id:
  • run_job_type:
  • run_name:
  • run_notes:
  • run_tags:
  • sagemaker_disable:
  • save_code:
  • settings_system:
  • stop_fn:
  • max_end_of_run_history_metrics:
  • max_end_of_run_summary_metrics:
  • show_colors:
  • show_emoji:
  • show_errors:
  • show_info:
  • show_warnings:
  • silent:
  • start_method:
  • stop_on_fatal_error:
  • strict:
  • summary_timeout:
  • summary_warnings:
  • sweep_id:
  • sweep_param_path:
  • symlink:
  • sync_tensorboard:
  • table_raise_on_max_row_limit_exceeded:
  • use_dot_wandb:
  • username:
  • x_cli_only_mode:
  • x_disable_meta:
  • x_disable_stats:
  • x_disable_viewer:
  • x_disable_machine_info:
  • x_executable:
  • x_extra_http_headers:
  • x_file_stream_max_bytes:
  • x_file_stream_max_line_bytes:
  • x_file_stream_transmit_interval:
  • x_file_stream_retry_max:
  • x_file_stream_retry_wait_min_seconds:
  • x_file_stream_retry_wait_max_seconds:
  • x_file_stream_timeout_seconds:
  • x_file_transfer_retry_max:
  • x_file_transfer_retry_wait_min_seconds:
  • x_file_transfer_retry_wait_max_seconds:
  • x_file_transfer_timeout_seconds:
  • x_files_dir:
  • x_flow_control_custom:
  • x_flow_control_disabled:
  • x_graphql_retry_max:
  • x_graphql_retry_wait_min_seconds:
  • x_graphql_retry_wait_max_seconds:
  • x_graphql_timeout_seconds:
  • x_internal_check_process:
  • x_jupyter_name:
  • x_jupyter_path:
  • x_jupyter_root:
  • x_label:
  • x_live_policy_rate_limit:
  • x_live_policy_wait_time:
  • x_log_level:
  • x_network_buffer:
  • x_primary:
  • x_proxies:
  • x_runqueue_item_id:
  • x_save_requirements:
  • x_server_side_derived_summary:
  • x_server_side_expand_glob_metrics:
  • x_service_transport:
  • x_service_wait:
  • x_skip_transaction_log:
  • x_start_time:
  • x_stats_pid:
  • x_stats_sampling_interval:
  • x_stats_neuron_monitor_config_path:
  • x_stats_dcgm_exporter:
  • x_stats_open_metrics_endpoints:
  • x_stats_open_metrics_filters:
  • x_stats_open_metrics_http_headers:
  • x_stats_disk_paths:
  • x_stats_cpu_count:
  • x_stats_cpu_logical_count:
  • x_stats_gpu_count:
  • x_stats_gpu_type:
  • x_stats_gpu_device_ids:
  • x_stats_buffer_size:
  • x_stats_coreweave_metadata_base_url:
  • x_stats_coreweave_metadata_endpoint:
  • x_stats_track_process_tree:
  • x_stats_no_cgroup:
  • x_sync:
  • x_sync_dir_suffix:
  • x_update_finish_state:

Properties

property app_url

The URL for the W&B UI, usually https://wandb.ai. This is different from base_url (like https://api.wandb.ai) which is used to access W&B APIs programmatically.

property colab_url

The URL to the Colab notebook, if running in Colab.

property deployment

property files_dir

Absolute path to the local directory where the run’s files are stored.

property is_local

property log_dir

The directory for storing log files.

property log_internal

The path to the file to use for internal logs. The path to the symlink to the internal log file of the most recent run. The path to the symlink to the user-process log file of the most recent run.

property log_user

The path to the file to use for user-process logs.

property project_url

The W&B URL where the project can be viewed.

property resume_fname

The path to the resume file.

property run_mode

The mode of the run. Can be either “run” or “offline-run”.

property run_url

The W&B URL where the run can be viewed.

property settings_workspace

The path to the workspace settings file.

property sweep_url

The W&B URL where the sweep can be viewed.

property sync_dir

The directory for storing the run’s files.

property sync_file

Path to the append-only binary transaction log file. Path to the symlink to the most recent run’s transaction log file.

property timespec

The time specification for the run.

property wandb_dir

Full path to the wandb directory.

Methods

method construct

_fields_set: 'set[str] | None' = None, **values: 'Any'
Arguments
  • _fields_set:
  • values:

method copy

self, *,
include: 'AbstractSetIntStr | MappingIntStrAny | None' = None,
exclude: 'AbstractSetIntStr | MappingIntStrAny | None' = None,
update: 'Dict[str, Any] | None' = None,
deep: 'bool' = False
Returns a copy of the model. !!! warning “Deprecated” This method is now deprecated; use model_copy instead. If you need include or exclude, use:
data = self.model_dump(include=include, exclude=exclude, round_trip=True)
data = {**data, **(update or {})}
copied = self.model_validate(data)
Arguments
  • include: Optional set or mapping specifying which fields to include in the copied model.
  • exclude: Optional set or mapping specifying which fields to exclude in the copied model.
  • update: Optional dictionary of field-value pairs to override field values in the copied model.
  • deep: If True, the values of fields that are Pydantic models will be deep-copied.

method dict

self, *,
include: 'IncEx | None' = None,
exclude: 'IncEx | None' = None,
by_alias: 'bool' = False,
exclude_unset: 'bool' = False,
exclude_defaults: 'bool' = False,
exclude_none: 'bool' = False
Arguments
  • include:
  • exclude:
  • by_alias:
  • exclude_unset:
  • exclude_defaults:
  • exclude_none:

method from_orm

obj: 'Any'
Arguments
  • obj:

method json

self, *,
include: 'IncEx | None' = None,
exclude: 'IncEx | None' = None,
by_alias: 'bool' = False,
exclude_unset: 'bool' = False,
exclude_defaults: 'bool' = False,
exclude_none: 'bool' = False,
encoder: 'Callable[[Any], Any] | None' = PydanticUndefined,
models_as_dict: 'bool' = PydanticUndefined, **dumps_kwargs: 'Any'
Arguments
  • include:
  • exclude:
  • by_alias:
  • exclude_unset:
  • exclude_defaults:
  • exclude_none:
  • encoder:
  • models_as_dict:
  • dumps_kwargs:

method model_construct

_fields_set: 'set[str] | None' = None, **values: 'Any'
Creates a new instance of the Model class with validated data. Creates a new model setting __dict__ and __pydantic_fields_set__ from trusted or pre-validated data. Default values are respected, but no other validation is performed. !!! note model_construct() generally respects the model_config.extra setting on the provided model. That is, if model_config.extra == 'allow', then all extra passed values are added to the model instance’s __dict__ and __pydantic_extra__ fields. If model_config.extra == 'ignore' (the default), then all extra passed values are ignored. Because no validation is performed with a call to model_construct(), having model_config.extra == 'forbid' does not result in an error if extra values are passed, but they will be ignored.
Arguments
  • _fields_set: A set of field names that were originally explicitly set during instantiation. If provided, this is directly used for the [model_fields_set][pydantic.BaseModel.model_fields_set] attribute. Otherwise, the field names from the values argument will be used.
  • values: Trusted or pre-validated data dictionary.

method model_copy

self, *,
update: 'Mapping[str, Any] | None' = None,
deep: 'bool' = False
!!! abstract “Usage Documentation” model_copy Returns a copy of the model. !!! note The underlying instance’s [__dict__][object.dict] attribute is copied. This might have unexpected side effects if you store anything in it, on top of the model fields (e.g. the value of [cached properties][functools.cached_property]).
Arguments
  • update: Values to change/add in the new model. Note: the data is not validated before creating the new model. You should trust this data.
  • deep: Set to True to make a deep copy of the model.

method model_dump

self, *,
mode: "Literal['json', 'python'] | str" = 'python',
include: 'IncEx | None' = None,
exclude: 'IncEx | None' = None,
context: 'Any | None' = None,
by_alias: 'bool | None' = None,
exclude_unset: 'bool' = False,
exclude_defaults: 'bool' = False,
exclude_none: 'bool' = False,
round_trip: 'bool' = False,
warnings: "bool | Literal['none', 'warn', 'error']" = True,
fallback: 'Callable[[Any], Any] | None' = None,
serialize_as_any: 'bool' = False
!!! abstract “Usage Documentation” model_dump Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
Arguments
  • mode: The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
  • include: A set of fields to include in the output.
  • exclude: A set of fields to exclude from the output.
  • context: Additional context to pass to the serializer.
  • by_alias: Whether to use the field’s alias in the dictionary key if defined.
  • exclude_unset: Whether to exclude fields that have not been explicitly set.
  • exclude_defaults: Whether to exclude fields that are set to their default value.
  • exclude_none: Whether to exclude fields that have a value of None.
  • round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
  • warnings: How to handle serialization errors. False/“none” ignores them, True/“warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
  • fallback: A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
  • serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

method model_dump_json

self, *,
indent: 'int | None' = None,
include: 'IncEx | None' = None,
exclude: 'IncEx | None' = None,
context: 'Any | None' = None,
by_alias: 'bool | None' = None,
exclude_unset: 'bool' = False,
exclude_defaults: 'bool' = False,
exclude_none: 'bool' = False,
round_trip: 'bool' = False,
warnings: "bool | Literal['none', 'warn', 'error']" = True,
fallback: 'Callable[[Any], Any] | None' = None,
serialize_as_any: 'bool' = False
!!! abstract “Usage Documentation” model_dump_json Generates a JSON representation of the model using Pydantic’s to_json method.
Arguments
  • indent: Indentation to use in the JSON output. If None is passed, the output will be compact.
  • include: Field(s) to include in the JSON output.
  • exclude: Field(s) to exclude from the JSON output.
  • context: Additional context to pass to the serializer.
  • by_alias: Whether to serialize using field aliases.
  • exclude_unset: Whether to exclude fields that have not been explicitly set.
  • exclude_defaults: Whether to exclude fields that are set to their default value.
  • exclude_none: Whether to exclude fields that have a value of None.
  • round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T].
  • warnings: How to handle serialization errors. False/“none” ignores them, True/“warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
  • fallback: A function to call when an unknown value is encountered. If not provided, a [PydanticSerializationError][pydantic_core.PydanticSerializationError] error is raised.
  • serialize_as_any: Whether to serialize fields with duck-typing serialization behavior.

method model_json_schema

by_alias: 'bool' = True,
ref_template: 'str' = '#/$defs/{model}',
schema_generator: 'type[GenerateJsonSchema]' = <class 'pydantic.json_schema.GenerateJsonSchema'>,
mode: 'JsonSchemaMode' = 'validation'
Generates a JSON schema for a model class.
Arguments
  • by_alias: Whether to use attribute aliases or not.
  • ref_template: The reference template.
  • schema_generator: To override the logic used to generate the JSON schema, as a subclass of GenerateJsonSchema with your desired modifications
  • mode: The mode in which to generate the schema.

method model_parametrized_name

params: 'tuple[type[Any], ...]'
Compute the class name for parametrizations of generic classes. This method can be overridden to achieve a custom naming scheme for generic BaseModels.
Arguments
  • params: Tuple of types of the class. Given a generic class Model with 2 type variables and a concrete model Model[str, int], the value (str, int) would be passed to params.
Raises
  • TypeError: Raised when trying to generate concrete names for non-generic models.

method model_post_init

self,
context: 'Any', /
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
Arguments
  • context:

method model_rebuild

*,
force: 'bool' = False,
raise_errors: 'bool' = True,
_parent_namespace_depth: 'int' = 2,
_types_namespace: 'MappingNamespace | None' = None
Try to rebuild the pydantic-core schema for the model. This may be necessary when one of the annotations is a ForwardRef which could not be resolved during the initial attempt to build the schema, and automatic rebuilding fails.
Arguments
  • force: Whether to force the rebuilding of the model schema, defaults to False.
  • raise_errors: Whether to raise errors, defaults to True.
  • _parent_namespace_depth: The depth level of the parent namespace, defaults to 2.
  • _types_namespace: The types namespace, defaults to None.

method model_validate

obj: 'Any', *,
strict: 'bool | None' = None,
from_attributes: 'bool | None' = None,
context: 'Any | None' = None,
by_alias: 'bool | None' = None,
by_name: 'bool | None' = None
Validate a pydantic model instance.
Arguments
  • obj: The object to validate.
  • strict: Whether to enforce types strictly.
  • from_attributes: Whether to extract data from object attributes.
  • context: Additional context to pass to the validator.
  • by_alias: Whether to use the field’s alias when validating against the provided input data.
  • by_name: Whether to use the field’s name when validating against the provided input data.
Raises
  • ValidationError: If the object could not be validated.

method model_validate_json

json_data: 'str | bytes | bytearray', *,
strict: 'bool | None' = None,
context: 'Any | None' = None,
by_alias: 'bool | None' = None,
by_name: 'bool | None' = None
!!! abstract “Usage Documentation” JSON Parsing Validate the given JSON data against the Pydantic model.
Arguments
  • json_data: The JSON data to validate.
  • strict: Whether to enforce types strictly.
  • context: Extra variables to pass to the validator.
  • by_alias: Whether to use the field’s alias when validating against the provided input data.
  • by_name: Whether to use the field’s name when validating against the provided input data.
Raises
  • ValidationError: If json_data is not a JSON string or the object could not be validated.

method model_validate_strings

obj: 'Any', *,
strict: 'bool | None' = None,
context: 'Any | None' = None,
by_alias: 'bool | None' = None,
by_name: 'bool | None' = None
Validate the given object with string data against the Pydantic model.
Arguments
  • obj: The object containing string data to validate.
  • strict: Whether to enforce types strictly.
  • context: Extra variables to pass to the validator.
  • by_alias: Whether to use the field’s alias when validating against the provided input data.
  • by_name: Whether to use the field’s name when validating against the provided input data.

method parse_file

path: 'str | Path', *,
content_type: 'str | None' = None,
encoding: 'str' = 'utf8',
proto: 'DeprecatedParseProtocol | None' = None,
allow_pickle: 'bool' = False
Arguments
  • path:
  • content_type:
  • encoding:
  • proto:
  • allow_pickle:

method parse_obj

obj: 'Any'
Arguments
  • obj:

method parse_raw

b: 'str | bytes', *,
content_type: 'str | None' = None,
encoding: 'str' = 'utf8',
proto: 'DeprecatedParseProtocol | None' = None,
allow_pickle: 'bool' = False
Arguments
  • b:
  • content_type:
  • encoding:
  • proto:
  • allow_pickle:

method schema

by_alias: 'bool' = True,
ref_template: 'str' = '#/$defs/{model}'
Arguments
  • by_alias:
  • ref_template:

method schema_json

*,
by_alias: 'bool' = True,
ref_template: 'str' = '#/$defs/{model}', **dumps_kwargs: 'Any'
Arguments
  • by_alias:
  • ref_template:
  • dumps_kwargs:

method update_forward_refs

**localns: 'Any'
Arguments
  • localns:

method validate

value: 'Any'
Arguments
  • value:

method validate_anonymous

value: 'object'
Arguments
  • value:

method validate_x_extra_http_headers

(value)
Arguments
  • value:

method validate_x_stats_coreweave_metadata_base_url

(value)
Arguments
  • value: