very newbie question: did anyone run into this iss...
# ask-the-community
n
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
this is odd
@Nan Qin what version of flytectl are you using and flyte
Copy code
flytectl version
n
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
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
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
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
@jeev i simply installed 1.4 (latest)
j
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
ohh what
this is a flytekit regression?
j
fails a basic workflow too
y
let’s revert?
j
you mean yank flytekit 1.4?
y
yeah
let’s yank first then patch
k
what?
absolutely
y
yanked.
the three main images have also been yanked.
n
@Nan Qin can you confirm?
yes 1.3.2 works
e
@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
yes 1.4.1 works well. thank you for the quick fix
150 Views