This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
add xgboost job python sdk #102
Open
data-infra
wants to merge
1
commit into
kubeflow:master
Choose a base branch
from
data-infra:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
venv/ | ||
.python-version | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
#Ipython Notebook | ||
.ipynb_checkpoints | ||
|
||
# Add more useless files | ||
tox.ini | ||
test-requirements.txt | ||
git_push.sh | ||
.travis.yml | ||
.swagger-codegen | ||
.swagger-codegen-ignore | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
approvers: | ||
- jinchihe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Kubeflow XGBJob SDK | ||
Python SDK for XGB-Operator | ||
|
||
## Requirements. | ||
|
||
Python 2.7 and 3.5+ | ||
|
||
## Installation & Usage | ||
### pip install | ||
|
||
```sh | ||
pip install kubeflow-xgbjob | ||
``` | ||
|
||
Then import the package: | ||
```python | ||
from kubeflow import xgbjob | ||
``` | ||
|
||
### Setuptools | ||
|
||
Install via [Setuptools](http://pypi.python.org/pypi/setuptools). | ||
|
||
```sh | ||
python setup.py install --user | ||
``` | ||
(or `sudo python setup.py install` to install the package for all users) | ||
|
||
|
||
## Getting Started | ||
|
||
Please follow the [sample](examples/kubeflow-xgbjob-sdk.ipynb) to create, update and delete XGBJob. | ||
|
||
## Documentation for API Endpoints | ||
|
||
Class | Method | Description | ||
------------ | ------------- | ------------- | ||
[XGBJobClient](docs/XGBJobClient.md) | [create](docs/XGBJobClient.md#create) | Create XGBJob| | ||
[XGBJobClient](docs/XGBJobClient.md) | [get](docs/XGBJobClient.md#get) | Get or watch the specified XGBJob or all XGBJob in the namespace | | ||
[XGBJobClient](docs/XGBJobClient.md) | [patch](docs/XGBJobClient.md#patch) | Patch the specified XGBJob| | ||
[XGBJobClient](docs/XGBJobClient.md) | [delete](docs/XGBJobClient.md#delete) | Delete the specified XGBJob | | ||
[XGBJobClient](docs/XGBJobClient.md) | [wait_for_job](docs/XGBJobClient.md#wait_for_job) | Wait for the specified job to finish | | ||
[XGBJobClient](docs/XGBJobClient.md) | [wait_for_condition](docs/XGBJobClient.md#wait_for_condition) | Waits until any of the specified conditions occur | | ||
[XGBJobClient](docs/XGBJobClient.md) | [get_job_status](docs/XGBJobClient.md#get_job_status) | Get the XGBJob status| | ||
[XGBJobClient](docs/XGBJobClient.md) | [is_job_running](docs/XGBJobClient.md#is_job_running) | Check if the XGBJob status is Running | | ||
[XGBJobClient](docs/XGBJobClient.md) | [is_job_succeeded](docs/XGBJobClient.md#is_job_succeeded) | Check if the XGBJob status is Succeeded | | ||
[XGBJobClient](docs/XGBJobClient.md) | [get_pod_names](docs/XGBJobClient.md#get_pod_names) | Get pod names of XGBJob | | ||
[XGBJobClient](docs/XGBJobClient.md) | [get_logs](docs/XGBJobClient.md#get_logs) | Get training logs of the XGBJob | | ||
|
||
## Documentation For Models | ||
|
||
- [V1JobCondition](docs/V1JobCondition.md) | ||
- [V1JobStatus](docs/V1JobStatus.md) | ||
- [V1ReplicaSpec](docs/V1ReplicaSpec.md) | ||
- [V1ReplicaStatus](docs/V1ReplicaStatus.md) | ||
- [V1XGBJob](docs/V1XGBJob.md) | ||
- [V1XGBJobList](docs/V1XGBJobList.md) | ||
- [V1XGBJobSpec](docs/V1XGBJobSpec.md) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# coding: utf-8 | ||
|
||
# flake8: noqa | ||
|
||
""" | ||
xgbjob | ||
|
||
Python SDK for XGB-Operator # noqa: E501 | ||
|
||
OpenAPI spec version: v0.1 | ||
|
||
Generated by: https://github.com/swagger-api/swagger-codegen.git | ||
""" | ||
|
||
|
||
from __future__ import absolute_import | ||
|
||
# import utils and constants | ||
from kubeflow.xgbjob.utils import utils | ||
from kubeflow.xgbjob.constants import constants | ||
|
||
# import ApiClient | ||
from kubeflow.xgbjob.api_client import ApiClient | ||
from kubeflow.xgbjob.configuration import Configuration | ||
from kubeflow.xgbjob.api.xgb_job_client import XGBJobClient | ||
|
||
# import models into sdk package | ||
from kubeflow.xgbjob.models.v1_job_condition import V1JobCondition | ||
from kubeflow.xgbjob.models.v1_job_status import V1JobStatus | ||
from kubeflow.xgbjob.models.v1_replica_spec import V1ReplicaSpec | ||
from kubeflow.xgbjob.models.v1_replica_status import V1ReplicaStatus | ||
from kubeflow.xgbjob.models.v1_xgb_job import V1XGBJob | ||
from kubeflow.xgbjob.models.v1_xgb_job_list import V1XGBJobList | ||
from kubeflow.xgbjob.models.v1_xgb_job_spec import V1XGBJobSpec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2019 kubeflow.org. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from __future__ import absolute_import | ||
|
||
# flake8: noqa | ||
|
||
# import apis into api package |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where are these markdown files?