-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* lazy load module Signed-off-by: Kevin Su <[email protected]> * lazy load module Signed-off-by: Kevin Su <[email protected]> * import Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * keep structured dataset in flytekit init Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * fixed tess Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * fixed tests Signed-off-by: Kevin Su <[email protected]> * fixed tests Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * move import pandas to __init__ Signed-off-by: Kevin Su <[email protected]> * use lazy import loader instead Signed-off-by: Kevin Su <[email protected]> * Fixed tests Signed-off-by: Kevin Su <[email protected]> * Fixed tests Signed-off-by: Kevin Su <[email protected]> * wip Signed-off-by: Kevin Su <[email protected]> * fix tests Signed-off-by: Kevin Su <[email protected]> * regular import Signed-off-by: Kevin Su <[email protected]> * fixed tests Signed-off-by: Kevin Su <[email protected]> * test Signed-off-by: Kevin Su <[email protected]> * lint Signed-off-by: Kevin Su <[email protected]> * nit Signed-off-by: Kevin Su <[email protected]> * lint Signed-off-by: Kevin Su <[email protected]> --------- Signed-off-by: Kevin Su <[email protected]>
- Loading branch information
1 parent
d778232
commit 5a66411
Showing
23 changed files
with
259 additions
and
142 deletions.
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,22 +1,27 @@ | ||
from dataclasses import dataclass | ||
from typing import Dict, Optional | ||
|
||
from kubernetes.client.models import V1PodSpec | ||
from typing import TYPE_CHECKING, Dict, Optional | ||
|
||
from flytekit.exceptions import user as _user_exceptions | ||
|
||
if TYPE_CHECKING: | ||
from kubernetes.client import V1PodSpec | ||
|
||
PRIMARY_CONTAINER_DEFAULT_NAME = "primary" | ||
|
||
|
||
@dataclass | ||
@dataclass(init=True, repr=True, eq=True, frozen=False) | ||
class PodTemplate(object): | ||
"""Custom PodTemplate specification for a Task.""" | ||
|
||
pod_spec: V1PodSpec = V1PodSpec(containers=[]) | ||
pod_spec: Optional["V1PodSpec"] = None | ||
primary_container_name: str = PRIMARY_CONTAINER_DEFAULT_NAME | ||
labels: Optional[Dict[str, str]] = None | ||
annotations: Optional[Dict[str, str]] = None | ||
|
||
def __post_init__(self): | ||
if self.pod_spec is None: | ||
from kubernetes.client import V1PodSpec | ||
|
||
self.pod_spec = V1PodSpec(containers=[]) | ||
if not self.primary_container_name: | ||
raise _user_exceptions.FlyteValidationException("A primary container name cannot be undefined") |
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
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
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
Oops, something went wrong.