Albert Wibowo
06/29/2023, 1:10 PMArchit Rathore
06/29/2023, 2:32 PM@flytekit.dynamic
task from being part of the cache calculation? Is the alternative approach described in https://github.com/flyteorg/flyte/issues/3058 (using Annotated + HashMethod) the current best way to do it?Swarup Srinivasan
06/29/2023, 5:43 PMParallelism
attribute as 5
but the workflow executed with more than 5 tasks in parallel. Are we misunderstanding the parallelism attribute or is there a bug here?Benjamin Chew
06/29/2023, 9:51 PMFlyteFile
, but the output of the function which it's decorating. For example:
def my_decorator(fn):
@wraps(fn)
def _wrapper(*args, **kwargs):
out = fn(*args, **kwargs)
... # process and save 'out' to some local file
file_handler = FlyteFile(path=some_path, remote_path=remote_path)
return out
return _wrapper
@task
@my_decorator
def some_func(value: int) -> int:
return value * 2
However, it seems that when I use it in this way, the file does not get uploaded to the remote_path
specified. I'm not very clear about how the internals of FlyteFile
works, but I was wondering if the file will only be uploaded if the FlyteFile
were created and returned directly within the decorated function itself? Is there any other way that I could still get this to work within my decorator function instead? Thanks!Frank Shen
06/29/2023, 10:13 PM/venv/lib/python3.8/site-packages/fsspec/registry.py:209 in get_filesystem_class
if protocol not in registry:
if protocol not in known_implementations:
raise ValueError("Protocol not known: %s" % protocol)
My code:
# from typing import Tuple
try:
from typing import Annotated
except ImportError:
from typing_extensions import Annotated
import pandas as pd
from flytekit import task, workflow, StructuredDataset, kwtypes
from flytekitplugins.bigquery import BigQueryConfig, BigQueryTask
import google.cloud.bigquery
bigquery_task = BigQueryTask(
name="sql.bigquery.test",
inputs=kwtypes(version=int),
query_template="SELECT * FROM `bigquery-public-data.crypto_dogecoin.transactions` WHERE version = @version LIMIT 2;",
task_config=BigQueryConfig(ProjectID=""),
output_structured_dataset_type=pd.DataFrame
)
@task
def preproc(df: pd.DataFrame) -> None:
print(df.head())
@workflow
def wf(version: int = 1) -> None:
preproc(df = bigquery_task(version=version))
Do you have any idea?Anthony
06/30/2023, 12:31 PMGeert
06/30/2023, 12:46 PMflytectl demo start --dev
), and was able to make compile
and test all the different components. Now on the final step when running flyte start --config flyte_local.yaml
it fails, due to wanting to access /home/{user}/.flyte/k3s/k3s.yaml
which is a broken symlink (as described here as well: https://github.com/flyteorg/flyte/issues/3645)
❯ flyte start --config flyte_local.yaml
INFO[0000] Using config file: [flyte_local.yaml]
{"json":{"src":"viper.go:398"},"level":"debug","msg":"Config section [plugins] updated. No update handler registered.","ts":"2023-06-30T14:39:46+02:00"}
...
{"json":{"src":"viper.go:398"},"level":"debug","msg":"Config section [webhook] updated. No update handler registered.","ts":"2023-06-30T14:39:46+02:00"}
{"json":{"src":"start.go:63"},"level":"info","msg":"Running Database Migrations...","ts":"2023-06-30T14:39:46+02:00"}
{"json":{"src":"start.go:124"},"level":"error","msg":"Failed to create controller manager. error building Kubernetes Clientset: Error building kubeconfig: stat /home/user/.flyte/k3s/k3s.yaml: no such file or directory","ts":"2023-06-30T14:39:46+02:00"}
{"json":{"src":"start.go:185"},"level":"panic","msg":"Failed to start Propeller, err: error building Kubernetes Clientset: Error building kubeconfig: stat /home/user/.flyte/k3s/k3s.yaml: no such file or directory","ts":"2023-06-30T14:39:46+02:00"}
panic: (*logrus.Entry) 0xc000510380
goroutine 61 [running]:
<http://github.com/sirupsen/logrus.(*Entry).log(0xc000510310|github.com/sirupsen/logrus.(*Entry).log(0xc000510310>, 0x0, {0xc0014de0a0, 0x9f})
/root/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:259 +0x487
<http://github.com/sirupsen/logrus.(*Entry).Log(0xc000510310|github.com/sirupsen/logrus.(*Entry).Log(0xc000510310>, 0x0, {0xc00105be68?, 0x1?, 0x1?})
/root/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:293 +0x4f
<http://github.com/sirupsen/logrus.(*Entry).Logf(0xc000510310|github.com/sirupsen/logrus.(*Entry).Logf(0xc000510310>, 0x0, {0x3145be9?, 0x0?}, {0xc000a8e230?, 0x0?, 0x0?})
/root/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:338 +0x85
<http://github.com/sirupsen/logrus.(*Entry).Panicf(0x3fdac40|github.com/sirupsen/logrus.(*Entry).Panicf(0x3fdac40>?, {0x3145be9?, 0x416947?}, {0xc000a8e230?, 0x2a74b80?, 0x1?})
/root/go/pkg/mod/github.com/sirupsen/logrus@v1.8.1/entry.go:376 +0x34
<http://github.com/flyteorg/flytestdlib/logger.Panicf({0x3fdac40|github.com/flyteorg/flytestdlib/logger.Panicf({0x3fdac40>?, 0xc000c55310?}, {0x3145be9, 0x22}, {0xc000a8e230, 0x1, 0x1})
/root/go/pkg/mod/github.com/flyteorg/flytestdlib@v1.0.17/logger/logger.go:188 +0x64
<http://github.com/flyteorg/flyte/cmd/single.glob..func4.2()|github.com/flyteorg/flyte/cmd/single.glob..func4.2()>
/home/user/git/flyte/flyte/cmd/single/start.go:185 +0xbe
<http://golang.org/x/sync/errgroup.(*Group).Go.func1()|golang.org/x/sync/errgroup.(*Group).Go.func1()>
/root/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:75 +0x64
created by <http://golang.org/x/sync/errgroup.(*Group).Go|golang.org/x/sync/errgroup.(*Group).Go>
/root/go/pkg/mod/golang.org/x/sync@v0.1.0/errgroup/errgroup.go:72 +0xa5
Stephen
06/30/2023, 2:31 PMNicholas Roberson
06/30/2023, 5:49 PMproject
x domain
that are in the state Running
?
I was looking over the FlyteRemote
docs but didnt see any batch version of fetch_execution
with any filters or anything.Fabio Grätz
06/30/2023, 5:50 PMconfigmap:
adminServer:
server:
httpPort: 8088
grpcPort: 8089
security:
secure: false #true
ssl:
certificateFile: "/etc/tls/cert.pem"
keyFile: "/etc/tls/key.pem"
Certificate is self-signed and mounted into the flyteadmin pod via a secret.
I can’t talk to flyteadmin though and would appreciate help getting this to work 🙂 Details in 🧵Rezwan Abir
06/30/2023, 8:34 PMremote = FlyteRemote(
config=Config.for_endpoint(endpoint='localhost:30080'),
default_project="flytesnacks",
default_domain="development",
)
flyte_wf = remote.fetch_workflow(
name="flyte.workflows.extract_flyte.extract_drs_data",
project="flytesnacks",
domain='development',
)
Rezwan Abir
06/30/2023, 8:34 PMRezwan Abir
06/30/2023, 8:35 PMdetails = "failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:30080: Ssl handshake failed: SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER"
debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:30080: Ssl handshake failed: SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER {created_time:"2023-06-30T16:35:10.548801-04:00", grpc_status:14}"
Rezwan Abir
06/30/2023, 8:36 PMFlyte is ready! Flyte UI is available at <http://localhost:30080/console> 🚀 🚀 🎉
Rezwan Abir
06/30/2023, 8:41 PMcurl localhost:30080/api/v1/projects
works too 🤔Yue Shang
06/30/2023, 9:10 PMYue Shang
06/30/2023, 9:15 PMtf.data.Dataset
in one of the tasks and return it as input for next task, but got data type error (when pickle serialize this data)`tensorflow.python.framework.errors_impl.InvalidArgumentError'>: Cannot convert a Tensor of dtype variant to a NumPy array` , I'm kind of new to both tensorflow and flyte, so wondering is there any guidance on how to resolve this issue?Alexey Kharlamov
07/01/2023, 7:37 AMRuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [k8s-array]: output file @[] is too large [255540150] bytes, max allowed [10485760] bytes
foo bar
07/01/2023, 2:56 PMNizar Hattab
07/02/2023, 12:40 PMCannot convert from /tmp/some_path to typing.Optional[flytekit.types.directory.types.FlyteDirectory]\n\nSYSTEM ERROR! Contact platform administrators."
please note that sometimes it works . does it have to use context path instead ?Victor Churikov
07/02/2023, 5:53 PMChandrashekhar Kotekar
07/03/2023, 9:17 AMactivates or deactivates
the schedule url, I got 404 error.Sujith Samuel
07/04/2023, 5:18 AMSujith Samuel
07/04/2023, 5:22 AMBrian Tang
07/04/2023, 8:21 AM1.7.0
. we started the process of updating our docker images to use the latest flytekit
as well with:
RUN pip install boto3 awscli flytekit==1.7.0
but we’re getting conflicting dependencies related to `fsspec`:
RROR: Cannot install flytekit and flytekit==1.7.0 because these package versions have conflicting dependencies.
The conflict is caused by:
flytekit 1.7.0 depends on fsspec>=2023.3.0
s3fs 2023.1.0 depends on fsspec==2023.1.0
this works if we downgraded back to flytekit==1.5.0
L godlike
07/04/2023, 11:07 AMGeert
07/04/2023, 11:50 AMFOO = "some_default_value"
@task(environment={"FOO": FOO})
def some_task():
return "bar"
def populate_vars_from_config(config):
print(config.keys())
FOO = config['foo']
@workflow
def some_workflow(config: dict):
populate_vars_from_config()
some_task()
And run it with
pyflyte run ./some_path some_workflow --config ./config.json
However that gives me an exception because its a Promise:
Failed with Unknown Exception <class 'AttributeError'> Reason: Error encountered while executing 'some_workflow':
'Promise' object has no attribute 'keys'
Any suggestions how to approach this in a better way? 🙂
I guess I could just set them myself within the task, but would be nice to have them visible in the decorator.Nizar Hattab
07/04/2023, 2:44 PMFlyteDirectory(path='path/to/parent', remote_directory='<gs://datasets_bucket/path/to/parent>')
[0]: code:"SYSTEM:Unknown" message:"Traceback (most recent call last):\n\n File \"/opt/venv/lib/python3.9/site-packages/flytekit/exceptions/scopes.py\", line 165, in system_entry_point\n return wrapped(*args, **kwargs)\n File \"/opt/venv/lib/python3.9/site-packages/flytekit/core/base_task.py\", line 588, in dispatch_execute\n raise TypeError(msg) from e\n\nMessage:\n\n Failed to convert outputs of task 'workflows.wfname.map_extract_f6482939eed2867de4faf3d9d475fe60' at position 0:\n Failed to put data from /tmp/flyte-_2xcubb6/sandbox/local_flytekit/d8544a75c07b4b0a894056feafcf0bee/path/to/parent to <gs://datasets_bucket/path/to/parent> (recursive=True).\n\nOriginal exception: Forbidden: <https://storage.googleapis.com/upload/storage/v1/b/datasets_bucket/o>\naccount_name does not have storage.objects.delete access to the Google Cloud Storage object.\n\nSYSTEM ERROR! Contact platform administrators." kind:SYSTEM
... and many more.
why delete when it is trying to upload?
and if the directory path/to/parent does not exist or empty, does it delete contents of gcs corresponding path ?Pradithya Aria Pura
07/05/2023, 1:13 AMТигран Григорян
07/05/2023, 5:40 AMflyte.sandbox
This is my .flyte/config.yaml
admin:
# For GRPC endpoints you might want to use dns:///flyte.myexample.com
endpoint: flyte.sandbox:30080
authType: Pkce
insecure: true
console:
endpoint: <http://flyte.sandbox:30080>
logger:
show-source: true
level: 0
storage:
connection:
endpoint: flyte.sandbox:30002
But I got an error, with cmd pyflyte register workflows
pyflyte register workflows
Running pyflyte register from /Users/dqunbp/projects/test-project/example-flyte with images ImageConfig(default_image=Image(name='default', fqn='<http://cr.flyte.org/flyteorg/flytekit|cr.flyte.org/flyteorg/flytekit>', tag='py3.10-1.6.1'), images=[Image(name='default', fqn='<http://cr.flyte.org/flyteorg/flytekit|cr.flyte.org/flyteorg/flytekit>', tag='py3.10-1.6.1')]) and image destination folder /root on 1 package(s) ('/Users/dqunbp/projects/sbxrmxd/example-flyte/workflows',)
Registering against flyte.sandbox:30080
Detected Root /Users/dqunbp/projects/test-project/example-flyte, using this to create deployable package...
No output path provided, using a temporary directory at /var/folders/nx/scmwbdl92j12dxc0wh1gkljw0000gn/T/tmp_87706wb instead
Failed with Unknown Exception <class 'requests.exceptions.ConnectionError'> Reason: HTTPConnectionPool(host='localhost', port=30002): Max retries exceeded with url: /my-s3-bucket/flytesnacks/development/RSXYOG4EB6Y3JGW235M236VHII%3D%3D%3D%3D%3D%3D/fastf5549d7958839100393a4ea553562a7c.tar.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20230705%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230705T053532Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-md5%3Bhost&X-Amz-Signature=21dff243075588b3185a3863034a8cfb3d373459eb7081ea348bb71e78b079f4 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x110d04850>: Failed to establish a new connection: [Errno 61] Connection refused'))
HTTPConnectionPool(host='localhost', port=30002): Max retries exceeded with url: /my-s3-bucket/flytesnacks/development/RSXYOG4EB6Y3JGW235M236VHII%3D%3D%3D%3D%3D%3D/fastf5549d7958839100393a4ea553562a7c.tar.gz?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=minio%2F20230705%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230705T053532Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-md5%3Bhost&X-Amz-Signature=21dff243075588b3185a3863034a8cfb3d373459eb7081ea348bb71e78b079f4 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x110d04850>: Failed to establish a new connection: [Errno 61] Connection refused'))
Is it something wrong with my config.yaml ?