Skip to content

Minor path bug in plot_model_card.py #427

@tuscland

Description

@tuscland

Hello,

When I generate the model card using the python script provided in this example, the permutation importances figure is referenced using an absolute path, instead of a path relative to the repository:

model_card.add_permutation_importances(
    importances,
    X_test.columns,
    plot_file=Path(local_repo) / "importance.png",
    plot_name="Permutation Importance",
)

This results in the following output (in README.md):

![Permutation Importance](/var/folders/pc/r_g178qx7tx56zn8zlgqft9h0000gn/T/skops-m2dcspf7/importance.png)

Instead, the plot_file argument should just be "importance.png".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions