<?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: Logging signature slows down inference to a crawl in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/logging-signature-slows-down-inference-to-a-crawl/m-p/73958#M3363</link>
    <description>&lt;P&gt;Sure you can reference the commented out code &lt;A href="https://github.com/rewiringamerica/surrogate_modeling/blob/59b985dcc27ad63eb4a7cf453b3566e0cae7c081/src/databricks/model_training.py#L233" target="_blank" rel="noopener"&gt;here&lt;/A&gt; which builds the signature from a pyspark dataframe with array types. This signature would then be passed in on L275 (also commented out). Please let me know if you get this&amp;nbsp; working without making inference unbearably slow.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jun 2024 23:57:43 GMT</pubDate>
    <dc:creator>Miki</dc:creator>
    <dc:date>2024-06-13T23:57:43Z</dc:date>
    <item>
      <title>Logging signature slows down inference to a crawl</title>
      <link>https://community.databricks.com/t5/machine-learning/logging-signature-slows-down-inference-to-a-crawl/m-p/71623#M3331</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I am having a similar issue this&lt;LI-MESSAGE title="log signature and input data for Spark LinearRegression" uid="60326" url="https://community.databricks.com/t5/community-discussions/log-signature-and-input-data-for-spark-linearregression/m-p/60326#U60326" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-forum-thread lia-fa-icon lia-fa-forum lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;using mlflow v2.13.0 and using mlflow.pyfunc.log_model to log my model. Starting a new post here since there doesn't seem to be any follow up from the community on that.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;While I am able to save a signature with array types, running inference on a model with the signature logged is more than 100x slower, which is not acceptable for my use case. Skipping logging the array columns as the original answer suggests in the linked post does not work, since this throws a key error at inference time on the skipped columns. Without logging the signature, I cannot register the model in the unity catalog. However, I know there must be a way around this because if you use Databrick's FeatureEngineeringClient's log model function&amp;nbsp;&lt;/SPAN&gt;&lt;A class="" href="https://api-docs.databricks.com/python/feature-engineering/latest/feature_engineering.client.html" target="_blank" rel="noopener noreferrer"&gt;here&lt;/A&gt;&lt;SPAN&gt;, it has no problem registering the model and running inference in a reasonable amount of time, and based on the logged model schema, it does seem to be skipping these array columns somehow. However, I cannot use the FeatureEngineeringClient's log model function because this doesn't allow me to pass in a custom loss function. Any advice here would be appreciated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 14:33:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/logging-signature-slows-down-inference-to-a-crawl/m-p/71623#M3331</guid>
      <dc:creator>Miki</dc:creator>
      <dc:date>2024-06-04T14:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Logging signature slows down inference to a crawl</title>
      <link>https://community.databricks.com/t5/machine-learning/logging-signature-slows-down-inference-to-a-crawl/m-p/71832#M3334</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102354"&gt;@Miki&lt;/a&gt;&amp;nbsp;can you please share you code for logging the&amp;nbsp;&lt;SPAN&gt;signature with array types&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jun 2024 07:11:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/logging-signature-slows-down-inference-to-a-crawl/m-p/71832#M3334</guid>
      <dc:creator>MohsenJ</dc:creator>
      <dc:date>2024-06-06T07:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Logging signature slows down inference to a crawl</title>
      <link>https://community.databricks.com/t5/machine-learning/logging-signature-slows-down-inference-to-a-crawl/m-p/73958#M3363</link>
      <description>&lt;P&gt;Sure you can reference the commented out code &lt;A href="https://github.com/rewiringamerica/surrogate_modeling/blob/59b985dcc27ad63eb4a7cf453b3566e0cae7c081/src/databricks/model_training.py#L233" target="_blank" rel="noopener"&gt;here&lt;/A&gt; which builds the signature from a pyspark dataframe with array types. This signature would then be passed in on L275 (also commented out). Please let me know if you get this&amp;nbsp; working without making inference unbearably slow.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 23:57:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/logging-signature-slows-down-inference-to-a-crawl/m-p/73958#M3363</guid>
      <dc:creator>Miki</dc:creator>
      <dc:date>2024-06-13T23:57:43Z</dc:date>
    </item>
  </channel>
</rss>

