Commit Graph

12 Commits

Author SHA1 Message Date
Alexey Volkov d4fd6e16a8
feat(sdk): Components - Added Bool as a known type name (#4597)
* SDK - Components - Added Bool as a known type name

Some components are already using this type name and are starting to fail due to more strict type checking during constant argument serialization.

* Fixed syntax error
2020-10-09 03:49:06 -07:00
Alexey Volkov 03325848fc
feat(sdk): Components - Prevent passing unserializable objects to components. Fixes #4040 (#4496) 2020-09-16 02:23:22 -07:00
Alexey Volkov f773b9c263
SDK - Components - Stabilize JSON serialization by sorting keys (#3879)
* SDK - Components - Stabilize JSON serialization by sorting keys

Otherwise serialization of the default values of the component/pipeline inputs is unstable on Python 3.5.

* Fixed the test data
2020-06-01 03:07:55 -07:00
Alexey Volkov 7ee3244f5b
SDK - Components - Fixed dict-style type annotations (#3107)
Refactored `_data_passing.py` interface to expose functions instead of dictionaries.
2020-02-18 20:40:25 -08:00
Alexey Volkov 8f4f7bc8b6 SDK - Components - Verify the object type when serializing primitive arguments (#2272)
* SDK - Components - Verify the object type when serializing primitive arguments

Fixes an issue where if an input had a primitive type (e.g. `Integer`), you could pass anything to it (e.g. booleans, `ContainerOp`s, functions etc), because it just used `str` as serializer. Now the serializers chack the value type and raise error if the type is incorrect.

* Allow serializing integer when float is required.
2019-10-01 11:55:35 -07:00
Alexey Volkov 7735a14694 SDK - Components - Stop serializing string values (#2227)
This can happen with Lightweight component outputs if they've already been serialized manually.
2019-09-25 20:29:06 -07:00
Alexey Volkov 98fd6c8c32 SDK - Components - Fixed serialization of lists and dicts containing `PipelineParam` items (#2212)
Fixes https://github.com/kubeflow/pipelines/issues/2206
The issue is fixed for both `JSON`-based and `str()`-based serialization.
2019-09-24 19:43:59 -07:00
Alexey Volkov 3a30b2bdcf SDK - Veryfying that the serializer returns string (#1965)
This change was prompted by the failure when b64encode was returning bytes instead of str.
2019-08-27 13:21:12 -07:00
Alexey Volkov d043d165a9 SDK - Components - Add support for the Base64Pickle type (#1946)
* SDK - Components - Add support for the Base64Pickle type

* Make flake8 happy
2019-08-26 18:56:37 -07:00
Alexey Volkov e48d563cb9 SDK - Components - Add support for the List, Dict and Json types (#1945) 2019-08-23 20:12:26 -07:00
Alexey Volkov 11de563852 SDK - Components - Add support for the Boolean type (#1936)
Fixes https://github.com/kubeflow/pipelines/issues/1488
2019-08-23 19:00:26 -07:00
Alexey Volkov 17e18a162e SDK - Components - Improved serialization and deserialization of arguments and defaults (#1934)
* SDK - Components - Improved serialization and deserialization of arguments and defaults

Properly serialize default values and passed arguments using the same code.
Check the types of passed argument values and issue warnings.
Improved argument reference type compatibility checking. When types do not match there is always either error or warning.
When creating component from python function, the input types are now canonicalized.

* Addressed the feedback
2019-08-23 18:18:25 -07:00