worried-lighter-79998
08/26/2022, 9:02 AMjobs:
register-flyte-workflows:
name: Register Flyte workflows
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# flytekit needs newer version than 3.8 which ships with ubuntu-latest
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install flytekit==1.1.*
- name: Setup flytectl
uses: unionai-oss/flytectl-setup-action@v0.0.1
- name: Package workflows
shell: bash
run: |
pyflyte \
--pkgs flyte.workflows package \
--image ${{ env.DOCKER_IMAGE }} \
--output ${{ env.FLYTE_PACKAGE }}
- name: Register workflows
uses: unionai-oss/flyte-register-action@v0.0.2
with:
project: ${{ env.FLYTE_PROJECT }}
version: ${{ env.VERSION }}
proto: ${{ env.FLYTE_PACKAGE }}
domain: ${{ env.FLYTE_DOMAIN }}
config: ${{ env.FLYTE_CONFIG }}
# OR
# - name: Register workflows
# shell: bash
# run: |
# flytectl register files \
# --archive ${{ env.FLYTE_ARCHIVE }} \
# --project ${{ env.FLYTE_PROJECT }} \
# --domain ${{ env.FLYTE_DOMAIN }} \
# --config ${{ env.FLYTE_CONFIG }} \
# --version ${{ env.VERSION }}
`Package workflows`reports success, but Register workflows
using the action fails with Error: input package have some invalid files. try to run pyflyte package again [flyte-package.tgz]
Running Register workflows
using flytectl
is even worse. It fails with a bunch of errors like Failed to unmarshal file /tmp/register789499772/00_flyte.workflows.workflow_name.pb
but it fails silently and still reports succeeding to register resources. A workflows IS indeed registered on the Flyte server, but it is broken and cannot be run. Packaging and registering work if I run locally. Please advice on how to proceed debugging this.icy-agent-73298
08/26/2022, 9:29 AMinput package have some invalid files. try to run pyflyte package againCan you check the contents of the package and see if it contains file which are other than these • prefix fast and suffix .tar.gz (tarred source for fast registration) • .pb (serialized proto of flyte tasks, workflows, launchplans) If there are others in that package then it would show the tar as invalid w.r.t flytectl registration
worried-lighter-79998
08/26/2022, 11:05 AMicy-agent-73298
08/26/2022, 11:11 AMworried-lighter-79998
08/26/2022, 11:17 AM\"$ref\": \"#/definitions/StructSchema\"
where Struct
is a json serialized struct I pass as argument to tasks. It could be related to this. Will remove json serielized args and see what happensicy-agent-73298
08/26/2022, 11:20 AMFailed to unmarshal file /tmp/register789499772/00_flyte.workflows.workflow_name.pb
but it fails silently and still reports succeeding to register resources. A workflows IS indeed registered on the Flyte server, but it is broken and cannot be run.
For this one is final o/p a success as you mentioned and what do you mean by its broken and cannot be run .icy-agent-73298
08/26/2022, 11:24 AMworried-lighter-79998
08/26/2022, 11:49 AMSYSTEM ERROR! Contact platform administrators.
icy-agent-73298
08/26/2022, 11:53 AMworried-lighter-79998
08/26/2022, 11:59 AMicy-agent-73298
08/26/2022, 12:03 PMworried-lighter-79998
08/26/2022, 12:15 PMimport logging
import pandas as pd
from flytekit import workflow, task
log = logging.getLogger(__name__)
logging.basicConfig(level=<http://logging.INFO|logging.INFO>)
@task
def query_data() -> pd.DataFrame:
<http://log.info|log.info>("querying data")
return pd.DataFrame({"a": [1, 3, 4], "b": [4, 5, 6]})
@task
def do_a_thing(df: pd.DataFrame, x: int) -> pd.DataFrame:
<http://log.info|log.info>("doing the thing")
return df + x
@workflow
def wf(x: int):
df = query_data()
do_a_thing(df=df, x=x)
if __name__ == "__main__":
wf(x=10)
worried-lighter-79998
08/26/2022, 12:15 PMglamorous-carpet-83516
08/26/2022, 12:16 PMworried-lighter-79998
08/26/2022, 12:20 PMfreezing-airport-6809
tall-lock-23197
worried-lighter-79998
09/06/2022, 3:37 PMtall-lock-23197
Flyte enables production-grade orchestration for machine learning workflows and data processing created to accelerate local workflows to production.
Powered by