<?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 TypeError: ColSpec.__init__() got an unexpected keyword argument 'required' in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/typeerror-colspec-init-got-an-unexpected-keyword-argument/m-p/74575#M34759</link>
    <description>&lt;P class=""&gt;Hi Team, one of my customer is facing the below issue.. Anyone faced this issue before ? Any help would be appreciated.&lt;/P&gt;&lt;P class=""&gt;import mlflow&lt;/P&gt;&lt;P class=""&gt;mlflow.set_registry_uri("databricks-uc")&lt;/P&gt;&lt;P class=""&gt;catalog_name = "system"&lt;/P&gt;&lt;P class=""&gt;embed = mlflow.pyfunc.spark_udf(spark, f"models:/system.ai.bge_m3/1", "array&amp;lt;float&amp;gt;")&lt;/P&gt;&lt;P class=""&gt;On running the above piece of code, we are getting the below error&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;TypeError: ColSpec.__init__() got an unexpected keyword argument 'required'&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;WARNING mlflow.pyfunc: Detected one or more mismatches between the model's dependencies and the current Python environment: - mlflow (current: 2.7.1, required: mlflow==2.11.2) - torch (current: 2.0.1+cu118, required: torch==2.2.1) - transformers (current: 4.31.0, required: transformers==4.38.2) To fix the mismatches, call `mlflow.pyfunc.get_model_dependencies(model_uri)` to fetch the model's environment and install dependencies using the resulting environment file.&lt;/P&gt;&lt;P class=""&gt;WARNING mlflow.pyfunc: Calling `spark_udf()` with `env_manager="local"` does not recreate the same environment that was used during training, which may lead to errors or inaccurate predictions. We recommend specifying `env_manager="conda"`, which automatically recreates the environment that was used to train the model and performs inference in the recreated environment.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2024 10:56:39 GMT</pubDate>
    <dc:creator>Sangeethagk</dc:creator>
    <dc:date>2024-06-17T10:56:39Z</dc:date>
    <item>
      <title>TypeError: ColSpec.__init__() got an unexpected keyword argument 'required'</title>
      <link>https://community.databricks.com/t5/data-engineering/typeerror-colspec-init-got-an-unexpected-keyword-argument/m-p/74575#M34759</link>
      <description>&lt;P class=""&gt;Hi Team, one of my customer is facing the below issue.. Anyone faced this issue before ? Any help would be appreciated.&lt;/P&gt;&lt;P class=""&gt;import mlflow&lt;/P&gt;&lt;P class=""&gt;mlflow.set_registry_uri("databricks-uc")&lt;/P&gt;&lt;P class=""&gt;catalog_name = "system"&lt;/P&gt;&lt;P class=""&gt;embed = mlflow.pyfunc.spark_udf(spark, f"models:/system.ai.bge_m3/1", "array&amp;lt;float&amp;gt;")&lt;/P&gt;&lt;P class=""&gt;On running the above piece of code, we are getting the below error&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;TypeError: ColSpec.__init__() got an unexpected keyword argument 'required'&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;WARNING mlflow.pyfunc: Detected one or more mismatches between the model's dependencies and the current Python environment: - mlflow (current: 2.7.1, required: mlflow==2.11.2) - torch (current: 2.0.1+cu118, required: torch==2.2.1) - transformers (current: 4.31.0, required: transformers==4.38.2) To fix the mismatches, call `mlflow.pyfunc.get_model_dependencies(model_uri)` to fetch the model's environment and install dependencies using the resulting environment file.&lt;/P&gt;&lt;P class=""&gt;WARNING mlflow.pyfunc: Calling `spark_udf()` with `env_manager="local"` does not recreate the same environment that was used during training, which may lead to errors or inaccurate predictions. We recommend specifying `env_manager="conda"`, which automatically recreates the environment that was used to train the model and performs inference in the recreated environment.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2024 10:56:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/typeerror-colspec-init-got-an-unexpected-keyword-argument/m-p/74575#M34759</guid>
      <dc:creator>Sangeethagk</dc:creator>
      <dc:date>2024-06-17T10:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: TypeError: ColSpec.__init__() got an unexpected keyword argument 'required'</title>
      <link>https://community.databricks.com/t5/data-engineering/typeerror-colspec-init-got-an-unexpected-keyword-argument/m-p/94133#M38821</link>
      <description>&lt;P&gt;Upgrade the version of the mlflow package. In 2.7.1 there is no such parameter.&amp;nbsp;&lt;BR /&gt;&lt;A href="https://mlflow.org/docs/2.7.1/python_api/mlflow.types.html" target="_blank" rel="noopener"&gt;https://mlflow.org/docs/2.7.1/python_api/mlflow.types.html&lt;/A&gt;&lt;BR /&gt;While in the latest (2.17.0) there is such&amp;nbsp;&lt;A href="https://mlflow.org/docs/2.17.0/python_api/mlflow.types.html" target="_blank" rel="noopener"&gt;https://mlflow.org/docs/2.17.0/python_api/mlflow.types.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%pip install mlflow==2.17.0
dbutils.library.restartPython()&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2024 15:20:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/typeerror-colspec-init-got-an-unexpected-keyword-argument/m-p/94133#M38821</guid>
      <dc:creator>viksuper555</dc:creator>
      <dc:date>2024-10-15T15:20:44Z</dc:date>
    </item>
  </channel>
</rss>

