Skip to content

PyHealth trainer uses deprecated model.mode attribute instead of checking its output or label processors #914

@jhnwu3

Description

@jhnwu3

if self.model.mode is not None:

Basically, we set a mode for what metrics we use, binary, multiclass, multilabel, etc.

The irony here is we can simply just directly map that mode with our output processors and thereby eliminating an intermediate variable.

This isn't a big deal now, but would be good to remedy as we start incorporating things like reconstruction losses, generative modeling techniques, etc. where we want to scale what metrics are compatible with not only the vanilla PyHealth trainer but also things like PyTorch lightning that is directly compatible with the litData SampleDataset generated by any set_task()

Metadata

Metadata

Assignees

No one assigned

    Labels

    infraInfrastructure: data loading, caching, pipelines

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions