Module Expr Str TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Import alias Import alias Import alias identifier ImportFrom alias ImportFrom alias alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore NameLoad Assign NameStore NameLoad Import alias ImportFrom alias ImportFrom alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad NameLoad keyword Num keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Call NameLoad NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If CompareEq NameLoad Str body Assign NameStore BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Call NameLoad NameLoad Return orelse Assert CompareEq NameLoad Str TryExcept body Expr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Str If CompareNotEq Call AttributeLoad Call NameLoad NameLoad attr Str Num body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args defaults body Expr Str TryExcept body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str handlers ExceptHandler type NameLoad body Assign NameStore Str If CompareEq NameLoad Str body Return AttributeLoad NameLoad attr Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq NameLoad Str body Assign NameStore Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad BinOpMod Str NameLoad orelse If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str NameLoad TryExcept body If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If CompareNotEq Call AttributeLoad Call NameLoad NameLoad attr Str Num body Raise TryExcept body Expr Call AttributeLoad NameLoad attr Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If BoolOpAnd CompareEq Call NameLoad NameLoad Str CompareEq Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr Str orelse If CompareEq Call NameLoad NameLoad Str body Raise Import alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Call NameLoad NameLoad Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str Call NameLoad NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Num If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad Str Return SubscriptLoad Call AttributeLoad NameLoad attr Str NameLoad Index Num orelse Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad decorator_list Assign NameStore Dict Num Num Num Num Str Str Str Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Str TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call NameLoad Str Assign NameStore Call NameLoad NameLoad If CompareEq NameLoad Num body Assign NameStore TupleLoad orelse Assign NameStore Call NameLoad NameLoad Call NameLoad Num NameLoad Assign NameStore Num For NameStore NameLoad body AugAssignMult NameStore NameLoad TryExcept body Assign NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Expr Call NameLoad Call NameLoad BinOpAdd Str Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num If NameLoad body Raise Call NameLoad BinOpAdd Call NameLoad Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str ImportFrom alias Assign NameStore Str If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num UnaryOpUSub Call NameLoad NameLoad orelse Assign NameStore NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Slice Num Assign NameStore Call AttributeLoad Str attr NameLoad If CompareNotEq NameLoad Str body AugAssignAdd NameStore Str Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Assign SubscriptStore AttributeLoad NameLoad attr Index Str SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body Expr Str TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If CompareEq NameLoad Num body Assign NameStore Call NameLoad NameLoad If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Return Call AttributeLoad NameLoad attr NameLoad If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body TryExcept body Return Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad If Call AttributeLoad NameLoad attr Str body Global identifier If CompareIs NameLoad NameLoad body Import alias Assign NameStore AttributeLoad NameLoad attr TryExcept body Return Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareNotEq Call AttributeLoad Call NameLoad NameLoad attr Str Num body Global identifier If CompareIs NameLoad NameLoad body Import alias Assign NameStore NameLoad Return Call AttributeLoad NameLoad attr NameLoad Str orelse Raise Assert NameLoad Assign NameStore IfExp AttributeLoad NameLoad attr Dict Str Str Dict FunctionDef arguments args defaults body If CompareGt NameLoad Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr Str With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore BinOpMult Num BinOpPow Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad BinOpAdd NameLoad Num NameLoad decorator_list TryExcept body If UnaryOpNot NameLoad body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad orelse TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Str body Expr Call NameLoad NameLoad BinOpMod Str NameLoad orelse Expr Call NameLoad NameLoad BinOpMod Str NameLoad ExceptHandler type TupleLoad NameLoad NameLoad NameLoad name NameStore body If UnaryOpNot NameLoad body Expr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad ExceptHandler type NameLoad body Expr AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Expr Call NameLoad Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad ExceptHandler type NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad If UnaryOpNot Call NameLoad NameLoad Str body TryExcept body Assign AttributeStore NameLoad attr BinOpAdd BinOpAdd Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str handlers ExceptHandler type NameLoad body Pass Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str For NameStore Call NameLoad Num BinOpAdd Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Slice Num NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If CompareEq NameLoad Num body If CompareEq NameLoad Str body Continue Expr Call NameLoad Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Str Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Slice Num BinOpSub NameLoad Num Assign NameStore SubscriptLoad NameLoad Index BinOpSub NameLoad Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Num body Expr Call NameLoad Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Str If CompareGt Call NameLoad NameLoad Num body Expr Call NameLoad Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad Call NameLoad BinOpAdd NameLoad Str Expr Call NameLoad Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Str Call NameLoad NameLoad NameLoad Str NameLoad Str Assert NameLoad decorator_list
N/A N/A 
Utilities for serializing and deserializing python objects.
 N/A N/A cPickle BadPickleGet N/A N/A N/A ImportError N/A N/A BadPickleGet KeyError N/A pickle N/A logging N/A numpy np theano.compat six theano.compat.six.moves cPickle xrange N/A os N/A time N/A warnings N/A sys pylearn2.utils.string_utils preprocess pylearn2.utils.mem improve_memory_error_message N/A io None N/A hdf_reader None N/A struct pylearn2.utils.exc reraise_as pylearn2.utils.string_utils match N/A shutil N/A logger N/A N/A logging getLogger __name__ load N/A N/A filepath retry N/A True N/A N/A 
    Loads object(s) from file specified by 'filepath'.

    Parameters
    ----------
    filepath : str
        A path to a file to load. Should be a pickle, Matlab, or NumPy
        file; or a .txt or .amat file that numpy.loadtxt can load.
    retry : bool, optional
        If True, will make a handful of attempts to load the file before
        giving up. This can be useful if you are for example calling
        show_weights.py on a file that is actively being written to by a
        training script--sometimes the load attempt might fail if the
        training script writes at the same time show_weights tries to
        read, but if you try again after a few seconds you should be able
        to open the file.

    Returns
    -------
    loaded_object : object
        The object that was stored in the file.
     N/A N/A _load filepath recurse_depth 0 retry True N/A save N/A N/A filepath obj on_overwrite N/A ignore N/A N/A 
    Serialize `object` to a file denoted by `filepath`.

    Parameters
    ----------
    filepath : str
        A filename. If the suffix is `.joblib` and joblib can be
        imported, `joblib.dump` is used in place of the regular
        pickling mechanisms; this results in much faster saves by
        saving arrays as separate .npy files on disk. If the file
        suffix is `.npy` than `numpy.save` is attempted on `obj`.
        Otherwise, (c)pickle is used.

    obj : object
        A Python object to be serialized.

    on_overwrite : str, optional
        A string specifying what to do if the file already exists.
        Possible values include:

        - "ignore" : Just overwrite the existing file.
        - "backup" : Make a backup copy of the file (<filepath>.bak).
          Save the new copy. Then delete the backup copy. This allows
          recovery of the old version of the file if saving the new one
          fails.
     N/A filepath N/A preprocess filepath N/A N/A N/A N/A os path exists filepath N/A N/A N/A on_overwrite backup N/A N/A backup N/A filepath .bak N/A N/A N/A shutil move filepath backup N/A N/A save filepath obj N/A N/A N/A N/A N/A os remove backup N/A N/A N/A Exception N/A e N/A N/A N/A N/A warnings warn N/A N/A N/A Got an error while trying to remove  backup : N/A str e N/A N/A N/A N/A on_overwrite ignore N/A N/A N/A N/A _save filepath obj N/A N/A N/A RuntimeError N/A e N/A N/A  Sometimes for large theano graphs, pickle/cPickle exceed the
            maximum recursion depth. This seems to me like a fundamental
            design flaw in pickle/cPickle. The workaround I employ here
            is the one recommended to someone who had a similar problem
            on stackexchange:

            http://stackoverflow.com/questions/2134706/hitting-maximum-recursion-depth-using-pythons-pickle-cpickle

            Obviously this does not scale and could cause a crash
            but I don't see another solution short of writing our
            own implementation of pickle.
         N/A N/A N/A N/A N/A str e find recursion -1 N/A N/A N/A N/A logger warning N/A N/A N/A pylearn2.utils.save encountered the following error:  N/A str e 
Attempting to resolve this error by calling  sys.setrecusionlimit and retrying N/A old_limit N/A N/A sys getrecursionlimit N/A N/A N/A N/A N/A sys setrecursionlimit 50000 N/A N/A _save filepath obj N/A N/A N/A N/A sys setrecursionlimit old_limit N/A get_pickle_protocol N/A N/A N/A N/A N/A 
    Allow configuration of the pickle protocol on a per-machine basis.

    This way, if you use multiple platforms with different versions of
    pickle, you can configure each of them to use the highest protocol
    supported by all of the machines that you want to be able to
    communicate.
     N/A N/A N/A protocol_str N/A N/A os environ N/A PYLEARN2_PICKLE_PROTOCOL N/A N/A N/A KeyError N/A N/A protocol_str 0 N/A N/A protocol_str pickle.HIGHEST_PROTOCOL N/A N/A N/A pickle HIGHEST_PROTOCOL N/A N/A int protocol_str N/A _save N/A N/A filepath obj N/A N/A N/A 
    .. todo::

        WRITEME
     N/A N/A N/A joblib N/A joblib_available True N/A N/A N/A ImportError N/A N/A joblib_available False N/A N/A N/A filepath endswith .npy N/A N/A N/A N/A np save filepath obj N/A N/A save_dir N/A N/A N/A os path dirname filepath N/A N/A save_dir N/A N/A save_dir . N/A N/A N/A N/A N/A os path exists save_dir N/A N/A N/A N/A os makedirs save_dir N/A N/A N/A N/A N/A os path exists save_dir N/A N/A N/A N/A os path isdir save_dir N/A N/A N/A IOError N/A save path %s exists, not a directory save_dir N/A N/A N/A N/A N/A os access save_dir N/A os W_OK N/A N/A N/A IOError N/A permission error creating %s filepath N/A N/A N/A N/A joblib_available N/A N/A filepath endswith .joblib N/A N/A N/A N/A joblib dump obj filepath N/A N/A N/A N/A filepath endswith .joblib N/A N/A N/A N/A warnings warn Warning: .joblib suffix specified but joblib unavailable. Using ordinary pickle. N/A N/A open filepath wb filehandle N/A N/A N/A N/A cPickle dump obj filehandle N/A get_pickle_protocol N/A N/A N/A Exception N/A e N/A N/A N/A N/A logger exception N/A N/A cPickle has failed to write an object to {0} format filepath N/A N/A N/A N/A N/A str e find maximum recursion depth exceeded -1 N/A N/A N/A N/A N/A N/A N/A logger info retrying with pickle N/A N/A open filepath wb f N/A N/A N/A N/A pickle dump obj f N/A N/A N/A Exception N/A e2 N/A N/A N/A N/A N/A str e N/A N/A str e2 N/A N/A N/A N/A logger exception N/A N/A neither cPickle nor pickle could write to {0} format filepath N/A N/A N/A logger exception moreover, neither of them raised an exception that can be converted to a string N/A N/A N/A logger exception now re-attempting to write with cPickle outside the try/catch loop so you can see if it prints anything when it dies N/A N/A open filepath wb f N/A N/A N/A N/A cPickle dump obj f N/A get_pickle_protocol N/A N/A N/A logger info Somehow or other, the file write worked once we quit using the try/catch. N/A N/A N/A N/A str e2 env N/A N/A N/A pdb N/A tb N/A N/A N/A pdb traceback format_exc N/A N/A reraise_as N/A IOError N/A N/A N/A N/A N/A N/A N/A N/A N/A str obj  could not be written to  N/A str filepath  by cPickle due to  N/A str e  nor by pickle due to  N/A str e2 . 
Traceback  tb N/A N/A N/A logger warning N/A N/A {0} was written by pickle instead of cPickle, due to {1} (perhaps your object is really big?) format filepath e N/A clone_via_serialize N/A N/A obj N/A N/A N/A 
    Makes a "deep copy" of an object by serializing it and then
    deserializing it.

    Parameters
    ----------
    obj : object
        The object to clone.

    Returns
    -------
    obj2 : object
        A copy of the object.
     N/A s N/A N/A cPickle dumps obj N/A get_pickle_protocol N/A N/A N/A cPickle loads s N/A to_string N/A N/A obj N/A N/A N/A 
    Serializes an object to a string.

    Parameters
    ----------
    obj : object
        The object to serialize.

    Returns
    -------
    string : str
        The object serialized as a string.
     N/A N/A N/A cPickle dumps obj N/A get_pickle_protocol N/A from_string N/A N/A s N/A N/A N/A 
    Deserializes an object from a string.

    Parameters
    ----------
    s : str
        The object serialized as a string.

    Returns
    -------
    obj : object
        The object.
     N/A N/A N/A cPickle loads s N/A mkdir N/A N/A filepath N/A N/A N/A 
    Make a directory.

    Should succeed even if it needs to make more than one
    directory and nest subdirectories to do so. Raises an error if the
    directory can't be made. Does not raise an error if the directory
    already exists.

    Parameters
    ----------
    filepath : WRITEME
     N/A N/A N/A N/A N/A os makedirs filepath N/A N/A N/A OSError N/A N/A N/A N/A N/A N/A os path isdir filepath N/A N/A N/A read_int N/A N/A fin n N/A 1 N/A N/A 
    Reads n ints from a file.

    Parameters
    ----------
    fin : file
        Readable file object
    n : int
        Number of ints to read

    Returns
    -------
    rval : int or list
        The integer or integers requested
     N/A N/A n 1 N/A N/A s N/A N/A fin read 4 N/A N/A N/A len s 4 N/A N/A N/A ValueError fin did not contain 4 bytes N/A N/A N/A N/A struct unpack i s N/A 0 N/A N/A rval N/A N/A i N/A xrange n N/A N/A N/A N/A rval append N/A read_int fin N/A rval N/A N/A lush_magic N/A 507333717 507333716 507333713 507333715 uint8 int32 float32 float64 read_bin_lush_matrix N/A N/A filepath N/A N/A N/A 
    Reads a binary matrix saved by the lush library.

    Parameters
    ----------
    filepath : str
        The path to the file.

    Returns
    -------
    matrix : ndarray
        A NumPy version of the stored matrix.
     N/A f N/A open filepath rb N/A N/A N/A magic N/A read_int f N/A N/A N/A ValueError N/A N/A N/A reraise_as Couldn't read magic number N/A ndim N/A read_int f N/A N/A ndim 0 N/A N/A shape N/A N/A N/A shape N/A read_int f N/A max 3 ndim N/A total_elems 1 N/A dim shape N/A N/A total_elems dim N/A N/A N/A dtype N/A lush_magic N/A magic N/A N/A N/A KeyError N/A N/A N/A reraise_as N/A ValueError N/A Unrecognized lush magic number  N/A str magic N/A rval N/A N/A np fromfile file f dtype dtype count total_elems N/A excess N/A N/A f read -1 N/A excess N/A N/A N/A ValueError N/A N/A str N/A len excess  extra bytes found at end of file. This indicates  mismatch between header and content N/A rval N/A N/A rval reshape shape N/A N/A N/A f close N/A rval N/A load_train_file N/A N/A config_file_path environ N/A None N/A N/A 
    Loads and parses a yaml file for a Train object.
    Publishes the relevant training environment variables

    Parameters
    ----------
    config_file_path : str
        Path to a config file containing a YAML string describing a
        pylearn2.train.Train object
    environ : dict, optional
        A dictionary used for ${FOO} substitutions in addition to
        environment variables when parsing the YAML file. If a key appears
        both in `os.environ` and this dictionary, the value in this
        dictionary is used.


    Returns
    -------
    Object described by the YAML string stored in the config file
     pylearn2.config yaml_parse N/A suffix_to_strip .yaml N/A N/A N/A config_file_path endswith suffix_to_strip N/A N/A config_file_full_stem N/A config_file_path N/A 0 N/A N/A len suffix_to_strip N/A N/A config_file_full_stem config_file_path N/A N/A N/A os environ N/A PYLEARN2_TRAIN_FILE_FULL_STEM config_file_full_stem N/A directory N/A N/A N/A config_file_path split / N/A -1 N/A directory N/A N/A / join directory N/A N/A directory N/A N/A directory / N/A N/A N/A os environ N/A PYLEARN2_TRAIN_DIR directory N/A N/A N/A os environ N/A PYLEARN2_TRAIN_BASE_NAME N/A N/A N/A config_file_path split / N/A -1 N/A N/A N/A os environ N/A PYLEARN2_TRAIN_FILE_STEM N/A N/A N/A config_file_full_stem split / N/A -1 N/A N/A N/A yaml_parse load_path config_file_path environ environ N/A _load N/A N/A filepath recurse_depth retry N/A 0 True N/A N/A 
    Recursively tries to load a file until success or maximum number of
    attempts.

    Parameters
    ----------
    filepath : str
        A path to a file to load. Should be a pickle, Matlab, or NumPy
        file; or a .txt or .amat file that numpy.loadtxt can load.
    recurse_depth : int, optional
        End users should not use this argument. It is used by the function
        itself to implement the `retry` option recursively.
    retry : bool, optional
        If True, will make a handful of attempts to load the file before
        giving up. This can be useful if you are for example calling
        show_weights.py on a file that is actively being written to by a
        training script--sometimes the load attempt might fail if the
        training script writes at the same time show_weights tries to
        read, but if you try again after a few seconds you should be able
        to open the file.

    Returns
    -------
    loaded_object : object
        The object that was stored in the file.
     N/A N/A N/A joblib N/A joblib_available True N/A N/A N/A ImportError N/A N/A joblib_available False N/A N/A recurse_depth 0 N/A N/A filepath N/A preprocess filepath N/A N/A N/A N/A filepath endswith .npy N/A N/A filepath endswith .npz N/A N/A N/A N/A np load filepath N/A N/A N/A N/A filepath endswith .amat N/A N/A filepath endswith txt N/A N/A N/A N/A N/A N/A np loadtxt filepath N/A N/A N/A Exception N/A N/A N/A reraise_as N/A N/A {0} cannot be loaded by serial.load (trying to use np.loadtxt) format filepath N/A N/A N/A filepath endswith .mat N/A N/A io N/A N/A io None N/A N/A scipy.io N/A io N/A scipy io N/A N/A N/A N/A N/A io loadmat filepath N/A N/A N/A NotImplementedError N/A nei N/A N/A N/A N/A N/A N/A str nei find HDF reader -1 N/A N/A hdf_reader N/A N/A hdf_reader None N/A N/A h5py N/A hdf_reader h5py N/A N/A N/A hdf_reader File filepath r N/A N/A N/A False N/A encoding N/A N/A six PY3 N/A encoding latin-1 N/A exponential_backoff N/A N/A N/A N/A N/A N/A recurse_depth 9 N/A N/A N/A N/A logger info N/A N/A Max number of tries exceeded while trying to open {0} format filepath N/A N/A N/A logger info attempting to open via reading string N/A N/A open filepath rb f N/A N/A content N/A N/A f read N/A N/A N/A cPickle loads content encoding N/A N/A nsec N/A 0.5 N/A 2.0 N/A float recurse_depth N/A N/A N/A logger info N/A N/A Waiting {0} seconds and trying again format nsec N/A N/A N/A time sleep nsec N/A N/A _load filepath N/A recurse_depth 1 retry N/A N/A N/A N/A N/A joblib_available N/A N/A N/A open filepath rb f N/A N/A obj N/A N/A cPickle load f encoding N/A N/A N/A N/A obj N/A N/A joblib load filepath N/A N/A N/A Exception N/A e N/A N/A N/A N/A N/A N/A os path exists filepath N/A N/A N/A N/A os path isdir filepath N/A N/A N/A N/A raise_cannot_open filepath N/A N/A N/A MemoryError N/A e N/A N/A N/A N/A N/A N/A N/A os path splitext filepath N/A 1 .pkl N/A N/A N/A improve_memory_error_message e N/A You do not have enough memory to open %s 
 + Try using numpy.{save,load} (file with extension '.npy') to save your file. It uses less memory when reading and writing files than pickled files. filepath N/A N/A N/A improve_memory_error_message e N/A You do not have enough memory to open %s filepath N/A N/A N/A BadPickleGet EOFError KeyError N/A e N/A N/A N/A retry N/A N/A N/A reraise_as N/A N/A e __class__ N/A N/A Failed to open {0} format filepath N/A obj N/A exponential_backoff N/A N/A ValueError N/A N/A N/A logger exception N/A N/A retry N/A N/A N/A reraise_as N/A ValueError N/A N/A Failed to open {0} format filepath N/A obj N/A exponential_backoff N/A N/A Exception N/A N/A N/A reraise_as N/A N/A Couldn't open {0} format filepath N/A N/A N/A hasattr obj yaml_src N/A N/A N/A N/A N/A obj yaml_src N/A N/A !pkl: " N/A N/A N/A os path abspath filepath " N/A N/A N/A Exception N/A N/A N/A obj N/A raise_cannot_open N/A N/A path N/A N/A N/A 
    Raise an exception saying we can't open `path`.

    Parameters
    ----------
    path : str
        The path we cannot open
     N/A pieces N/A N/A path split / N/A i N/A xrange 1 N/A N/A len pieces 1 N/A N/A so_far N/A N/A / join N/A pieces N/A 0 i N/A N/A N/A N/A N/A os path exists so_far N/A N/A N/A i 1 N/A N/A N/A so_far N/A N/A N/A N/A reraise_as N/A IOError N/A N/A N/A N/A Cannot open  path  ( so_far  does not exist) N/A parent N/A N/A / join N/A pieces N/A 0 N/A i 1 N/A bad N/A pieces N/A N/A i 1 N/A N/A N/A N/A N/A os path isdir parent N/A N/A N/A reraise_as N/A IOError N/A N/A N/A N/A Cannot open  path  because  parent  is not a directory. N/A candidates N/A N/A os listdir parent N/A N/A N/A len candidates 0 N/A N/A N/A reraise_as N/A IOError N/A N/A N/A N/A Cannot open  path  because  parent  is empty. N/A N/A N/A len candidates 100 N/A N/A N/A reraise_as N/A IOError N/A N/A N/A N/A Cannot open  path  but can open  parent . N/A N/A N/A N/A os path islink path N/A N/A N/A reraise_as N/A IOError N/A path  appears to be a symlink to a non-existent file N/A N/A reraise_as N/A IOError N/A N/A N/A N/A N/A N/A N/A N/A Cannot open  path  but can open  parent . Did you mean  N/A match bad candidates  instead of  bad ? N/A False N/A