Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove v1alpha3 version #1396

Merged
merged 3 commits into from
Nov 30, 2020

Conversation

andreyvelich
Copy link
Member

Blocked by: #1392.
I removed v1alpha3 version since we use the v1beta1 in Kubeflow manifests.
As well, I removed unused Go packages from Gopkg.toml.

For some reason, v1_time.py and v1_unstructured_unstructured.py is not generated for the v1beta1 SDK. @jinchihe I saw your comment here: #1252 (comment).
Do you know how we can include them to the SDK ?
Can we use Swagger Import Mappings for it ?

/assign @gaocegege @johnugeorge

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@andreyvelich
Copy link
Member Author

andreyvelich commented Nov 27, 2020

I solved above problem by modifying swagger_config.json with this:

 "typeMappings": {
    "V1Time": "datetime",
    "V1UnstructuredUnstructured": "dict()"
  }

I checked our Notebook example and it is working.
What do you think @jinchihe ?
I believe Kubernetes Python client follows the same way for the date:

https://github.com/kubernetes-client/python/blob/master/kubernetes/client/models/apps_v1beta1_deployment_condition.py#L36-L37

@andreyvelich andreyvelich changed the title [WIP] Remove v1alpha3 version Remove v1alpha3 version Nov 27, 2020
@andreyvelich
Copy link
Member Author

After some tests, I think it's better to use object type instead of dict() for the unstructured. "V1UnstructuredUnstructured": "object".
K8s Python lib also follows this type for some attributes, for example here.

In that case, we can use deserialize method to convert object from the dict to Katib model.
I think, we should modify our API to return Katib model objects instead of simple dict so user can easily manipulate them.
What do you think @gaocegege @johnugeorge @jinchihe ?

As well, it is useful in KFP Katib launcher. We can use default mechanism of serialisation de-serialisation instead of writing our own function, like I did here: https://github.com/kubeflow/pipelines/blob/7f101c5e41f1e9cef02e6a94225e97815fc2327f/components/kubeflow/katib-launcher/src/launch_experiment.py#L63-L193.

@johnugeorge
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot merged commit 91e4996 into kubeflow:master Nov 30, 2020
@andreyvelich andreyvelich deleted the remove-v1alpha3-files branch October 6, 2021 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants