Inspect or view Unit information#

You can use unit-run view commands to view the information of Objects related to Unit.

Use --dir to view the information of a stored Unit from the given directory path#

unit-run view --dir test
{
  "src_path": "test.py",
  "src_name": "y",
  "load_path": null,
  "param_group_names": "['name1', 'name2', 'name3', 'name4']"
}

View the specific paramter group in a Unit#

unit-run view --dir test name2
{
  "data": {
    "a": 3,
    "b": 5
  },
  "load_path": "test\\name2.param_group.json",
  "valid": true
}

Use --raw to view a raw unit from a source file#

unit-run view --raw test.py y
{
  "name": "y",
  "paramters": [
    {
      "name": "a",
      "annotation": "<class 'inspect._empty'>",
      "kind": "positional or keyword"
    },
    {
      "name": "b",
      "annotation": "<class 'inspect._empty'>",
      "kind": "positional or keyword"
    }
  ]
}