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
@task | |
def my_task(x: int, y: str) -> bool: | |
... | |
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
def combine_strings(a: str, b: str) -> str: | |
return f"{a} {b}" | |
def hello_world(wf_in1: str, wf_in2: str) -> str: | |
return combine_strings(wf_in1, wf_in2) | |
if __name__ == "__main__": | |
print(hello_world("hello", "world")) |
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
from flytekit import task, workflow | |
@task | |
def combine_strings(a: str, b: str) -> str: | |
return f"{a} {b}" | |
@workflow | |
def hello_world(wf_in1: str, wf_in2: str) -> str: |
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
import typing | |
from abc import ABC | |
import numpy as np | |
import pandas as pd | |
import pyarrow as pa | |
from flytekit import kwtypes, task, workflow | |
from flytekit.types.schema import SchemaFormat | |
from flytekit.types.structured.structured_dataset import ( |
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
from flytekit import task, workflow | |
@task | |
def say_hello(bb: bool) -> str: | |
if bb: | |
return "hello bb" | |
return "hello world" | |
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
from typing import List | |
import flytekit.configuration | |
from flytekit import dynamic, task | |
from flytekit.configuration import FastSerializationSettings, Image, ImageConfig | |
from flytekit.core import context_manager | |
from flytekit.core.context_manager import ExecutionState | |
from flytekit.core.type_engine import TypeEngine | |
from flytekitplugins.pod import Pod | |
from kubernetes.client.models import ( |
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
// Before running, create databases legacy and noop; | |
func TestNoopMigrations(t *testing.T) { | |
gLogger := gormLogger.New(log.New(os.Stdout, "\r\n", log.LstdFlags), gormLogger.Config{ | |
SlowThreshold: 200 * time.Millisecond, | |
LogLevel: gormLogger.Info, | |
IgnoreRecordNotFoundError: false, | |
Colorful: true, | |
}) | |
gormConfig := &gorm.Config{ |
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
# The three options that we were talking about. | |
# Partitions values will continue to be strings, so they'll be coerced into strings | |
# | |
# Option A - Simplest | |
# This is the closest to the original proposal. | |
# 1) Declare an instance of Artifact | |
# | 2) give it a name | |
# | project&domain added at registration time | |
# ↓ ↓ | |
my_artifact = Artifact(name="my_data", partitions=["a", "b"], with_time_partition=True) |