Skip to content

[CI] Deprecated API usage in tutorials #3816

@github-actions

Description

@github-actions

cc: @svekars

API Deprecation Report

29 unique deprecation/future warnings found in this build.

Summary (tutorial sources)

Tutorial file DeprecationWarning FutureWarning Total
beginner_source/introyt/autogradyt_tutorial.py 0 1 1
intermediate_source/engine.py 0 1 1
intermediate_source/forward_ad_usage.py 0 2 2
Total 0 4 4

Findings

beginner_source/introyt/autogradyt_tutorial.py

  • Line 485 (FutureWarning): The attribute use_cuda will be deprecated soon, please use use_device = 'cuda' instead.

intermediate_source/engine.py

  • Line 30 (FutureWarning): torch.cuda.amp.autocast(args...) is deprecated. Please use torch.amp.autocast('cuda', args...) instead.

intermediate_source/forward_ad_usage.py

  • Line 203 (FutureWarning): We've integrated functorch into PyTorch. As the final step of the integration, functorch.jvp is deprecated as of PyTorch 2.0 and will be deleted in a future version of PyTorch >= 2.3. Please use torch.func.jvp instead; see the PyTorch 2.0 release notes and/or the torch.func migration guide for more details https://pytorch.org/docs/main/func.migrating.html
  • Line 235 (FutureWarning): We've integrated functorch into PyTorch. As the final step of the integration, functorch.make_functional_with_buffers is deprecated as of PyTorch 2.0 and will be deleted in a future version of PyTorch >= 2.3. Please use torch.func.functional_call instead; see the PyTorch 2.0 release notes and/or the torch.func migration guide for more details https://pytorch.org/docs/main/func.migrating.html

PyTorch warnings

/usr/local/lib/python3.10/dist-packages/torch/jit/_script.py

  • Line 365 (DeprecationWarning): torch.jit.script_method is deprecated. Please switch to torch.compile or torch.export.
  • Line 1488 (DeprecationWarning): torch.jit.script is deprecated. Please switch to torch.compile or torch.export.

/usr/local/lib/python3.10/dist-packages/torch/jit/_trace.py

  • Line 1006 (DeprecationWarning): torch.jit.trace is deprecated. Please switch to torch.compile or torch.export.
  • Line 1145 (DeprecationWarning): torch.jit.trace_method is deprecated. Please switch to torch.compile or torch.export.

PyTorch libraries warnings

/usr/local/lib/python3.10/dist-packages/torchrl/data/tensor_specs.py

  • Line 7085 (DeprecationWarning): The BoundedTensorSpec has been deprecated and will be removed in v0.8. Please use Bounded instead.
  • Line 7085 (DeprecationWarning): The UnboundedContinuousTensorSpec has been deprecated and will be removed in v0.8. Please use Unbounded instead.
  • Line 7085 (DeprecationWarning): The CompositeSpec has been deprecated and will be removed in v0.8. Please use Composite instead.

/usr/local/lib/python3.10/dist-packages/torchrl/objectives/ppo.py

  • Line 445 (DeprecationWarning): 'critic_coef' is deprecated and will be removed in torchrl v0.11. Please use 'critic_coeff' instead.
  • Line 511 (DeprecationWarning): 'entropy_coef' is deprecated and will be removed in torchrl v0.11. Please use 'entropy_coeff' instead.

Third-party dependency warnings

/usr/lib/python3.10/copyreg.py

  • Line 101 (FutureWarning): isinstance(treespec, LeafSpec) is deprecated, use isinstance(treespec, TreeSpec) and treespec.is_leaf() instead.

/usr/local/lib/python3.10/dist-packages/ax/core/map_data.py

  • Line 195 (FutureWarning): The behavior of DataFrame concatenation with empty or all-NA entries is deprecated. In a future version, this will no longer exclude empty or all-NA columns when determining the result dtypes. To retain the old behavior, exclude the relevant entries before the concat operation.

/usr/local/lib/python3.10/dist-packages/ax/modelbridge/transforms/winsorize.py

  • Line 389 (DeprecationWarning): the interpolation= argument to percentile was renamed to method=, which has additional options.

/usr/local/lib/python3.10/dist-packages/gym/utils/passive_env_checker.py

  • Line 233 (DeprecationWarning): np.bool8 is a deprecated alias for np.bool_. (Deprecated NumPy 1.24)

/usr/local/lib/python3.10/dist-packages/gymnasium/utils/passive_env_checker.py

  • Line 249 (DeprecationWarning): np.bool8 is a deprecated alias for np.bool_. (Deprecated NumPy 1.24)

/usr/local/lib/python3.10/dist-packages/ray/_private/worker.py

  • Line 2062 (FutureWarning): Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0

/usr/local/lib/python3.10/dist-packages/ray/data/context.py

  • Line 661 (DeprecationWarning): use_push_based_shuffle is deprecated! Configure shuffle_strategy instead.
  • Line 675 (DeprecationWarning): use_polars is deprecated, please configure use_polars_sort instead.

/usr/local/lib/python3.10/dist-packages/ray/serve/_private/config.py

/usr/local/lib/python3.10/dist-packages/uvicorn/protocols/websockets/websockets_impl.py

  • Line 17 (DeprecationWarning): websockets.server.WebSocketServerProtocol is deprecated

/usr/local/lib/python3.10/dist-packages/websockets/legacy/__init__.py

<unknown>

  • Line 1 (DeprecationWarning): invalid escape sequence '\s'
  • Line 1 (DeprecationWarning): invalid escape sequence '*'
  • Line 2 (DeprecationWarning): invalid escape sequence '\ '

conf.py

  • Line 39 (DeprecationWarning): The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions