https://prefect.io
Join Slack
<@ULVA73B9P> how do i instruct a custom logger to flush its logs programmatically?
b

Blake

about 1 year ago
@Marvin how do i instruct a custom logger to flush its logs programmatically?
b
m
  • 2
  • 4
  • 261
Hi, I’m trying to get a Datadog agent running in k8s to collect application metrics from my Prefect ...
d

Doug Balog

over 3 years ago
Hi, I’m trying to get a Datadog agent running in k8s to collect application metrics from my Prefect Flows. Just wondering if anybody has this working and if they could share how they did it.
d
k
+2
  • 4
  • 16
  • 260
<@ULVA73B9P> Why am I getting this error: ```ValueError: Unable to create hash - objects could not ...
m

Megan

7 months ago
@Marvin Why am I getting this error:
ValueError: Unable to create hash - objects could not be serialized.
  JSON error: Unable to serialize unknown type: <class 'pandas.core.frame.DataFrame'>
  Pickle error: cannot pickle 'weakref.ReferenceType' object

This often occurs when task inputs contain objects that cannot be cached like locks, file handles, or other system resources.

To resolve this, you can:
  1. Exclude these arguments by defining a custom `cache_key_fn`
  2. Disable caching by passing `cache_policy=NONE`
m
m
  • 2
  • 5
  • 258
Hey everyone! Does anyone know what are the resource requirements when deploying the prefect-server...
s

Stefan Crnojević

about 3 years ago
Hey everyone! Does anyone know what are the resource requirements when deploying the prefect-server helm chart? I tried to deploy it on two Raspberry Pi 4s with 8GB RAM that are running k3s, and most of the pods are unable to start, which results in 0 deployments working. All the dead pods are giving the
standard_init_linux.go:228: exec user process caused: exec format error
error in logs though, so not 100% sure the issue's hardware-related. Any suggestions would be appreciated 🙏
s
a
  • 2
  • 6
  • 258
Is there a way to use a k8s secret for environment variables in my job variable or prefect deploymen...
d

Devin Dennis

11 months ago
Is there a way to use a k8s secret for environment variables in my job variable or prefect deployment? I'd like the pod the prefect-worker spins up to use an environment variable thats loaded from a secret in my namespace. Not sure if this is possible
d
g
  • 2
  • 3
  • 257
is there a way programatically to get a list of deployments in prefect? i know we can do ```prefect ...
r

Rajan Subramanian

about 3 years ago
is there a way programatically to get a list of deployments in prefect? i know we can do
prefect deployment ls
but i want to get all my created deployments...1000 of them and run them all. so im assuming i have to programatically execute prefect deployment run deploymenet_name for each deployment in my deployments
discourse 1
r
k
  • 2
  • 5
  • 255
Hello. I'm using `subprocess` to run my dbt project locally (Prefect 1.2.2, Windows). I create my co...
m

Mansour Zayer

almost 3 years ago
Hello. I'm using
subprocess
to run my dbt project locally (Prefect 1.2.2, Windows). I create my command (
dbt run --vars '{data_processing_start_date: 2022-07-20, data_processing_end_date: 2022-07-20}' --profiles-dir ./
) like this:
command = (
        f"dbt run --vars '{{"
        f"data_processing_start_date: {data_processing_start_date}, "
        f"data_processing_end_date: {data_processing_end_date}}}' --profiles-dir ./ "
    )
The command is created correctly, but dbt gives me this error
dbt: error: unrecognized arguments: 2022-07-20, data_processing_end_date: 2022-07-20}'
Seems like dbt interprets
2022-07-20
as an argument instead of the value for
data_processing_start_date
variable. Keep in mind that when I run the same command in my CLI, dbt works fine. But when it's provided to dbt through
subprocess
this occurs. This is my subprocess:
subprocess.run(
        command,
        check=True,
        stderr=True,
        stdout=True,
        shell=True,
        cwd="dbt",
    )
Any idea what might cause this, and how to solve this? Thank you
✅ 1
m
a
  • 2
  • 4
  • 254
<@ULVA73B9P> how do I trigger a deployed flow using the prefect SDK using the requests library? give...
g

Gio

about 1 year ago
@Marvin how do I trigger a deployed flow using the prefect SDK using the requests library? give an example that sends flow parameters
g
m
  • 2
  • 5
  • 253
I'm trying to use the Scrapy framework in conjunction with Prefect 2.0, and Scrapy automatically set...
k

Kevin Grismore

almost 3 years ago
I'm trying to use the Scrapy framework in conjunction with Prefect 2.0, and Scrapy automatically sets up its own core Python Loggers. When I run a flow in the terminal, I can see the logs coming from Scrapy's loggers like so:
13:37:49.758 | DEBUG   | scrapy.core.scraper - Scraped from <200 <https://quotes.toscrape.com/page/9/>>
However, those logs don't appear in the flow run logs UI. I'm guessing I need to set
PREFECT_LOGGING_EXTRA_LOGGERS
, but I'm not certain what the right way to do that is.
prefect config set PREFECT_LOGGING_EXTRA_LOGGERS="scrapy"
seems to have no effect. I also tried
prefect config set PREFECT_LOGGING_EXTRA_LOGGERS="scrapy.core.engine"
using the name of the specific logger I wanted to see, but that didn't work either.
✅ 1
k
a
  • 2
  • 10
  • 253
Anyone else's flows being stuck in 'Pending' state? They were running fine earlier. Is it some sort ...
m

Moe

almost 2 years ago
Anyone else's flows being stuck in 'Pending' state? They were running fine earlier. Is it some sort of limit I've run into by any chance on the free tier?
m
n
i
  • 3
  • 6
  • 251
Previous131415Next

Prefect Community

Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.

Powered by