Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
flytekitplugins-whylogs
Advanced tools
Enable the use of whylogs profiles to be used in flyte tasks to get aggregate statistics about data.
whylogs is an open source library for logging any kind of data. With whylogs, you are able to generate summaries of datasets (called whylogs profiles) which can be used to:
pip install flytekitplugins-whylogs
To generate profiles, you can add a task like the following:
import whylogs as why
from whylogs.core import DatasetProfileView
import pandas as pd
from flytekit import task
@task
def profile(df: pd.DataFrame) -> DatasetProfileView:
result = why.log(df) # Various overloads for different common data types exist
profile_view = result.view()
return profile
NOTE: You'll be passing around
DatasetProfileView
from tasks, notDatasetProfile
.
A common step in data pipelines is data validation. This can be done in
whylogs
through the constraint feature. You'll be able to create failure tasks
if the data in the workflow doesn't conform to some configured constraints, like
min/max values on features, data types on features, etc.
from whylogs.core.constraints.factories import greater_than_number, mean_between_range
@task
def validate_data(profile_view: DatasetProfileView):
builder = ConstraintsBuilder(dataset_profile_view=profile_view)
builder.add_constraint(greater_than_number(column_name="my_column", number=0.14))
builder.add_constraint(mean_between_range(column_name="my_other_column", lower=2, upper=3))
constraint = builder.build()
valid = constraint.validate()
if valid is False:
print(constraint.report())
raise Exception("Invalid data found")
If you want to learn more about whylogs, check out our example notebooks.
FAQs
Enable the use of whylogs profiles to be used in flyte tasks to get aggregate statistics about data.
We found that flytekitplugins-whylogs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.