Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Transformer step (with or without 'custom') fails #29

Closed
sjr-db opened this issue Jan 9, 2023 · 5 comments
Closed

Transformer step (with or without 'custom') fails #29

sjr-db opened this issue Jan 9, 2023 · 5 comments

Comments

@sjr-db
Copy link

sjr-db commented Jan 9, 2023

Running the databricks classification code as is yields the following stacktrace, same if the transformer step is removed from the recipe.yaml file:

Traceback (most recent call last):
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-31a73d6c-afc2-4264-a090-c7698df1f926/lib/python3.9/site-packages/mlflow/recipes/step.py", line 139, in run
    self.step_card = self._run(output_directory=output_directory)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-31a73d6c-afc2-4264-a090-c7698df1f926/lib/python3.9/site-packages/mlflow/recipes/steps/transform.py", line 105, in _run
    validate_classification_config(self.task, self.positive_class, train_df, self.target_col)
  File "/local_disk0/.ephemeral_nfs/envs/pythonEnv-31a73d6c-afc2-4264-a090-c7698df1f926/lib/python3.9/site-packages/mlflow/recipes/utils/step.py", line 182, in validate_classification_config
    raise MlflowException(
mlflow.exceptions.MlflowException: `positive_class` must be specified for classification/v1 recipes. 
@sunishsheth2009
Copy link
Collaborator

Thank you so much for reporting this issue. We recently merged a fix in mlflow master to resolve this issue.
Let me know if that fixes the issue for you.

@paprocki-r
Copy link

The error still occurs

@sunishsheth2009
Copy link
Collaborator

The PR above was merged on December 29th and the latest release was released on 25th December. We do plan to do another release soon but until then can we try installing MLflow from master and see if that solves the problem? Thank you :)

@sjr-db
Copy link
Author

sjr-db commented Feb 3, 2023

Just added as a new repo to databricks, ran the classification example and hit the same error at the r.run("transform") cell.

"mlflow.exceptions.MlflowException: positive_class must be specified for classification/v1 recipes."

Looking at the yaml, that value is set to 1, I tried it as "1" but the same error occurred.

@sunishsheth2009
Copy link
Collaborator

The new repo of mlflow/recipes-examples unfortunately won't solve this bug. We need to install mlflow from master. We could add another line here after this as %pip install git+https://github.com/mlflow/mlflow@master and get the latest version of mlflow installed or install the latest as a pip library in Databricks cluster. Let me know if you have any other questions :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants