pytorch / pytorch/vision

Use Union in Torchscript

Open
#4,360 4 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement torchscript
Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🚀 The feature

Use Union in Torchscript.

https://github.com/pytorch/pytorch/pull/64234

Motivation, pitch

Now that Union typing support is merged. We can rewrite the workarounds which don't support Union.
E.g we can now proceed with #4323

There maybe more places so we can track them in this Issue too.

Alternatives

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Union typing support in PR #64234 and the related work in issue #4323. Search the repository for TorchScript workarounds that can now use Union; no specific files or tests are named. Done means applicable workarounds are rewritten with Union support and the relevant tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision, machine-learning
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.