• kevin

    kevin

    6 months ago
    hey guys would anyone have a simple example of using a GQL query to trigger a flow run I can look at?
    kevin
    Kevin Kho
    5 replies
    Copy to Clipboard
  • Ling Chen

    Ling Chen

    6 months ago
    Hello ! We have some memory intensive flows. These flows sometimes are triggered at the same time and executed through a LocalExecutor. The LocalExecutor will immediately launch all flow runs and cause memory errors. I wonder if there is a way to make LocalExecutor or any executor to execute one flow run at a time (sequentially) rather than launch all of flow runs at the same time?
    Ling Chen
    Kevin Kho
    5 replies
    Copy to Clipboard
  • Ken Nguyen

    Ken Nguyen

    6 months ago
    I’ve built a flow that continues to be stuck in the ‘Submitted’ state. Following this documentation, I was able to narrow down that the cause is with my docker image. I have multiple docker images in my repo that works fine, but using this specific docker image in my ECSRun causes my flow to be stuck in a submitted state. Could anyone let me know what might be wrong with this docker image?
    FROM ubuntu:18.04
    COPY requirements.txt /requirements.txt
    COPY google_secret.json $HOME/.config/gspread_pandas/google_secret.json
    ENV PATH="/root/miniconda3/bin:$PATH"
    ARG PATH="/root/miniconda3/bin:$PATH"
    RUN apt-get update
    
    RUN apt-get install -y wget && rm -rf /var/lib/apt/lists/*
    
    RUN wget \
        <https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh> \
        && mkdir /root/.conda \
        && bash Miniconda3-latest-Linux-x86_64.sh -b \
        && rm -f Miniconda3-latest-Linux-x86_64.sh 
    RUN conda install pip
    RUN pip install -r requirements.txt
    RUN conda install -c conda-forge theano-pymc -y
    Ken Nguyen
    Kevin Kho
    +1
    23 replies
    Copy to Clipboard
  • Ken Nguyen

    Ken Nguyen

    6 months ago
    I have a noob question, are you able to add a
    @task
    decorator on a function imported from a library (as opposed to one I defined)?
    Ken Nguyen
    Kevin Kho
    3 replies
    Copy to Clipboard
  • Jack Chang

    Jack Chang

    6 months ago
    Im trying to return three pandas dataframes in a task (aka function) and it gives me this
    TypeError: Task is not iterable. If your task returns multiple results, pass `nout` to the task decorator/constructor, or provide a `Tuple` return-type annotation to your task.
    Can anyone point me to an example where I can make it iterable?
    Jack Chang
    Kevin Kho
    2 replies
    Copy to Clipboard
  • h

    Hedgar

    6 months ago
    My flow failed and when I checked the error is the exception I inserted to check for completeness of data being extracted. I Actually did it because in the past without this check incomplete data got extracted. Could it be the way I raised the ValueError exception? Is there's a way in prefect to do exception that would suit my case? and secondly is there a way I can link this exception to a retry mechanism? That is if this occurred the flow could be seen as failed and therefore retry
    h
    Kevin Kho
    7 replies
    Copy to Clipboard
  • d

    Daniel Saxton

    6 months ago
    small nitpick here, but when logging into Prefect Cloud the suspicious login alerts show up as coming from Okta instead of Prefect, does it make more sense to brand these as Prefect emails just to minimize confusion (and not reveal what Prefect is using on the backend)?
    d
    Kevin Kho
    3 replies
    Copy to Clipboard
  • Leon Kozlowski

    Leon Kozlowski

    6 months ago
    Can I have a complex schedule that runs the same flow at the same time with different parameters?
    Leon Kozlowski
    Kevin Kho
    8 replies
    Copy to Clipboard
  • Henry

    Henry

    6 months ago
    is it bad practice to define a parameter in a module scope rather than in the flow context?
    input_a = Parameter('a')
    
    @task 
    def abc(b, c):
      return a + b + c
    
    with Flow("abc_flow") as flow:
      # in context
      result = abc()
    Henry
    Kevin Kho
    2 replies
    Copy to Clipboard
  • j

    Jared Teerlink

    6 months ago
    Hi Team - Trying to use a secret I created in the Cloud UI with Flow(name='flow_example') as flow: my_secret = PrefectSecret("my_password") data = needs_credentials(snow_pw=my_secret) Error that no local variable found. Need to set to reference cloud API
    j
    Kevin Kho
    3 replies
    Copy to Clipboard