Skip to content

Errors result in huge, verbose output #52

Closed
@mpharrigan

Description

@mpharrigan

It seems when there's an error in sphinx, you get a printout of the following form

path/to/filename.rst:77: ERROR: Unknown target name: "children".

When an error occurs in a numpydoc-ed class, the filename part is replaced with a representation of a python list of all the lines (in rst-form, post numpydoc mangling) which can be quite long. It fills up my bash history and makes it incredibly hard to see the actual error message.

['n_components_  (int) The estimated number of connected components in the graph.  ', '    children_  (array-like, shape (n_nodes-1, 2)) The children of each non-leaf node. Values less than `n_samples` correspond to leaves of the tree which are the original samples. A node `i` greater than or equal to `n_samples` is a non-leaf node and has children `children_[i - n_samples]`. Alternatively at the i-th iteration, children[i][0] and children[i][1] are merged to form node `n_samples + i`  ', '=============  ==========', '', '.. rubric:: Methods', '', '.. autosummary::', '', '   fit', '   fit_predict', '   fit_transform', '   get_params', '   partial_predict', '   partial_transform', '   predict', '   set_params', '   summarize', '   transform', '', '.. automethod:: __init__', '', '', '.. rubric:: Methods', '', '.. autosummary::', '', '   ~Ward.__init__', '   ~Ward.fit', '   ~Ward.fit_predict', '   ~Ward.fit_transform', '   ~Ward.get_params', '   ~Ward.partial_predict', '   ~Ward.partial_transform', '   ~Ward.predict', '   ~Ward.set_params', '   ~Ward.summarize', '   ~Ward.transform', '', '.. py:method:: Ward.fit(sequences, y=None)', '   :module: msmbuilder.cluster', '', '   ', '   ', '   Fit the  clustering on the data', '   ', '   ', '   :Parameters:', '   ', '       **sequences** : list of array-like, each of shape [sequence_length, n_features]', '   ', '           A list of multivariate timeseries. Each sequence may have', '           a different length, but they all must have the same number', '           of features.', '   ', '   :Returns:', '   ', '       self', '   ', '           ', '   ', '', '.. py:method:: Ward.fit_predict(sequences, y=None)', '   :module: msmbuilder.cluster', '', '   ', '   ', '   Performs clustering on X and returns cluster labels.', '   ', '   ', '   :Parameters:', '   ', '       **sequences** : list of array-like, each of shape [sequence_length, n_features]', '   ', '           A list of multivariate timeseries. Each sequence may have', '           a different length, but they all must have the same number', '           of features.', '   ', '   :Returns:', '   ', '       **Y** : list of ndarray, each of shape [sequence_length, ]', '   ', '           Cluster labels', '   ', '', '.. py:method:: Ward.fit_transform(sequences, y=None)', '   :module: msmbuilder.cluster', '', '   ', '   ', '   Alias for fit_predict', '   ', '   ', '', '.. py:method:: Ward.get_params(deep=True)', '   :module: msmbuilder.cluster', '', '   ', '   ', '   Get parameters for this estimator.', '   ', '   ', '   :Parameters:', '   ', '       **deep: boolean, optional**', '   ', '           If True, will return the parameters for this estimator and', '           contained subobjects that are estimators.', '   ', '   :Returns:', '   ', '       **params** : mapping of string to any', '   ', '           Parameter names mapped to their values.', '   ', '', '.. py:method:: Ward.partial_predict(X, y=None)', '   :module: msmbuilder.cluster', '', '   ', '   ', '   Predict the closest cluster each sample in X belongs to.', '   ', '   In the vector quantization literature, `cluster_centers_` is called', '   the code book and each value returned by `predict` is the index of', '   the closest code in the code book.', '   ', '   :Parameters:', '   ', '       **X** : array-like shape=(n_samples, n_features)', '   ', '           A single timeseries.', '   ', '   :Returns:', '   ', '       **Y** : array, shape=(n_samples,)', '   ', '           Index of the cluster that each sample belongs to', '   ', '', '.. py:method:: Ward.partial_transform(X)', '   :module: msmbuilder.cluster', '', '   ']:77: ERROR: Unknown target name: "children".

Can anyone point me to where I might investigate where this filename is getting (re-)set?

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