小编Der*_*ley的帖子

无法在 Jupyter 中运行 mlflow ui

我是 MLflow 的新手。我试图在 Jupyter 中使用它。作为快速入门的一部分,我运行了以下代码:

import os
from mlflow import log_metric, log_param, log_artifact

if __name__ == "__main__":
    # Log a parameter (key-value pair)
    log_param("param1", 5)

    # Log a metric; metrics can be updated throughout the run
    log_metric("foo", 1)
    log_metric("foo", 2)
    log_metric("foo", 3)

    # Log an artifact (output file)
    with open("output.txt", "w") as f:
        f.write("Hello world!")
    log_artifact("output.txt")
Run Code Online (Sandbox Code Playgroud)

运行没有任何问题。但是,当我输入 时mlflow ui,出现错误:语法无效。我可能做错了什么?

python mlflow

3
推荐指数
1
解决办法
9650
查看次数

同一行的不同标记颜色

我正在尝试使用plotly 和dash 为网络应用程序创建一个简单的线图。我想要一条连接两点的线。我希望其中一个点是红色,另一个点是绿色。这是我到目前为止所拥有的:

import dash
import dash_core_components as dcc
import dash_html_components as html
import plotly.graph_objs as go
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets = external_stylesheets)
graph = dcc.Graph(figure = {
    'data' : [
        go.Scatter(x = [1,4], y = [2,3], mode = 'lines+markers', opacity = 0.7, marker = {
            'size' : 15,
            'line' : {'width' : 0.5, 'color' : 'black'}
        })
    ]
})
app.layout = html.Div([graph])
if __name__ == '__main__':
    app.run_server(debug = False)
Run Code Online (Sandbox Code Playgroud)

我在包含所有最新软件包的 Jupyter 笔记本中运行此代码。如果我运行这段代码,我会得到我想要的线图,但两个点都是蓝色的。我希望对应于 (1, 2) 的点为红色,(4, 3) …

python plotly plotly-dash

3
推荐指数
1
解决办法
2071
查看次数

标签 统计

python ×2

mlflow ×1

plotly ×1

plotly-dash ×1