Skip to content

autofunction for pytorch and numpy #176

@rsamf

Description

@rsamf

Graphbook should have a utility function that inspects a given function's name, signature, and docs and returns a Step class with those attributes. The input should be the first parameter. We should construct the Parameters based on the function signature starting from the second parameter and each of its annotations. i.e:

  • str -> "string"
  • int -> "number"
  • float -> "number"
  • tuple -> "list[number]"
  • etc.

This function should inspect pytorch/numpy style functions that typically have the Tensor or ndarray as the first parameter. It should work for functions like torch.mean, torch.std and numpy.mean, and functions from the package torchvision.transforms.functional.

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