harupy commented on PR #39467:
URL: https://github.com/apache/spark/pull/39467#issuecomment-1376753692

   I was able to reproduce the issue.
   
   The root cause is this line:
   
https://github.com/mlflow/mlflow/blob/d2ae53af1af2b7908d294749996fc30866af3bd2/mlflow/pyfunc/__init__.py#L1055
   
   ```
           if pdf is None:
               print(args)
               args = list(args)
               if input_schema is None:
                   names = [str(i) for i in range(len(args))]
               else:
                   names = input_schema.input_names()
                   if len(args) > len(names):
                       args = args[: len(names)]
                   if len(args) < len(names):
                       raise MlflowException(
                           "Model input is missing columns. Expected {} input 
columns {},"
                           " but the model received only {} unnamed input 
columns"
                           " (Since the columns were passed unnamed they are 
expected to be in"
                           " the order specified by the 
schema).".format(len(names), names, len(args))
                       )
               pdf = pandas.DataFrame(data={names[i]: x for i, x in 
enumerate(args)}, columns=names)  👈👈👈 this line
               print(pdf)
   ```
   
   This line creates a dataframe with columns that look like `["0", "1", ...]` 
unless `input_schema` is specified.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to