Sören Brunk
03/02/2023, 9:48 PMStructuredDataset
broke support for schema urls in the flyteconsole launch form? Not sure if it ever worked, but https://github.com/flyteorg/flyte/issues/405 seems to indicate it did.
Given this example
@task
def t1(df: pd.DataFrame) -> pd.DataFrame:
return df
@workflow
def wf(df: pd.DataFrame) -> pd.DataFrame:
return t1(df=df)
I get the following message in the launch form:Aleksei Potov
03/02/2023, 10:19 PMContainerTask
where name of the image is a parameter into my workflow. Naive approach does not work as parameter is a promise that is unresolved at task declaration time:
@workflow
def run_test(version: str) -> str:
run_container_task = ContainerTask(
...
image="repository/test:{version???}",
command=[
"uname",
],
)
return run_container_task(version='v1')
Thanks!Aleksei Potov
03/03/2023, 12:03 AMsecret_requests
to ContainerTask
- how this is made available within container? I don't see /etc/flyte/secrets
mountedFelix Ruess
03/03/2023, 10:18 AMpyflyte --config ~/.flyte/config-sandbox.yaml register ...
gives me exceptions: failed to put data...
Is this supposed to work out of the box? I can't seem to find where I configure credentials as that seems to be the problem.Broder Peters
03/03/2023, 12:11 PMJoão Lobo Guerra Neto
03/03/2023, 1:31 PMAttempt failed due to rpc error: code = Unauthenticated desc = token parse error [JWT_VERIFICATION_FAILED] Could not retrieve id token from metadata, caused by: rpc error: code = Unauthenticated desc = Request unauthenticated with IDToken"
The flytescheduler pod did not start because of this error above
Has anyone gone through something similar?Peter Sulcs
03/03/2023, 5:31 PMsay_hello
task 🧵Kamakshi Muthukrishnan
03/03/2023, 5:34 PMAleksei Potov
03/03/2023, 6:54 PMflytectl delete execution
seems to actually abort, but not deleteAdedeji Ayinde
03/03/2023, 10:54 PMTaeef Najib
03/05/2023, 9:30 PMKNeighborsClassifier
It seems Flyte doesn't accept KNeighborsClassifier
as the type of my function. What would be the right type hint for this? I get the following error:
[4/4] currentAttempt done. Last Error: USER::Pod failed. No message received from kubernetes.
[sd4h34hqd15wyc3wy32t-n0-3] terminated with exit code (137). Reason [OOMKilled]. Message:
{"asctime": "2023-03-05 20:24:43,219", "name": "flytekit", "levelname": "WARNING", "message": "Unsupported Type <class 'sklearn.neighbors._classification.KNeighborsClassifier'> found, Flyte will default to use PickleFile as the transport. Pickle can only be used to send objects between the exact same version of Python, and we strongly recommend to use python type that flyte support."}
2023/03/05 20:24:43 WARNING mlflow.utils.git_utils: Failed to import Git (the Git executable is probably not on your PATH), so Git SHA is not available. Error: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()
All git commands will error until this is rectified.
This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception
Example:
export GIT_PYTHON_REFRESH=quiet
{"asctime": "2023-03-05 20:24:43,424", "name": "flytekit", "levelname": "WARNING", "message": "Unsupported Type <class 'sklearn.neighbors._classification.KNeighborsClassifier'> found, Flyte will default to use PickleFile as the transport. Pickle can only be used to send objects between the exact same version of Python, and we strongly recommend to use python type that flyte support."}
.
Can you please point me to the right direction?Fhuad Balogun
03/06/2023, 4:26 AMYounes El Hjouji
03/06/2023, 11:06 AMimport logging
import time
import typing
import uuid
from typing import Tuple
from flytekit import task, workflow, conditional
logger = logging.getLogger()
@task
def create_dataset() -> uuid.uuid4:
print("Creating dataset")
time.sleep(1)
dataset_id = uuid.uuid4()
print(f"Dataset created with id {dataset_id}")
return dataset_id
@task
def sort_dataset(dataset_id: uuid.uuid4) -> None:
print(f"Sorting dataset with id {dataset_id}")
time.sleep(1)
print(f"Dataset is sorted")
@task
def train_model(dataset_id: str) -> uuid.uuid4:
print(f"Training model using dataset with id {dataset_id}")
model_id = uuid.uuid4()
time.sleep(1)
print(f"Trained model with id {model_id}")
return model_id
@workflow
def train_workflow(sort_dataset_flag: bool) -> None:
dataset_id = create_dataset()
conditional("Sorting").if_(sort_dataset_flag.is_true()).then(sort_dataset(dataset_id=dataset_id))
train_model(dataset_id=dataset_id)
def test_workflow():
train_workflow(sort_dataset_flag=True)
Output:
Creating dataset
Dataset created with id bba83be5-8b15-417d-bd48-5cce55d1856f
Sorting dataset with id bba83be5-8b15-417d-bd48-5cce55d1856f
Dataset is sorted
Notice how last task is not executed.
How can I make this work?JP Kim
03/06/2023, 1:39 PMYounes El Hjouji
03/06/2023, 2:47 PMtim leonard
03/06/2023, 3:08 PM[ContainersNotReady|PodInitializing]: containers with unready status: [... flyte-copilot-sidecar]|
Is this because it can't access the image inside the sandbox, or something more complicated? Is there a way to get this type of ContainerTask example to work on the sandbox?
As is, my article ends like this - 'So you can push the dag (pyflyte run --remote ..
), see it in Flyte ui, but it won't run locally, so go find a prod server if you want to fullly test, ok gl with that bye'Aleksei Potov
03/06/2023, 6:46 PMFile "/opt/venv/lib/python3.8/site-packages/flytekit/core/map_task.py", line 271, in map_task
raise ValueError(
Message:
Only Flyte python task types are supported in map tasks currently, received <class 'flytekit.core.container_task.ContainerTask'>
Vasu Upadhya
03/06/2023, 6:57 PMAndrew Achkar
03/06/2023, 9:34 PMLaura Lin
03/06/2023, 9:48 PMMichael Tinsley
03/06/2023, 9:53 PMJimmy Du
03/07/2023, 12:21 AMenvFrom:
- configMapRef:
name: special-config
- secretRef:
name: special-config
https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/pod-configmap-envFrom.yamlJimmy Du
03/07/2023, 2:50 AMNicholas Junge
03/07/2023, 8:15 AMboto3
instead of aws s3
subprocesses? The reason being that awscli
does not play nice with other dependencies I have, so I wanted to know if migrating that code to a boto client is an option to be able to drop awscli
. Thanks in advance!Younes El Hjouji
03/07/2023, 9:31 AMAdrian Rumpold
03/07/2023, 10:10 AMAnnotated[..., HashMethod(...)]
work with FlyteFile
?
It doesn't work out-of-the-box, failing an `issubclass` check in flytekit/types/file/file.py. However, I have put together a two-line patch (can submit an MR) for that file that would allow the use of the annotated type alias with a custom hash function.
Or am I chasing a red herring here and there is an easier way to get content-aware caching for `FlyteFile`s?
Thanks! 🙏
Here's the example workflow (expected behavior is that print_file
is executed only when either its inputs change, or the signature/`cache_version` is bumped -- if I omit the custom hash method, the cache is hit regardless if the inputs have changed in content):
def calc_hash(f: FlyteFile) -> str:
...
CachedFlyteFile = Annotated[FlyteFile, HashMethod(calc_hash)]
@task
def write_file() -> CachedFlyteFile:
print("write_file")
local_path = "data.parquet"
df = pd.DataFrame(data={"a": [1, 2, 3], "b": [3, 4, 5]})
df.to_parquet(local_path)
return FlyteFile(local_path, remote_path="s3://...")
@task(cache=True, cache_version="1")
def print_file(file: FlyteFile) -> None:
file.download()
print(pd.read_parquet(file))
@workflow
def wf() -> None:
f = write_file()
print_file(file=f)
if __name__ == "__main__":
wf()
wf() # don't expect to see output from `print_file`
Fabio Grätz
03/07/2023, 11:51 AMnn.Module
) need to be serialized into blob storage. Instead of a bucket uri, a /tmp/flyte-xyz
path is shown in the console:
I expect that my flytekit/remote config is not correct and would appreciate some help to figure out where exactly. Thanks 🙏
More in the 🧵Fhuad Balogun
03/07/2023, 1:45 PMEduardo Matus
03/07/2023, 2:05 PM(mlp2) ematus@eduardos-mbp dockerization % flytectl -c ~/.flyte/config.yaml register files flyte-package.tgz -p flytesnacks -d development --version 6 --archive
Error:
strict mode is on but received keys [map[task_resources:{}]] to decode with no config assigned to receive them: failed strict mode check
ERRO[0000]
strict mode is on but received keys [map[task_resources:{}]] to decode with no config assigned to receive them: failed strict mode check src="main.go:13"
Geoff Salmon
03/07/2023, 2:12 PMFlyteRemote
with device flow auth? I think it is not supported currently, but I wanted to check if I'm missing something.