F

Flyte enables you to build & deploy data & ML pipelines, hassle-free. The infinitely scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks. Explore and Join the Flyte Community!

Help with pyflyte run command issues

Summary

The user is seeking help with issues related to executing a pyflyte run command in Python, specifically when using the os or subprocess modules. They suggest that using flyteremote could be an alternative to the API. The user shares a code snippet demonstrating their preferred setup for running pyflyte, which allows for local and remote execution of a workflow by simply running the Python file.

Status
resolved
Tags
    Source
    #ask-the-community
      e

      eric901201

      10/4/2024

      any place

      e

      eric901201

      10/4/2024

      you can simply just python file.py to do it

      e

      eric901201

      10/4/2024

      this is my favorite setup for pyflyte run

      e

      eric901201

      10/4/2024
          from flytekit.clis.sdk_in_container import pyflyte
          from click.testing import CliRunner
          import os
      
          runner = CliRunner()
          path = os.path.realpath(__file__)
          result = runner.invoke(pyflyte.main,
                              ["run", path, "combined_workflow", "--image", "<https://bit.ly/3KZ95q4>"])
          print("Local Execution: ", result.output)
      
          result = runner.invoke(pyflyte.main,
                                 ["run", "--remote", path, "combined_workflow", "--image", "<https://bit.ly/3KZ95q4>"])
          print("Remote Execution: ", result.output)```
      
      k

      kumare

      10/3/2024

      instead of using the api

      k

      kumare

      10/3/2024

      what issues? you can also just use flyteremote directly

      h

      hassan.m.eng

      10/3/2024

      anyone have issues running a pyflyte run command from python? os or subprocess?