Projection classes.
A Projection is a connection between two Sheets, generally implemented as a large set of ConnectionFields.
Any new Projection classes added to this directory will automatically become available for any model.
Bases: topo.base.projection.Projection
A projection that has at most one input connection for each unit.
This projection has exactly one weight for each destination unit. The input locations on the input sheet are determined by a coordinate mapper. Inputs that map outside the bounds of the input sheet are treated as having zero weight.
param Number learning_rate (allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
param Number strength (allow_None=False, bounds=None, constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
param Number precedence (allow_None=False, bounds=None, constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Sub-classes can implement this function if they wish to perform an operation after learning has completed, such as normalizing weight values across different projections.
The active_units_mask argument determines whether or not to apply the output_fn to non-responding units.
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
Temporarily override plasticity of medium and long term internal state.
This function should be implemented by all subclasses so that it preserves the ability of the Projection to compute activity, i.e. to operate over a short time scale, while preventing any lasting changes to the state.
For instance, if new_plasticity_state is False, in a Projection with modifiable connection weights, the values of those weights should temporarily be made fixed and unchanging after this call. For a Projection with automatic normalization, homeostatic plasticity, or other features that depend on a history of events (rather than just the current item being processed), changes in those properties would be disabled temporarily. Setting the plasticity state to False is useful during analysis operations (e.g. map measurement) that would otherwise change the state of the underlying network.
Any process that does not have any lasting state, such as those affecting only the current activity level, should not be affected by this call.
By default, this call simply calls override_plasticity_state() on the Projection’s output_fn, and sets the ‘plastic’ parameter to False.
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
Print the default values of all cls’s Parameters.
Print the values of all this object’s Parameters.
Returns the activity in a single projection
Remove this connection from its src’s list of out_connections and its dest’s list of in_connections.
Restore previous plasticity state of medium and long term internal state after a override_plasticity_state call.
This function should be implemented by all subclasses to remove the effect of the most recent override_plasticity_state call, e.g. to reenable plasticity of any type that was disabled.
Generate a runnable command for creating this connection.
Set the default value of param_name.
Equivalent to setting param_name on the class.
Pop the most recently pushed activity state of the stack.
Push the current activity state onto the stack.
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
Bases: topo.base.simulation.EPConnection
A projection from a Sheet into a ProjectionSheet.
Projections are required to support the activate() method, which will construct a matrix the same size as the target ProjectionSheet, from an input matrix of activity from the source Sheet. Other than that, a Projection may be of any type.
param Number strength (allow_None=False, bounds=None, constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
param Number precedence (allow_None=False, bounds=None, constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Compute an activity matrix for output, based on the specified input_activity.
Subclasses must override this method to whatever it means to calculate activity in that subclass.
Sub-classes can implement this function if they wish to perform an operation after learning has completed, such as normalizing weight values across different projections.
The active_units_mask argument determines whether or not to apply the output_fn to non-responding units.
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
This function has to be re-implemented by sub-classes, if they wish to support learning.
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
Estimate the memory bytes taken by this Projection.
By default, counts only the activity array, but subclasses should implement this method to include also the bytes taken by weight arrays and any similar arrays, as a rough lower bound from which memory requirements and memory usage patterns can be estimated.
Return the size of this projection, in number of connections.
Must be implemented by subclasses, if only to declare that no connections are stored.
Temporarily override plasticity of medium and long term internal state.
This function should be implemented by all subclasses so that it preserves the ability of the Projection to compute activity, i.e. to operate over a short time scale, while preventing any lasting changes to the state.
For instance, if new_plasticity_state is False, in a Projection with modifiable connection weights, the values of those weights should temporarily be made fixed and unchanging after this call. For a Projection with automatic normalization, homeostatic plasticity, or other features that depend on a history of events (rather than just the current item being processed), changes in those properties would be disabled temporarily. Setting the plasticity state to False is useful during analysis operations (e.g. map measurement) that would otherwise change the state of the underlying network.
Any process that does not have any lasting state, such as those affecting only the current activity level, should not be affected by this call.
By default, this call simply calls override_plasticity_state() on the Projection’s output_fn, and sets the ‘plastic’ parameter to False.
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
Print the default values of all cls’s Parameters.
Print the values of all this object’s Parameters.
Returns the activity in a single projection
Remove this connection from its src’s list of out_connections and its dest’s list of in_connections.
Restore previous plasticity state of medium and long term internal state after a override_plasticity_state call.
This function should be implemented by all subclasses to remove the effect of the most recent override_plasticity_state call, e.g. to reenable plasticity of any type that was disabled.
Generate a runnable command for creating this connection.
Set the default value of param_name.
Equivalent to setting param_name on the class.
Pop the most recently pushed activity state of the stack.
Push the current activity state onto the stack.
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
Bases: topo.base.cf.CFProjection
A Projection with a single set of weights, shared by all units.
Otherwise similar to CFProjection, except that learning is currently disabled.
param Number precedence (allow_None=False, bounds=None, constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Activate using the specified response_fn and output_fn.
Because of how output functions are applied, it is not currently possible to use learning functions and learning output functions for SharedWeightCFProjections, so we disable them here.
Return the specified ConnectionField
Return the bounds of the specified ConnectionField.
alias of ConnectionField
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
Because of how output functions are applied, it is not currently possible to use learning functions and learning output functions for SharedWeightCFProjections, so we disable them here.
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
Temporarily override plasticity of medium and long term internal state.
This function should be implemented by all subclasses so that it preserves the ability of the Projection to compute activity, i.e. to operate over a short time scale, while preventing any lasting changes to the state.
For instance, if new_plasticity_state is False, in a Projection with modifiable connection weights, the values of those weights should temporarily be made fixed and unchanging after this call. For a Projection with automatic normalization, homeostatic plasticity, or other features that depend on a history of events (rather than just the current item being processed), changes in those properties would be disabled temporarily. Setting the plasticity state to False is useful during analysis operations (e.g. map measurement) that would otherwise change the state of the underlying network.
Any process that does not have any lasting state, such as those affecting only the current activity level, should not be affected by this call.
By default, this call simply calls override_plasticity_state() on the Projection’s output_fn, and sets the ‘plastic’ parameter to False.
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
Print the default values of all cls’s Parameters.
Print the values of all this object’s Parameters.
Returns the activity in a single projection
Remove this connection from its src’s list of out_connections and its dest’s list of in_connections.
Restore previous plasticity state of medium and long term internal state after a override_plasticity_state call.
This function should be implemented by all subclasses to remove the effect of the most recent override_plasticity_state call, e.g. to reenable plasticity of any type that was disabled.
Generate a runnable command for creating this connection.
Set the default value of param_name.
Equivalent to setting param_name on the class.
Pop the most recently pushed activity state of the stack.
Push the current activity state onto the stack.
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
Return a single connection field Image, for the unit located nearest to sheet coordinate (sheet_x,sheet_y).
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
Bases: topo.base.cf.ResizableCFProjection
A projection that has a decay_rate parameter so that incoming input is decayed over time as x(t) = input + x(t-1)*exp(-decay_rate), and then the weighted sum of x(t) is calculated.
param Number precedence (allow_None=False, bounds=None, constant=False, default=0.4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Retain input_activity from the previous step in leaky_input_buffer and add a leaked version of it to the current input_activity. This function needs to deal with a finer time-scale.
Apply the weights_output_fns to each unit.
If active_units_mask is True, inactive units will be skipped.
Return the specified ConnectionField
Return the bounds of the specified ConnectionField.
alias of ConnectionField
Change the bounding box for all of the ConnectionFields in this Projection.
Calls change_bounds() on each ConnectionField.
Currently only allows reducing the size, but should be extended to allow increasing as well.
Rescales the weight matrix in place, interpolating or resampling as needed.
Not yet implemented.
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
For a CFProjection, learn consists of calling the learning_fn.
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
Temporarily override plasticity of medium and long term internal state.
This function should be implemented by all subclasses so that it preserves the ability of the Projection to compute activity, i.e. to operate over a short time scale, while preventing any lasting changes to the state.
For instance, if new_plasticity_state is False, in a Projection with modifiable connection weights, the values of those weights should temporarily be made fixed and unchanging after this call. For a Projection with automatic normalization, homeostatic plasticity, or other features that depend on a history of events (rather than just the current item being processed), changes in those properties would be disabled temporarily. Setting the plasticity state to False is useful during analysis operations (e.g. map measurement) that would otherwise change the state of the underlying network.
Any process that does not have any lasting state, such as those affecting only the current activity level, should not be affected by this call.
By default, this call simply calls override_plasticity_state() on the Projection’s output_fn, and sets the ‘plastic’ parameter to False.
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
Print the default values of all cls’s Parameters.
Print the values of all this object’s Parameters.
Returns the activity in a single projection
Remove this connection from its src’s list of out_connections and its dest’s list of in_connections.
Restore previous plasticity state of medium and long term internal state after a override_plasticity_state call.
This function should be implemented by all subclasses to remove the effect of the most recent override_plasticity_state call, e.g. to reenable plasticity of any type that was disabled.
Generate a runnable command for creating this connection.
Set the default value of param_name.
Equivalent to setting param_name on the class.
Pop the most recently pushed activity state of the stack.
Push the current activity state onto the stack.
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
Return a single connection field Image, for the unit located nearest to sheet coordinate (sheet_x,sheet_y).
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
Bases: topo.base.cf.CFProjection
Allows scaling of activity based on a specified target average activity.
An exponentially weighted average is used to calculate the average activity. This average is then used to calculate scaling factors for the current activity and for the learning rate.
The plastic parameter can be used to turn off updating of the average activity, e.g. during map measurement.
param Number precedence (allow_None=False, bounds=None, constant=False, default=0.4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Apply the weights_output_fns to each unit.
If active_units_mask is True, inactive units will be skipped.
Calculate current scaling factors based on the target and previous average activities.
Keeps track of the scaled average for debugging. Could be overridden by a subclass to calculate the factors differently.
Return the specified ConnectionField
Return the bounds of the specified ConnectionField.
alias of ConnectionField
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
For a CFProjection, learn consists of calling the learning_fn.
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
Temporarily override plasticity of medium and long term internal state.
This function should be implemented by all subclasses so that it preserves the ability of the Projection to compute activity, i.e. to operate over a short time scale, while preventing any lasting changes to the state.
For instance, if new_plasticity_state is False, in a Projection with modifiable connection weights, the values of those weights should temporarily be made fixed and unchanging after this call. For a Projection with automatic normalization, homeostatic plasticity, or other features that depend on a history of events (rather than just the current item being processed), changes in those properties would be disabled temporarily. Setting the plasticity state to False is useful during analysis operations (e.g. map measurement) that would otherwise change the state of the underlying network.
Any process that does not have any lasting state, such as those affecting only the current activity level, should not be affected by this call.
By default, this call simply calls override_plasticity_state() on the Projection’s output_fn, and sets the ‘plastic’ parameter to False.
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
Print the default values of all cls’s Parameters.
Print the values of all this object’s Parameters.
Returns the activity in a single projection
Remove this connection from its src’s list of out_connections and its dest’s list of in_connections.
Restore previous plasticity state of medium and long term internal state after a override_plasticity_state call.
This function should be implemented by all subclasses to remove the effect of the most recent override_plasticity_state call, e.g. to reenable plasticity of any type that was disabled.
Generate a runnable command for creating this connection.
Set the default value of param_name.
Equivalent to setting param_name on the class.
Pop the most recently pushed activity state of the stack.
Push the current activity state onto the stack.
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
Return a single connection field Image, for the unit located nearest to sheet coordinate (sheet_x,sheet_y).
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
Bases: topo.base.cf.CFProjection
A CFProjection with resizable weights.
param Number precedence (allow_None=False, bounds=None, constant=False, default=0.8, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Activate using the specified response_fn and output_fn.
Apply the weights_output_fns to each unit.
If active_units_mask is True, inactive units will be skipped.
Return the specified ConnectionField
Return the bounds of the specified ConnectionField.
alias of ConnectionField
Change the bounding box for all of the ConnectionFields in this Projection.
Calls change_bounds() on each ConnectionField.
Currently only allows reducing the size, but should be extended to allow increasing as well.
Rescales the weight matrix in place, interpolating or resampling as needed.
Not yet implemented.
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
For a CFProjection, learn consists of calling the learning_fn.
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
Temporarily override plasticity of medium and long term internal state.
This function should be implemented by all subclasses so that it preserves the ability of the Projection to compute activity, i.e. to operate over a short time scale, while preventing any lasting changes to the state.
For instance, if new_plasticity_state is False, in a Projection with modifiable connection weights, the values of those weights should temporarily be made fixed and unchanging after this call. For a Projection with automatic normalization, homeostatic plasticity, or other features that depend on a history of events (rather than just the current item being processed), changes in those properties would be disabled temporarily. Setting the plasticity state to False is useful during analysis operations (e.g. map measurement) that would otherwise change the state of the underlying network.
Any process that does not have any lasting state, such as those affecting only the current activity level, should not be affected by this call.
By default, this call simply calls override_plasticity_state() on the Projection’s output_fn, and sets the ‘plastic’ parameter to False.
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
Print the default values of all cls’s Parameters.
Print the values of all this object’s Parameters.
Returns the activity in a single projection
Remove this connection from its src’s list of out_connections and its dest’s list of in_connections.
Restore previous plasticity state of medium and long term internal state after a override_plasticity_state call.
This function should be implemented by all subclasses to remove the effect of the most recent override_plasticity_state call, e.g. to reenable plasticity of any type that was disabled.
Generate a runnable command for creating this connection.
Set the default value of param_name.
Equivalent to setting param_name on the class.
Pop the most recently pushed activity state of the stack.
Push the current activity state onto the stack.
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
Return a single connection field Image, for the unit located nearest to sheet coordinate (sheet_x,sheet_y).
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
Bases: topo.base.projection.Projection
A projection composed of ConnectionFields from a Sheet into a ProjectionSheet.
CFProjection computes its activity using a response_fn of type CFPResponseFn (typically a CF-aware version of mdot) and output_fns (typically none). The initial contents of the ConnectionFields mapping from the input Sheet into the target ProjectionSheet are controlled by the weights_generator, cf_shape, and weights_output_fn parameters, while the location of the ConnectionField is controlled by the coord_mapper parameter.
Any subclass has to implement the interface activate(self,input_activity) that computes the response from the input and stores it in the activity array.
param Number precedence (allow_None=False, bounds=None, constant=False, default=0.8, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Activate using the specified response_fn and output_fn.
Apply the weights_output_fns to each unit.
If active_units_mask is True, inactive units will be skipped.
Return the specified ConnectionField
Return the bounds of the specified ConnectionField.
alias of ConnectionField
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
For a CFProjection, learn consists of calling the learning_fn.
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
Temporarily override plasticity of medium and long term internal state.
This function should be implemented by all subclasses so that it preserves the ability of the Projection to compute activity, i.e. to operate over a short time scale, while preventing any lasting changes to the state.
For instance, if new_plasticity_state is False, in a Projection with modifiable connection weights, the values of those weights should temporarily be made fixed and unchanging after this call. For a Projection with automatic normalization, homeostatic plasticity, or other features that depend on a history of events (rather than just the current item being processed), changes in those properties would be disabled temporarily. Setting the plasticity state to False is useful during analysis operations (e.g. map measurement) that would otherwise change the state of the underlying network.
Any process that does not have any lasting state, such as those affecting only the current activity level, should not be affected by this call.
By default, this call simply calls override_plasticity_state() on the Projection’s output_fn, and sets the ‘plastic’ parameter to False.
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
Print the default values of all cls’s Parameters.
Print the values of all this object’s Parameters.
Returns the activity in a single projection
Remove this connection from its src’s list of out_connections and its dest’s list of in_connections.
Restore previous plasticity state of medium and long term internal state after a override_plasticity_state call.
This function should be implemented by all subclasses to remove the effect of the most recent override_plasticity_state call, e.g. to reenable plasticity of any type that was disabled.
Generate a runnable command for creating this connection.
Set the default value of param_name.
Equivalent to setting param_name on the class.
Pop the most recently pushed activity state of the stack.
Push the current activity state onto the stack.
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
Return a single connection field Image, for the unit located nearest to sheet coordinate (sheet_x,sheet_y).
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
Bases: topo.base.cf.CFPOutputFn
CFPOutputFn for use with SharedWeightCFProjections.
Applies the single_cf_fn to the single shared CF’s weights.
param ClassSelector single_cf_fn (allow_None=False, constant=False, default=<IdentityTF IdentityTF01502>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
Print the default values of all cls’s Parameters.
Print the values of all this object’s Parameters.
Variant of __repr__ designed for generating a runnable script.
Set the default value of param_name.
Equivalent to setting param_name on the class.
Restore the most recently saved state.
See state_push() for more details.
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.