<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can we retrieve experiment results via MLflow API or is this only possible using UI? in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/can-we-retrieve-experiment-results-via-mlflow-api-or-is-this/m-p/21700#M1200</link>
    <description>&lt;P&gt;There are many ways you can retrieve experiments results using the mlflow API (see example if you want to retrieve and display for only a specific model (assuming you have the `model_name`:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;best_models = mlflow.search_runs(filter_string=f'tags.model="{model_name}" and attributes.status = "FINISHED" and metrics.F1 &amp;gt; 0', order_by=['metrics.F1 DESC'], max_results=1)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In Databricks my other favorite way to query runs for ad-hoc analytics is via the "mlflow-experiment" format:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df_client = spark.read.format("mlflow-experiment").load()
df_client.createOrReplaceTempView("vw_client")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Following which one can run queries slice/dice results using SparkSQL:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df_model_selector = spark.sql("""SELECT experiment_id, run_id, metrics.auc as AUC, metrics.F1 as F1, artifact_uri 
&amp;nbsp;
    FROM vw_client 
    
    WHERE status='FINISHED'
    ORDER BY metrics.f1 desc
&amp;nbsp;
  """)
display(df_model_selector)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Jun 2021 22:50:47 GMT</pubDate>
    <dc:creator>Mooune_DBU</dc:creator>
    <dc:date>2021-06-22T22:50:47Z</dc:date>
    <item>
      <title>Can we retrieve experiment results via MLflow API or is this only possible using UI?</title>
      <link>https://community.databricks.com/t5/machine-learning/can-we-retrieve-experiment-results-via-mlflow-api-or-is-this/m-p/21699#M1199</link>
      <description>&lt;P&gt;Yes, you can use the API&amp;nbsp;&lt;A href="https://www.mlflow.org/docs/latest/python_api/index.html" alt="https://www.mlflow.org/docs/latest/python_api/index.html" target="_blank"&gt;https://www.mlflow.org/docs/latest/python_api/index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 22:42:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/can-we-retrieve-experiment-results-via-mlflow-api-or-is-this/m-p/21699#M1199</guid>
      <dc:creator>User15787040559</dc:creator>
      <dc:date>2021-06-22T22:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Can we retrieve experiment results via MLflow API or is this only possible using UI?</title>
      <link>https://community.databricks.com/t5/machine-learning/can-we-retrieve-experiment-results-via-mlflow-api-or-is-this/m-p/21700#M1200</link>
      <description>&lt;P&gt;There are many ways you can retrieve experiments results using the mlflow API (see example if you want to retrieve and display for only a specific model (assuming you have the `model_name`:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;best_models = mlflow.search_runs(filter_string=f'tags.model="{model_name}" and attributes.status = "FINISHED" and metrics.F1 &amp;gt; 0', order_by=['metrics.F1 DESC'], max_results=1)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In Databricks my other favorite way to query runs for ad-hoc analytics is via the "mlflow-experiment" format:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df_client = spark.read.format("mlflow-experiment").load()
df_client.createOrReplaceTempView("vw_client")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Following which one can run queries slice/dice results using SparkSQL:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;df_model_selector = spark.sql("""SELECT experiment_id, run_id, metrics.auc as AUC, metrics.F1 as F1, artifact_uri 
&amp;nbsp;
    FROM vw_client 
    
    WHERE status='FINISHED'
    ORDER BY metrics.f1 desc
&amp;nbsp;
  """)
display(df_model_selector)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 22:50:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/can-we-retrieve-experiment-results-via-mlflow-api-or-is-this/m-p/21700#M1200</guid>
      <dc:creator>Mooune_DBU</dc:creator>
      <dc:date>2021-06-22T22:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can we retrieve experiment results via MLflow API or is this only possible using UI?</title>
      <link>https://community.databricks.com/t5/machine-learning/can-we-retrieve-experiment-results-via-mlflow-api-or-is-this/m-p/110500#M3967</link>
      <description>&lt;P&gt;And how about tracing data? Do you know how to read like&lt;/P&gt;&lt;PRE&gt;spark.read.format("mlflow-experiment").load()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2025 14:54:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/can-we-retrieve-experiment-results-via-mlflow-api-or-is-this/m-p/110500#M3967</guid>
      <dc:creator>diogo_vieira</dc:creator>
      <dc:date>2025-02-18T14:54:35Z</dc:date>
    </item>
  </channel>
</rss>

