相关疑难解决方法(0)

如何修复 MLflow UI 中未显示的工件

我使用了 MLflow 并使用下面的函数(来自 pydataberlin)记录了参数。

def train(alpha=0.5, l1_ratio=0.5):
    # train a model with given parameters
    warnings.filterwarnings("ignore")
    np.random.seed(40)

    # Read the wine-quality csv file (make sure you're running this from the root of MLflow!)
    data_path = "data/wine-quality.csv"
    train_x, train_y, test_x, test_y = load_data(data_path)

    # Useful for multiple runs (only doing one run in this sample notebook)    
    with mlflow.start_run():
        # Execute ElasticNet
        lr = ElasticNet(alpha=alpha, l1_ratio=l1_ratio, random_state=42)
        lr.fit(train_x, train_y)

        # Evaluate Metrics
        predicted_qualities = lr.predict(test_x)
        (rmse, mae, r2) = eval_metrics(test_y, predicted_qualities)

        # Print …
Run Code Online (Sandbox Code Playgroud)

python artifacts mlflow

4
推荐指数
2
解决办法
2万
查看次数

标签 统计

artifacts ×1

mlflow ×1

python ×1