GitHub
03/07/2023, 1:40 AMGitHub
03/07/2023, 1:40 AMGitHub
03/07/2023, 11:09 PMGitHub
03/08/2023, 1:43 AMGitHub
03/08/2023, 3:06 AMhonnix
03/09/2023, 9:09 PMGreg Gydush
03/09/2023, 11:19 PMGitHub
03/09/2023, 11:40 PMpyflyte package
, we get an error like:
Multiple definitions of the following tasks were found: ['ShiftDatetimeByDurationTaskV0', 'LookupFixedRangeBigQueryTaskV1', 'LookupBigQueryTaskV1']
where those tasks are remote tasks used within a workflow.
The error is introduced In flytekit versions after 1.2.7 (probably 1.2.8) and is maybe due to that _should_register_with_admin
function no longer filters out remote tasks entities as FlyteTask superclass changed from:
class FlyteTask(hash_mixin.HashOnReferenceMixin, RemoteEntity, _task_model.TaskTemplate):
to
class FlyteTask(hash_mixin.HashOnReferenceMixin, RemoteEntity, TaskSpec):
def _should_register_with_admin(entity) -> bool:
"""
This is used in the code below. The translator.py module produces lots of objects (namely nodes and BranchNodes)
that do not/should not be written to .pb file to send to admin. This function filters them out.
"""
return isinstance(
entity, (task_models.TaskSpec, _launch_plan_models.LaunchPlan, admin_workflow_models.WorkflowSpec)
)
Expected behavior
Should not get an error of duplicate tasks defined for remote tasks when running pyflyte package
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteSlackbot
03/10/2023, 6:57 PMGitHub
03/13/2023, 6:03 PMStephen
03/15/2023, 2:13 PMscopes
defined in FlyteAdmin correctly. I am asking because when I use Flytekit v1.3.1
, I only get the scope ['all']
for the PlatformConfig
PlatformConfig(endpoint='<http://flyteurl.com|flyteurl.com>', insecure=False, insecure_skip_verify=False, console_endpoint=None, command=None, client_id='github-client', client_credentials_secret='nice_secret', scopes=['all'], auth_mode='ClientSecret')
And when I use Flytekit v1.4.1
then I get different scopes
/.venv/lib/python3.9/site-packages/flytekit/clients/auth/authenticator.py(193)get_token()
-> if scopes is not None:
(Pdb) scopes
['offline', 'all']
Flytekit v1.4.1
correctly reflects the scopes we have but I was wondering how come v1.3.1
has different scopes?Sören Brunk
03/15/2023, 3:12 PM@dataclass_json
@dataclass
class TrainingArgs:
latest_timestamps: List[datetime.datetime] = field(default_factory=lambda: [])
But now I'm getting a schema warning (I haven't tried to run it yet):
{
"asctime": "2023-03-15 15:13:19,393",
"name": "flytekit",
"levelname": "WARNING",
"message": "Failed to extract schema for object <class 'TrainingArgs'>, (will run schemaless) error: unsupported field type <fields._TimestampField(dump_default=datetime.datetime(2023, 3, 15, 15, 13, 19, 383752), attribute=None, validate=None, required=False, load_only=False, dump_only=False, load_default=<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.'})>If you have postponed annotations turned on (PEP 563) turn it off please. Postponedevaluation doesn't work with json dataclasses"
}
Does anyone have an idea how to get this working?GitHub
03/15/2023, 7:03 PMwith_overrides
-- we realized this was not an ideal UX/UI because it would mean these views would then be displaying the nodeId
rather than human-readable function names (eg, n0-0-n2-0-n0-0-n1
vs hello_person
). This is because while parsing the compiledWorkflowClosure
we must choose to display based off either the nodeId
or the metadata.name
and a node will always have a nodeId
so we can't do a conditional.
Example: the user was requesting to display the nodeId
'hello-bob' here instead of the function name 'hello_person' from metadata.name
but we see in the second example that this is actually less useful in most cases.
"id": "hello-bob",
"metadata": {
"name": "hello_person",
"retries": {}
}
"id": "n0",
"metadata": {
"name": "people",
"retries": {}
},
As a solution we want to update with_overrides
to update both the nodeId
and the metadata.name
field -- this better matches the user intention of with_overrides
and in those cases display the overridden name while also preserving the better UX for most/standard executions.
Goal: What should the final outcome look like, ideally?
When a user defines an entity in flytekit and uses with_overrides
, it will update both the nodeId
and metadata.name
for that execution.
Describe alternatives you've considered
NA
Propose: Link/Inline OR Additional context
#3370
flyteorg/flytekit#1344
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteGitHub
03/15/2023, 10:19 PMGitHub
03/16/2023, 5:40 PMflytepropeller-1 flytepropeller E0315 17:26:22.419072 1 workers.go:102] error syncing 'flyte-attendant-development/fbf61da4211b749988f0': failed at Node[n1]. RuntimeExecutionError: failed during plugin execution, caused by: failed to execute handle for plugin [container]: [Invalid] failed to create resource, caused by: Pod "fbf61da4211b749988f0-n1-0" is invalid: [spec.containers[0].env[26].name: Invalid value: "_FSEC_ARN:AWS:SECRETSMANAGER:US-EAST-2:356633062068:SECRET:_OPENAI_API_KEY-QA0K0U": a valid environment variable name must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-name', or 'MY_ENV.NAME', or 'MyEnvName1', regex used for validation is '[-._a-zA-Z][-._a-zA-Z0-9]*'), spec.containers[0].env[26].valueFrom.secretKeyRef.name: Invalid value: "arn:aws:secretsmanager:us-east-2:356633062068:secret:": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. '<http://example.com|example.com>', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')]
There is no progress that propeller can make with this workflow .
This ticket tracks.
• Adding validation in flytekit to disallow non-conforming secret names to be registered
• Propeller should auto abort/cancel such tasks and send the validation error over so that admin can showcase the issue and the UI can render it
• Existing workflows which bypassed this check should some how be flagged
Expected behavior
Disallow incorrect workflows and propeller should abort if any such incorrect workflows fall through the cracks and flyteadmin and UI should be able to show the right issue in the workflow
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteDylan Wilder
03/17/2023, 7:08 PMGitHub
03/17/2023, 7:39 PMGitHub
03/17/2023, 7:57 PMPradithya Aria Pura
03/20/2023, 7:32 AMFlyteDirectory
and output the same FlyteDirectory
. Is it possible to force all the FlyteDirectory
to be backed by the same GCS path? Essentially sharing a directory content across tasks.
@task
def task(work_dir: FlyteDirectory) -> FlyteDirectory:
# do something in work_dir
# potentially add files
return work_dir
@workflow
def workflow():
work_dir = init_workdir()
work_dir = task(work_dir)
work_dir = task(work_dir)
work_dir = task(work_dir)
GitHub
03/20/2023, 11:54 PMGitHub
03/21/2023, 10:42 AMretry
library dependency declared by flytekit: https://github.com/flyteorg/flytekit/blob/3b5d15acb5389d99b86ba342a77e1cab5ce8546d/setup.py#L68
This library is not used anywhere within flytekit that I can find searching for import retry
or from retry
, except in the sagemaker plugin: https://github.com/flyteorg/flytekit/blob/3b5d15acb5389d99b86ba342a77e1cab5ce8546d/plugins/flytekit-aws-sagemaker/flytekitplugins/awssagemaker/distributed_training.py#L8
The dependency could be moved to the sagemaker plugin's requirements so only users of that plugin need it installed. Though, given the unmaintained state of the retry library, I'd advise against that and suggest to look for a maintained alternative (reretry? https://github.com/leshchenko1979/reretry)
What if we do not do this?
All users of flytekit end up installing an unmaintained library (see invl/retry#36, not updated since 2016), which also ends up bringing with it unnecessary dependency on py
which itself has been the source of lots of security alerting pytest-dev/py#287
Related component(s)
flytekit
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteGitHub
03/22/2023, 7:09 PMPradithya Aria Pura
03/28/2023, 3:17 AMFlyteContext
but can’t see any suitable property available.GitHub
03/28/2023, 4:25 PMtensorflow
and others don't support 3.11
2. certain parts of the the flytekit codebase (such as the parts that use dataclasses) need to be updated to support 3.11
Python 3.7 will be EOL'd on June 2023, which will ease the transition to 3.11 because we can unpin certain restrictions.
Goal: What should the final outcome look like, ideally?
A user should be able to install and use flytekit on python 3.11
Describe alternatives you've considered
NA
Propose: Link/Inline OR Additional context
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteGitHub
03/29/2023, 6:30 PMFlyteFile
compatible with Annotated[..., HashMethod]
by @AdrianoKF in #1544
• move FlyteSchema deprecation warning to initialization method by @cosmicBboy in #1558
• add pod_template and pod_template_name arguments for ContainerTask by @flixr in #1515
• Pass locally defined scopes to RemoteClientConfigStore by @franco-bocci in #1553
• TypeTransformer for TensorFlow model by @samhita-alla in #1562
• Remove flytekit-fsspec plugin from default dockerfile by @wild-endeavor in #1561
• Device auth flow / Headless auth by @kumare3 in #1552
• support python 3.11 by @cosmicBboy in #1557
• url encode secret in client credentials flow by @wild-endeavor in #1566
• Python run multiple files by @pingsutw in #1559
• General Partial support in flytekit and multi-list support in flytekit by @kumare3 in #1556
New Contributors
• @franco-bocci made their first contribution in #1553
Full Changelog: v1.5.0b0...v1.5.0b1
flyteorg/flytekitKetan (kumare3)
03/29/2023, 8:11 PMKetan (kumare3)
03/29/2023, 8:12 PMPradithya Aria Pura
03/31/2023, 4:55 AMGitHub
03/31/2023, 5:35 PM{"asctime": "2023-03-30 10:54:22,803", "name": "flytekit", "levelname": "WARNING", "message": "FlyteSchema is deprecated, use Structured Dataset instead."}
Expected behavior
That I only get this warning if I am doing something that involves FlyteSchema
Additional context to reproduce
No response
Screenshots
No response
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyteGitHub
03/31/2023, 9:48 PMGitHub
03/31/2023, 9:48 PM