Commit Graph

11 Commits

Author SHA1 Message Date
Jiaxiao Zheng e0c814451d
chore(sdk): Add annotations for new-styled KFP component (#4989)
* undeprecate and add annotation

* fix the case for missing metadata

* resolve comments

* apply suggestion
2021-01-15 11:17:51 -08:00
Alexey Volkov 691eefc599
fix(sdk): Components - Fixed python components that use \n. Fixes #4939 (#4993)
* SDK - Components - Fixed python components that use \n

The escape sequence was being replaced by the `echo` command.

Apparently, unlike in the `bash` shell, the `echo` command of the `sh` shell expands the escape sequences by default and does not support an option to turn it off. (For some reason the -n option works properly even though it should not).

Fixes https://github.com/kubeflow/pipelines/issues/4939

* Fixed the test data

* Fixed the deprecated container component builder

* Fixed the new compiler test case

* Added test
2021-01-14 18:21:51 -08:00
Alexey Volkov 7a66414cf7
feat(sdk): Components - Restored stack traces in lightweight python components. Fixes #4273, #4849 (#4861)
Currently were running the python code inline using `python -c <code>`.
This has two issues:
1) Python does not show source code line in exception stack traces
2) inspect.getsource does not work. This method is used in PyTorch JIT for example.

We solve these issues by writing the code into a file before executing it.

The disadvantage of the new approach is that it adds complexity, a filesystem write operation and also requires the `sh` executable to be present (we could replace it with python-based program if needed).
2020-12-14 14:33:49 -08:00
Alex Latchford 704c8c7660
chore: Clean up KFP SDK docstrings, make formatting a little more consistent (#4218)
* Prepare SDK docs environment so its easier to understand how to build the docs locally so theyre consistent with ReadTheDocs.

* Clean up docstrings for kfp.Client

* Add in updates to the docs for compiler and components

* Update components area to add in code references and make formatting a little more consistent.

* Clean up containers, add in custom CSS to ensure we do not overflow on inline code blocks

* Clean up containers, add in custom CSS to ensure we do not overflow on inline code blocks

* Remove unused kfp.notebook package links

* Clean up a few more errant references

* Clean up the DSL docs some more

* Update SDK docs for KFP extensions to follow Sphinx guidelines

* Clean up formatting of docstrings after Ark-Kuns comments
2020-08-04 00:33:47 +08:00
Alexey Volkov 55d41df83d
SDK - Components - Removed the deprecated _python_op.get_default_base_image and set_default_base_image functions (#3773) 2020-05-17 20:23:36 -07:00
Alexey Volkov 659a101edf SDK - Components - Deprecated build_python_component (#2277) 2019-10-07 17:53:18 -07:00
Alexey Volkov 71c7100083 SDK - Containers - Made python package installation more robust (#2316)
Fixes https://github.com/kubeflow/pipelines/issues/2252
On some systems (e.g. in DL VM containers) `pip3` does not point to the same environment as `python3`.
2019-10-07 13:35:11 -07:00
Alexey Volkov 9fea2a71c1 SDK - Containers - Deprecated build_docker_image (#2276) 2019-10-04 14:57:11 -07:00
Alexey Volkov b2f1d0071f SDK - Components - Added the ComponentSpec.save method (#2264)
* SDK - Components - Added the ComponentSpec.save method

* Fixed write call
2019-10-03 15:25:55 -07:00
sina chavoshi 02f5bc08ff remove default namespace (#2250)
* remove default namespace

* updated args description

* updated comment per feedback.
2019-09-27 16:23:40 -07:00
Alexey Volkov 342abae27a SDK - Moved the _container_builder from kfp.compiler to kfp.containers (#2192)
* SDK - Moved the _container_builder from kfp.compiler to kfp.containers
This only moves the files. The imports remain the same for now.

* Simplified the imports.
2019-09-25 18:27:06 -07:00