Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk): Enable containerizing v2 Python components (#6417)
* Refactor and move all v2 related code to under the v2 namespace. Most of the changes are around imports and restructuring of the codebase. While it looks like a lot of code was added, most of the code already existed and was simply moved or copied over to v2. The only exceptions are: - under kfp/v2/components/component_factory.py: some helper functions were copied with simplification from _python_op.py - we no longer strip the `_path` suffix in v2 components. Note: there is still some duplication of code (particularly between component_factory.py and _python_op.py), but it's ok for now since we intend to replace some of this with v2 ComponentSpec + BaseComponent. * Update setup.py. * update tests. * revert accidental change of gcpc * Fix component entrypoint. * Update goldens. * fix tests. * fix merge conflict. * revert gcpc change. * fix tests. * fix tests. * Add type aliases for moved files. * merge and update goldens. * Add a CLI command to help containerize and build v2 components. * Flesh out the CLI for Docker. * update comments. * Support multiple component files in the same directory. * address pr comments. * Let user specify just the directory containing components. The CLI will search for components in all Python files by default. It can also search for a specific filepattern (as supported by pathlib.Path objects). Also add a bunch of tests. * Clean up. * fix merge error. * Fix docker import error for tests. * Update release notes. * address PR comments.
- Loading branch information