Rio
05/22/2023, 7:38 PMError: Connection Info: [Endpoint: dns:///flyte.localhost:80, InsecureConnection?: true, AuthMode: ClientSecret]: rpc error: code = Unauthenticated desc = authenticated user doesn't have required scope
LinkerD confirms that it's the flyteadmin container that responds with Unauthenticated.
This is quite perplexing and I've verified that the token is sent and it contains all the scopes required: "scope": "all email offline profile"
I hope people can give me some hints as I've been bashing my head for way to long against this. I'm just trying to have a flytectl register stuff in CI.Active Learner
05/23/2023, 2:31 AMPod failed. No message received from kubernetes.
[f1943114e818d4b7eaf3-n0-0] terminated with exit code (1). Reason [Error]. Message:
exec /opt/venv/bin/pyflyte-execute: exec format error
.
Mattias Liljenzin
05/23/2023, 7:17 AMVictor Gustavo da Silva Oliveira
05/23/2023, 11:42 AMTraceback (most recent call last):
File "/home/flyte/.venv/lib/python3.8/site-packages/flytekit/bin/entrypoint.py", line 90, in _dispatch_execute
outputs = _scoped_exceptions.system_entry_point(task_def.dispatch_execute)(ctx, idl_input_literals)
AttributeError: 'PythonFunctionWorkflow' object has no attribute 'dispatch_execute'
Somebody have any idea what it could be?Brandon Segal
05/23/2023, 4:26 PMJay Ganbat
05/23/2023, 5:53 PM@task
def hello(username: Optional[str]) -> str:
because i tried to define like this
@task
def hello(username: str | None) -> str:
but getting Failed with Unknown Exception <class 'AssertionError'> Reason: Failed to Bind variable username for function sandbox.subworkflow.hello.
first one works thoughBosco Raju
05/23/2023, 6:47 PMKhalil Almazaideh
05/23/2023, 9:20 PM@task
def a_mappable_task(a: int) -> List[int]:
l = [a] * 3
return l
Brandon Segal
05/24/2023, 2:07 AMΠ’ΠΈΠ³ΡΠ°Π½ ΠΡΠΈΠ³ΠΎΡΡΠ½
05/24/2023, 8:01 AMAbhinay Dronavally
05/24/2023, 9:43 AM{"json":{},"level":"warning","msg":"Failed to create cluster resources for namespace [flytesnacks-development] with err: Failed to read config template dir [flytesnacks-development] for namespace [] with err: open : no such file or directory","ts":"2023-05-24T09:40:15Z"}
{"json":{},"level":"warning","msg":"Failed to create cluster resources for namespace [flytesnacks-staging] with err: Failed to read config template dir [flytesnacks-staging] for namespace [] with err: open : no such file or directory","ts":"2023-05-24T09:40:15Z"}
{"json":{},"level":"warning","msg":"Failed to create cluster resources for namespace [flytesnacks-production] with err: Failed to read config template dir [flytesnacks-production] for namespace [] with err: open : no such file or directory","ts":"2023-05-24T09:40:15Z"}
{"json":{},"level":"warning","msg":"Failed cluster resource creation loop with: Failed to read config template dir [flytesnacks-development] for namespace [] with err: open : no such file or directory, Failed to read config template dir [flytesnacks-staging] for namespace [] with err: open : no such file or directory, Failed to read config template dir [flytesnacks-production] for namespace [] with err: open : no such file or directory","ts":"2023-05-24T09:40:15Z"}
{"json":{},"level":"error","msg":"Failed to initialize certificates for Secrets Webhook. client rate limiter Wait returned an error: context canceled","ts":"2023-05-24T09:40:20Z"}
{"json":{},"level":"panic","msg":"Failed to start Propeller, err: failed to create FlyteWorkflow CRD: <http://customresourcedefinitions.apiextensions.k8s.io|customresourcedefinitions.apiextensions.k8s.io> is forbidden: User \"system:serviceaccount:test-apps:test-flyte-role\" cannot create resource \"customresourcedefinitions\" in API group \"<http://apiextensions.k8s.io|apiextensions.k8s.io>\" at the cluster scope","ts":"2023-05-24T09:40:20Z"}
Tommy Nam
05/24/2023, 11:38 AMThomas Wollmann
05/24/2023, 2:21 PMRob Rati
05/24/2023, 3:18 PMEvan Sadler
05/24/2023, 4:18 PMVictor Gustavo da Silva Oliveira
05/24/2023, 6:37 PMpyflyte run
command? When I try to run, I keep getting Key SECRET_KEY on secret flyte-default-credentials not found.
mykyta luzan
05/24/2023, 7:57 PMhook = FlyteHook(flyte_conn_id=FLYTE_CONN_ID, project=flyte_project, domain=flyte_domain)
remote = hook.create_flyte_remote()
# workflow = remote.fetch_workflow(flyte_project, flyte_domain, flyte_task)
executions = remote.recent_executions(flyte_project, flyte_domain)
executions_filtered = list(
filter(
lambda e: e.spec.launch_plan.name == flyte_task and e.is_done,
executions,
)
)
if executions_filtered:
execution = executions_filtered[0]
<http://logging.info|logging.info>(f"{execution.id}")
outputs = execution.outputs
<http://logging.info|logging.info>(f"{outputs}")
But filtering of executions is not really convenient and the outputs are empty (however they shouldnβt be so)Arthur Book
05/24/2023, 8:44 PMfrom data_engine import (
pydantic_transformer,
) # code from <https://github.com/flyteorg/flytekit/pull/1620>
class Rax(pydantic.BaseModel):
flytedir: str
@pydantic.validator("flytedir")
def validate_hax(cls, v: str) -> str:
flytedir = make_flytedir(v)
return str(flytedir.path)
@classmethod
def from_json(cls, json: str) -> "Self":
self = cls.parse_raw(json)
return self
@flytekit.workflow
def test_wf(rax: Rax) -> str:
return test(rax=rax) # type: ignore
@flytekit.task
def test(rax: Rax) -> str:
return str(os.listdir(rax.flytedir))
def make_flytedir(path: Union[str, os.PathLike]) -> directory.FlyteDirectory:
context = context_manager.FlyteContext.current_context()
dimensionality = core_types.BlobType.BlobDimensionality.MULTIPART
literal = make_literal(uri=path, dimensionality=dimensionality)
transformer = directory_types.FlyteDirToMultipartBlobTransformer()
out_dir = transformer.to_python_value(context, literal, directory.FlyteDirectory)
os.listdir(out_dir) # the dir isnt synced if we dont do this
return out_dir
def make_literal(
uri: Union[str, os.PathLike],
dimensionality,
) -> literals.Literal:
scalar = make_scalar(uri, dimensionality)
return literals.Literal(scalar=scalar) # type: ignore
def make_scalar(
uri: Union[str, os.PathLike],
dimensionality,
) -> literals.Scalar:
blobtype = core_types.BlobType(format="", dimensionality=dimensionality)
blob = literals.Blob(metadata=literals.BlobMetadata(type=blobtype), uri=uri)
return literals.Scalar(blob=blob) # type: ignoreMelody Lui
05/24/2023, 9:31 PMpip install transformers
, pip3 install transformers
, python3 -m pip install transformers
, and i could find transformers installed using pip freeze --local
. itβs also installed in the docker image. but i canβt register in flyte without error ModuleNotFoundError: No module named 'transformers'
Augie Palacios
05/24/2023, 9:35 PMTommy Nam
05/25/2023, 7:50 AMwith_overrides(pod_template_name="string")
on a NotebookTask, it appears that it doesn't do anything. Is this a Papermill/NotebookTask issue or have I perhaps specified it incorrectly? Setting the pod_template_name="string
parameter directly on the NotebookTask definition itself works, but not with with_overrides
.
Basically, this works:
nb = NotebookTask(
pod_template_name="random template name",
)
@dynamic
def function():
return nb
# No problem
But overriding doesn't work within a dynamic workflow:
@dynamic()
def dynamic_workflow() -> List[float]:
task_output = nb().with_overrides(
pod_template_name="string to override"
)
return task_output
# Pod template name isn't overriden
Thomas Blom
05/25/2023, 4:45 PM[85]: code:"ContainersNotReady|ImagePullBackOff" message:"containers with unready status: [f0ff4b2cb0d6d44d1907-n1-0-dn0-0-dn10-0-85]|Back-off pulling image \"(sanitized).<http://dkr.ecr.us-east-1.amazonaws.com/flyte-plaster:23.5.19\%22%22|dkr.ecr.us-east-1.amazonaws.com/flyte-plaster:23.5.19\"">
This is part of a workflow that employs a mappable task for one section. The workflow will complete successfully maybe half of the time. The other half, this error occurs specifically for the map task. I can see from logs that some elements of the mapped task are executing successfully, and in this case it is number 85 (out of 100) that failed.
Broder Peters
05/26/2023, 11:56 AMPythonCustomizedContainerTask[T]
and PythonTask[PluginConfig]
.
I then started using my plugin in the workflow, which works out fine. Now I would like to apply caching and other usual decorators like requests and limit. How can I achieve this, as I don't have the classic Task(...)
decorator for my plugin?
class GlueTask(PythonCustomizedContainerTask[T], PythonTask[GlueConfig]):
# following the usual init
class GlueTaskExecutor(ShimTaskExecutor[GlueTask]):
def execute_from_model(self, tt: task_models.TaskTemplate, **kwargs) -> typing.Any:
# my plugin execution code
# usage in workflow
GlueTask(name="testing", task_config=GlueConfig(crawler_name="test-crawler"), container_image="bla",cache=True, cache_version="1.0")()
That cache
parameters don't throw errors, but also don't do caching.Marti Jorda Roca
05/26/2023, 12:52 PM/go/pkg/mod/gorm.io/gorm@v1.24.1-0.20221019064659-5dd2bb482755/gorm.go:206
[error] failed to initialize database, got error failed to connect to `host=***** user=flyteadmin database=flyteadmin`: server error (FATAL: no pg_hba.conf entry for host "172.32.101.12", user "flyteadmin", database "flyteadmin", no encryption (SQLSTATE 28000))
We have run this command to test the database connection:
kubectl run pgsql-postgresql-client --rm --tty -i --restart='Never' --namespace testdb --image <http://docker.io/bitnami/postgresql:11.7.0-debian-10-r9|docker.io/bitnami/postgresql:11.7.0-debian-10-r9> --env='PGPASSWORD=<Password>' --command -- psql testdb --host <RDS-ENDPOINT-NAME> -U flyteadmin -d flyteadmin -p 5432
And works. The only difference is that when we run it asks for the password. Anyone knows whatβs happening here?Khalil Almazaideh
05/27/2023, 8:36 AMValueError: Only Flyte python task types are supported in map tasks currently, received <class 'functools.partial'>
Kishore Vikram
05/28/2023, 1:57 PMKhalil Almazaideh
05/28/2023, 7:12 PMEncountered error while executing workflow '<http://ss.wf|ss.wf>':
Error encountered while executing 'wf':
Failed to convert inputs of task 'ss.split_preprocess':
[Errno 2] No such file or directory: '/tmp/flyte-2tev7275/raw/b8cd37c42c4279d44bbc8f2b4626f7c3'
Pryce
05/28/2023, 11:39 PMType of Generic List type is not supported, Transformer for type <class 'tuple'> is restricted currently
So now I'm back to using FlyteDirectory but it's.. awkward since there's no metadata about the files and they're given arbitrary names on the backend unless I explicitly name them somehow.
I'm wondering how folks might go about dealing with this? Do I handle all the metadata via the FlyteFile names? Pass some sort of metadata object along with every FlyteDirectory? Maybe there's a way around the custom dataclass limitation, as that would be the most elegant solution. Thanks for reading! I appreciate any insight.Ketan (kumare3)
Erik Dao
05/29/2023, 6:52 AMfrom flytekit.remote import FlyteRemote
from flytekit.configuration import Config, PlatformConfig, ImageConfig, SerializationSettings
remote = FlyteRemote(
config=Config(
platform=PlatformConfig(
endpoint="dns:///flyte-backend-flyte-binary-grpc.namespace.svc.cluster.local:8089",
insecure=True,
insecure_skip_verify=True,
)
),
default_project="flytesnacks",
default_domain="development",
data_upload_location="<s3a://flyte-storage/>"
)
HYPERPARAMS = {
"hyperparameters": {"C": 0.1}
}
flyte_entity = training_workflow
flyte_workflow = remote.register_workflow(
entity=flyte_entity,
serialization_settings=SerializationSettings(image_config=ImageConfig.auto_default_image()),
version="v1"
)
launch_plan = LaunchPlan.get_or_create(
workflow=flyte_workflow,
name="wine_classification_lp",
default_inputs=HYPERPARAMS,
)
remote.register_launch_plan(launch_plan, "v1", project="flytesnacks", domain="development")
And the workflow failed right at the first task get_data
, here is the error Iβve got
[1/1] currentAttempt done. Last Error: USER::rapped(*args, **kwargs) β
β β
β /usr/local/lib/python3.8/site-packages/flytekit/bin/entrypoint.py:347 in β
β _execute_task β
β β
β β± 347 β β _task_def = resolver_obj.load_task(loader_args=resolver_args) β
β β
β /usr/local/lib/python3.8/site-packages/flytekit/core/utils.py:295 in wrapper β
β β
β β± 295 β β β β return func(*args, **kwargs) β
β β
β /usr/local/lib/python3.8/site-packages/flytekit/core/python_auto_container.p β
β y:235 in load_task β
β β
β β± 235 β β task_module = importlib.import_module(name=task_module) # typ β
β β
β /usr/local/lib/python3.8/importlib/__init__.py:127 in import_module β
β β
β β± 127 β return _bootstrap._gcd_import(name[level:], package, level) β
β in _gcd_import:1011 β
β in _sanity_check:950 β
β°βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ―
ValueError: Empty module name
Any suggestion on which might have caused this error and how to fix it? Iβm suspecting that I havenβt registered the workflow or the launch plan properly.