Skip to content

Complete packaging the repo for pip installation #1

Description

@eskutcheon

I've begun the process of making this project into a full-fledged Python module, importable by pip, in the new branch submodule_refactor.

Step 1 to accomplish this is to separate the logic as much as possible between training and inference to allow users more flexibility. So far, I've created 3 subdirectories within the first level mcapst/ directory: train, infer, and core. The first two will be separate submodules where we separate training and inference wherever possible so that they're simpler, more lightweight, and more maintainable. They'll have separate CLIs, separate "pipeline" code, and separate requirements and setup scripts. Common low-level functionality will live in core.

I've recently moved everything to the new subdirectories and confirmed that training and inference work at a basic level with my cobbled-together test scripts. I'll be creating __main__.py files in both of these subdirectories to contain setup and dispatcher methods to call train.py and infer.py in their respective subdirectories. CLI will still be supported with the new Python API.

In accordance with PEP-621, I'll be adding a pyproject.toml with separate dependencies defined for train and infer in addition to shared dependencies for both. This should allow users to install submodule dependencies with
pip install mcapst[train] or
pip install mcapst[infer].
More advanced, dynamic setup instructions are still TBD, but would generally follow best practices from PEP-517 and PEP-660

After completing the basic packaging, I will be adding more specific setup instructions to a new README, detailing how to install torch and torchvision for their CUDA or CPU environment. I will also be adding instructions for downloading pre-trained model checkpoints provided by the original CAP-VSTNet repo, but will most likely be creating setup scripts for this later anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions