Skip to content

Move to dependency groups approach for pip installs#570

Merged
joewallwork merged 6 commits into368_rework-pt2tsfrom
368_rework-pt2ts-dependency-groups
Mar 26, 2026
Merged

Move to dependency groups approach for pip installs#570
joewallwork merged 6 commits into368_rework-pt2tsfrom
368_rework-pt2ts-dependency-groups

Conversation

@joewallwork
Copy link
Copy Markdown
Collaborator

Merges into #555

This PR moves the pip install approach to make use of dependency groups, which will soon be the recommended approach. They will replace the use of requirements.txt (and requirements-dev.txt, etc) and also extras like [dev].

@joewallwork joewallwork self-assigned this Mar 26, 2026
@joewallwork joewallwork added testing Related to FTorch testing build Related to installing/building FTorch and its dependencies labels Mar 26, 2026
@joewallwork joewallwork mentioned this pull request Mar 26, 2026
29 tasks
@joewallwork joewallwork marked this pull request as ready for review March 26, 2026 11:30
Copy link
Copy Markdown
Member

@jatkinson1000 jatkinson1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @joewallwork generally happy with the premise here

I wonder whether we want dependency-groups over optional-dependencies though?
Also, simple users may not be so familiar with the developer Python features, so I'd either explicitly link to the installation instructions from the README examples or provide specific installation commands as part of the tutorial.

@jatkinson1000
Copy link
Copy Markdown
Member

Sorry to be pedantic over 3bd91d2, but I don't think NumPy is a core dependency of FTorch itself, only of pt2ts/ftorch-utils or the examples?

And if installing ftorch-utils it will be pulled as a dependency of that automatically.

@joewallwork
Copy link
Copy Markdown
Collaborator Author

Sorry to be pedantic over 3bd91d2, but I don't think NumPy is a core dependency of FTorch itself, only of pt2ts/ftorch-utils or the examples?

And if installing ftorch-utils it will be pulled as a dependency of that automatically.

Ah yeah I misunderstood. Addressed in d7f23e6.

@jatkinson1000
Copy link
Copy Markdown
Member

Ah yeah I misunderstood. Addressed in d7f23e6.

Whilst not a core dependency of FTorch, I think I'd keep it as a main dependency in the pyproject.toml file to prevent warnings when using pt2ts?

@joewallwork
Copy link
Copy Markdown
Collaborator Author

Whilst not a core dependency of FTorch, I think I'd keep it as a main dependency in the pyproject.toml file to prevent warnings when using pt2ts?

Done in 9608aa2.

Copy link
Copy Markdown
Member

@jatkinson1000 jatkinson1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joewallwork Go Go Goooooo (once tests pass)

@joewallwork joewallwork merged commit 8c380ec into 368_rework-pt2ts Mar 26, 2026
14 checks passed
@joewallwork joewallwork deleted the 368_rework-pt2ts-dependency-groups branch March 26, 2026 14:58
joewallwork added a commit that referenced this pull request Mar 26, 2026
* Make pt2ts runnable
* Rename utils as ftorch_utils and update README
* Separate TorchScript utils into a module
* Implement load_pytorch_model
* Move to pyproject.toml
* Install pt2ts into the Python environment
* Install ftorch_utils in CI workflows
* Enable testing in pt2ts
* Use pt2ts script in examples
* Changelog
* Update example READMEs
* Update mention of pt2ts script in the docs
* Improve clarity of GPU device docs
* Add note on ResNet example
* Rename ResNet old-style pt2ts to write_torchscript
* Use better naming scheme for PyTorch and TorchScript model files
* Save example models in binary dirs
* Use --extra-index-url and mention in docs
* Add release checklist step for updating ftorch_utils version
* Move to dependency groups approach for `pip install`s (#570)

---------

Co-authored-by: Jack Atkinson <109271713+jatkinson1000@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Related to installing/building FTorch and its dependencies testing Related to FTorch testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants