wandb 0.17.3__py3-none-win32.whl → 0.17.5__py3-none-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- wandb/__init__.py +1 -1
 - wandb/apis/internal.py +4 -0
 - wandb/bin/wandb-core +0 -0
 - wandb/cli/cli.py +7 -6
 - wandb/env.py +16 -0
 - wandb/filesync/upload_job.py +1 -1
 - wandb/proto/v3/wandb_internal_pb2.py +339 -328
 - wandb/proto/v3/wandb_settings_pb2.py +2 -2
 - wandb/proto/v4/wandb_internal_pb2.py +326 -323
 - wandb/proto/v4/wandb_settings_pb2.py +2 -2
 - wandb/proto/v5/wandb_internal_pb2.py +326 -323
 - wandb/proto/v5/wandb_settings_pb2.py +2 -2
 - wandb/sdk/artifacts/artifact.py +13 -24
 - wandb/sdk/artifacts/artifact_file_cache.py +35 -13
 - wandb/sdk/artifacts/storage_policies/wandb_storage_policy.py +11 -6
 - wandb/sdk/interface/interface.py +12 -5
 - wandb/sdk/interface/interface_shared.py +9 -7
 - wandb/sdk/internal/handler.py +1 -1
 - wandb/sdk/internal/internal_api.py +67 -14
 - wandb/sdk/internal/sender.py +9 -2
 - wandb/sdk/launch/agent/agent.py +3 -1
 - wandb/sdk/launch/builder/kaniko_builder.py +30 -9
 - wandb/sdk/launch/inputs/internal.py +79 -2
 - wandb/sdk/launch/inputs/manage.py +21 -3
 - wandb/sdk/launch/sweeps/scheduler.py +2 -0
 - wandb/sdk/lib/_settings_toposort_generated.py +3 -0
 - wandb/sdk/lib/credentials.py +141 -0
 - wandb/sdk/lib/tracelog.py +2 -2
 - wandb/sdk/wandb_init.py +12 -2
 - wandb/sdk/wandb_login.py +6 -0
 - wandb/sdk/wandb_manager.py +34 -21
 - wandb/sdk/wandb_run.py +100 -75
 - wandb/sdk/wandb_settings.py +13 -2
 - wandb/sdk/wandb_setup.py +12 -13
 - wandb/util.py +29 -11
 - {wandb-0.17.3.dist-info → wandb-0.17.5.dist-info}/METADATA +1 -1
 - {wandb-0.17.3.dist-info → wandb-0.17.5.dist-info}/RECORD +40 -39
 - {wandb-0.17.3.dist-info → wandb-0.17.5.dist-info}/WHEEL +0 -0
 - {wandb-0.17.3.dist-info → wandb-0.17.5.dist-info}/entry_points.txt +0 -0
 - {wandb-0.17.3.dist-info → wandb-0.17.5.dist-info}/licenses/LICENSE +0 -0
 
    
        wandb/__init__.py
    CHANGED
    
    | 
         @@ -11,7 +11,7 @@ For scripts and interactive notebooks, see https://github.com/wandb/examples. 
     | 
|
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
            For reference documentation, see https://docs.wandb.com/ref/python.
         
     | 
| 
       13 
13 
     | 
    
         
             
            """
         
     | 
| 
       14 
     | 
    
         
            -
            __version__ = "0.17. 
     | 
| 
      
 14 
     | 
    
         
            +
            __version__ = "0.17.5"
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         | 
| 
       17 
17 
     | 
    
         
             
            # Used with pypi checks and other messages related to pip
         
     | 
    
        wandb/apis/internal.py
    CHANGED
    
    
    
        wandb/bin/wandb-core
    CHANGED
    
    | 
         Binary file 
     | 
    
        wandb/cli/cli.py
    CHANGED
    
    | 
         @@ -678,7 +678,7 @@ def sync( 
     | 
|
| 
       678 
678 
     | 
    
         
             
                skip_console=None,
         
     | 
| 
       679 
679 
     | 
    
         
             
            ):
         
     | 
| 
       680 
680 
     | 
    
         
             
                api = _get_cling_api()
         
     | 
| 
       681 
     | 
    
         
            -
                if api. 
     | 
| 
      
 681 
     | 
    
         
            +
                if not api.is_authenticated:
         
     | 
| 
       682 
682 
     | 
    
         
             
                    wandb.termlog("Login to W&B to sync offline runs")
         
     | 
| 
       683 
683 
     | 
    
         
             
                    ctx.invoke(login, no_offline=True)
         
     | 
| 
       684 
684 
     | 
    
         
             
                    api = _get_cling_api(reset=True)
         
     | 
| 
         @@ -916,7 +916,7 @@ def sweep( 
     | 
|
| 
       916 
916 
     | 
    
         
             
                elif is_state_change_command == 1:
         
     | 
| 
       917 
917 
     | 
    
         
             
                    sweep_id = config_yaml_or_sweep_id
         
     | 
| 
       918 
918 
     | 
    
         
             
                    api = _get_cling_api()
         
     | 
| 
       919 
     | 
    
         
            -
                    if api. 
     | 
| 
      
 919 
     | 
    
         
            +
                    if not api.is_authenticated:
         
     | 
| 
       920 
920 
     | 
    
         
             
                        wandb.termlog("Login to W&B to use the sweep feature")
         
     | 
| 
       921 
921 
     | 
    
         
             
                        ctx.invoke(login, no_offline=True)
         
     | 
| 
       922 
922 
     | 
    
         
             
                        api = _get_cling_api(reset=True)
         
     | 
| 
         @@ -959,7 +959,7 @@ def sweep( 
     | 
|
| 
       959 
959 
     | 
    
         
             
                    return ret
         
     | 
| 
       960 
960 
     | 
    
         | 
| 
       961 
961 
     | 
    
         
             
                api = _get_cling_api()
         
     | 
| 
       962 
     | 
    
         
            -
                if api. 
     | 
| 
      
 962 
     | 
    
         
            +
                if not api.is_authenticated:
         
     | 
| 
       963 
963 
     | 
    
         
             
                    wandb.termlog("Login to W&B to use the sweep feature")
         
     | 
| 
       964 
964 
     | 
    
         
             
                    ctx.invoke(login, no_offline=True)
         
     | 
| 
       965 
965 
     | 
    
         
             
                    api = _get_cling_api(reset=True)
         
     | 
| 
         @@ -1136,7 +1136,7 @@ def launch_sweep( 
     | 
|
| 
       1136 
1136 
     | 
    
         
             
            ):
         
     | 
| 
       1137 
1137 
     | 
    
         
             
                api = _get_cling_api()
         
     | 
| 
       1138 
1138 
     | 
    
         
             
                env = os.environ
         
     | 
| 
       1139 
     | 
    
         
            -
                if api. 
     | 
| 
      
 1139 
     | 
    
         
            +
                if not api.is_authenticated:
         
     | 
| 
       1140 
1140 
     | 
    
         
             
                    wandb.termlog("Login to W&B to use the sweep feature")
         
     | 
| 
       1141 
1141 
     | 
    
         
             
                    ctx.invoke(login, no_offline=True)
         
     | 
| 
       1142 
1142 
     | 
    
         
             
                    api = _get_cling_api(reset=True)
         
     | 
| 
         @@ -1318,6 +1318,7 @@ def launch_sweep( 
     | 
|
| 
       1318 
1318 
     | 
    
         
             
                    launch_scheduler=launch_scheduler_with_queue,
         
     | 
| 
       1319 
1319 
     | 
    
         
             
                    state="PENDING",
         
     | 
| 
       1320 
1320 
     | 
    
         
             
                    prior_runs=prior_runs,
         
     | 
| 
      
 1321 
     | 
    
         
            +
                    template_variable_values=scheduler_args.get("template_variables", None),
         
     | 
| 
       1321 
1322 
     | 
    
         
             
                )
         
     | 
| 
       1322 
1323 
     | 
    
         
             
                sweep_utils.handle_sweep_config_violations(warnings)
         
     | 
| 
       1323 
1324 
     | 
    
         
             
                # Log nicely formatted sweep information
         
     | 
| 
         @@ -1817,7 +1818,7 @@ def launch_agent( 
     | 
|
| 
       1817 
1818 
     | 
    
         
             
            @display_error
         
     | 
| 
       1818 
1819 
     | 
    
         
             
            def agent(ctx, project, entity, count, sweep_id):
         
     | 
| 
       1819 
1820 
     | 
    
         
             
                api = _get_cling_api()
         
     | 
| 
       1820 
     | 
    
         
            -
                if api. 
     | 
| 
      
 1821 
     | 
    
         
            +
                if not api.is_authenticated:
         
     | 
| 
       1821 
1822 
     | 
    
         
             
                    wandb.termlog("Login to W&B to use the sweep agent feature")
         
     | 
| 
       1822 
1823 
     | 
    
         
             
                    ctx.invoke(login, no_offline=True)
         
     | 
| 
       1823 
1824 
     | 
    
         
             
                    api = _get_cling_api(reset=True)
         
     | 
| 
         @@ -1841,7 +1842,7 @@ def scheduler( 
     | 
|
| 
       1841 
1842 
     | 
    
         
             
                sweep_id,
         
     | 
| 
       1842 
1843 
     | 
    
         
             
            ):
         
     | 
| 
       1843 
1844 
     | 
    
         
             
                api = InternalApi()
         
     | 
| 
       1844 
     | 
    
         
            -
                if api. 
     | 
| 
      
 1845 
     | 
    
         
            +
                if not api.is_authenticated:
         
     | 
| 
       1845 
1846 
     | 
    
         
             
                    wandb.termlog("Login to W&B to use the sweep scheduler feature")
         
     | 
| 
       1846 
1847 
     | 
    
         
             
                    ctx.invoke(login, no_offline=True)
         
     | 
| 
       1847 
1848 
     | 
    
         
             
                    api = InternalApi(reset=True)
         
     | 
    
        wandb/env.py
    CHANGED
    
    | 
         @@ -52,6 +52,8 @@ SWEEP_ID = "WANDB_SWEEP_ID" 
     | 
|
| 
       52 
52 
     | 
    
         
             
            HTTP_TIMEOUT = "WANDB_HTTP_TIMEOUT"
         
     | 
| 
       53 
53 
     | 
    
         
             
            FILE_PUSHER_TIMEOUT = "WANDB_FILE_PUSHER_TIMEOUT"
         
     | 
| 
       54 
54 
     | 
    
         
             
            API_KEY = "WANDB_API_KEY"
         
     | 
| 
      
 55 
     | 
    
         
            +
            IDENTITY_TOKEN_FILE = "WANDB_IDENTITY_TOKEN_FILE"
         
     | 
| 
      
 56 
     | 
    
         
            +
            CREDENTIALS_FILE = "WANDB_CREDENTIALS_FILE"
         
     | 
| 
       55 
57 
     | 
    
         
             
            JOB_TYPE = "WANDB_JOB_TYPE"
         
     | 
| 
       56 
58 
     | 
    
         
             
            DISABLE_CODE = "WANDB_DISABLE_CODE"
         
     | 
| 
       57 
59 
     | 
    
         
             
            DISABLE_GIT = "WANDB_DISABLE_GIT"
         
     | 
| 
         @@ -132,6 +134,8 @@ def immutable_keys() -> List[str]: 
     | 
|
| 
       132 
134 
     | 
    
         
             
                    CACHE_DIR,
         
     | 
| 
       133 
135 
     | 
    
         
             
                    USE_V1_ARTIFACTS,
         
     | 
| 
       134 
136 
     | 
    
         
             
                    DISABLE_SSL,
         
     | 
| 
      
 137 
     | 
    
         
            +
                    IDENTITY_TOKEN_FILE,
         
     | 
| 
      
 138 
     | 
    
         
            +
                    CREDENTIALS_FILE,
         
     | 
| 
       135 
139 
     | 
    
         
             
                ]
         
     | 
| 
       136 
140 
     | 
    
         | 
| 
       137 
141 
     | 
    
         | 
| 
         @@ -481,6 +485,18 @@ def get_launch_trace_id(env: Optional[Env] = None) -> Optional[str]: 
     | 
|
| 
       481 
485 
     | 
    
         
             
                return val
         
     | 
| 
       482 
486 
     | 
    
         | 
| 
       483 
487 
     | 
    
         | 
| 
      
 488 
     | 
    
         
            +
            def get_credentials_file(default: str, env: Optional[Env] = None) -> Path:
         
     | 
| 
      
 489 
     | 
    
         
            +
                """Retrieve the path for the credentials file used to save access tokens.
         
     | 
| 
      
 490 
     | 
    
         
            +
             
     | 
| 
      
 491 
     | 
    
         
            +
                The credentials file path can be set via an environment variable, otherwise
         
     | 
| 
      
 492 
     | 
    
         
            +
                the default path is used.
         
     | 
| 
      
 493 
     | 
    
         
            +
                """
         
     | 
| 
      
 494 
     | 
    
         
            +
                if env is None:
         
     | 
| 
      
 495 
     | 
    
         
            +
                    env = os.environ
         
     | 
| 
      
 496 
     | 
    
         
            +
                credentials_file = env.get(CREDENTIALS_FILE, default)
         
     | 
| 
      
 497 
     | 
    
         
            +
                return Path(credentials_file)
         
     | 
| 
      
 498 
     | 
    
         
            +
             
     | 
| 
      
 499 
     | 
    
         
            +
             
     | 
| 
       484 
500 
     | 
    
         
             
            def strtobool(val: str) -> bool:
         
     | 
| 
       485 
501 
     | 
    
         
             
                """Convert a string representation of truth to true or false.
         
     | 
| 
       486 
502 
     | 
    
         | 
    
        wandb/filesync/upload_job.py
    CHANGED
    
    | 
         @@ -110,7 +110,7 @@ class UploadJob: 
     | 
|
| 
       110 
110 
     | 
    
         
             
                        logger.info("Skipped uploading %s", self.save_path)
         
     | 
| 
       111 
111 
     | 
    
         
             
                        self._stats.set_file_deduped(self.save_name)
         
     | 
| 
       112 
112 
     | 
    
         
             
                    else:
         
     | 
| 
       113 
     | 
    
         
            -
                        extra_headers =  
     | 
| 
      
 113 
     | 
    
         
            +
                        extra_headers = self._api._extra_http_headers
         
     | 
| 
       114 
114 
     | 
    
         
             
                        for upload_header in upload_headers:
         
     | 
| 
       115 
115 
     | 
    
         
             
                            key, val = upload_header.split(":", 1)
         
     | 
| 
       116 
116 
     | 
    
         
             
                            extra_headers[key] = val
         
     |