https://flyte.org logo
#ask-the-community
Title
# ask-the-community
n

Nan Qin

03/07/2023, 5:16 PM
very newbie question: did anyone run into this issue when running the tutorial on the local demo cluster?
workflow definition:
Copy code
import pandas as pd
from sklearn.datasets import load_wine
from sklearn.linear_model import LogisticRegression

import flytekit.extras.sklearn
from flytekit import task, workflow


@task
def get_data() -> pd.DataFrame:
    """Get the wine dataset."""
    return load_wine(as_frame=True).frame

@task
def process_data(data: pd.DataFrame) -> pd.DataFrame:
    """Simplify the task from a 3-class to a binary classification problem."""
    return data.assign(target=lambda x: x["target"].where(x["target"] == 0, 1))

@task
def train_model(data: pd.DataFrame, hyperparameters: dict) -> LogisticRegression:
    """Train a model on the wine dataset."""
    features = data.drop("target", axis="columns")
    target = data["target"]
    return LogisticRegression(max_iter=3000, **hyperparameters).fit(features, target)

@workflow
def training_workflow(hyperparameters: dict) -> LogisticRegression:
    """Put all of the steps together into a single workflow."""
    data = get_data()
    processed_data = process_data(data=data)
    return train_model(
        data=processed_data,
        hyperparameters=hyperparameters,
    )
k

Ketan (kumare3)

03/07/2023, 5:25 PM
this is odd
@Nan Qin what version of flytectl are you using and flyte
Copy code
flytectl version
n

Nan Qin

03/07/2023, 5:27 PM
Copy code
(flyte)  % flytectl version                                                                                                                                                          ~ protopias-mbp
INFO[0000] [0] Couldn't find a config file []. Relying on env vars and pflags. 
{
  "App": "flytectl",
  "Build": "a6b856a",
  "Version": "0.6.32",
  "BuildTime": "2023-03-07 11:26:50.606778 -0600 CST m=+0.016443210"
}%
Copy code
(flyte)  % pip list | grep flyte                                                                                             ~/flytesnacks (master ⚡) protopias-mbp
flyteidl                 1.3.9
flytekit                 1.4.0
k

Ketan (kumare3)

03/07/2023, 5:40 PM
i am trying it now
@Nan Qin I was able to reproduce it
cc @jeev / @Eduardo Apolinario (eapolinario) / @Yee I think 1.4 is broken for sandbox
is it the change that @jeev made?
j

jeev

03/07/2023, 5:49 PM
hmm which change @Ketan (kumare3)?
the ones from last night didnt make it into 1.4
@Nan Qin: can you paste the commands/actions you took to produce this error?
n

Nan Qin

03/07/2023, 5:55 PM
Copy code
pip install flytekit scikit-learn
brew install flyteorg/homebrew-tap/flytectl
flytectl demo start
export FLYTECTL_CONFIG=~/.flyte/config-sandbox.yaml
pyflyte run --remote example.py training_workflow \
    --hyperparameters '{"C": 0.1}'
k

Ketan (kumare3)

03/07/2023, 5:55 PM
@jeev i simply installed 1.4 (latest)
j

jeev

03/07/2023, 5:56 PM
ty
im running sanity checks with latest flytekit
yup fails with latest flytekit
succeeds with flytekit 1.3.2
@Nan Qin can you confirm?
k

Ketan (kumare3)

03/07/2023, 5:58 PM
ohh what
this is a flytekit regression?
j

jeev

03/07/2023, 5:58 PM
fails a basic workflow too
y

Yee

03/07/2023, 5:59 PM
let’s revert?
j

jeev

03/07/2023, 5:59 PM
you mean yank flytekit 1.4?
y

Yee

03/07/2023, 5:59 PM
yeah
let’s yank first then patch
k

Ketan (kumare3)

03/07/2023, 5:59 PM
what?
absolutely
y

Yee

03/07/2023, 6:00 PM
yanked.
the three main images have also been yanked.
n

Nan Qin

03/07/2023, 6:26 PM
@Nan Qin can you confirm?
yes 1.3.2 works
e

Eduardo Apolinario (eapolinario)

03/08/2023, 3:03 AM
@Nan Qin, we released flytekit 1.4.1 which should fix the issue you faced. Please, give it a try and sorry for the trouble.
n

Nan Qin

03/08/2023, 7:24 PM
yes 1.4.1 works well. thank you for the quick fix