quartic_sdk.model.tests
¶
Submodules¶
Package Contents¶
Classes¶
The base class which is used for creating all the required instances |
|
Mock logging handler to check for expected logs. |
|
Example Model used for testing spectral model |
|
Example Model used for testing spectral model |
|
Example Model used for testing spectral model |
-
class
quartic_sdk.model.tests.
Base
(body_json, api_helper)¶ The base class which is used for creating all the required instances of specific types
-
get
(self, name)¶ Return the value of the given name attribute :param name: (string) The attribute name to be returned :return: The returned attribute value
-
__str__
(self)¶ Return the stringifed version of the representation
-
__eq__
(self, other)¶ Override equals to check equality of all attributes :param other: The other object, to which we are comparing :return: (bool) Whether they are equal
-
-
class
quartic_sdk.model.tests.
MockLoggingHandler
(*args, **kwargs)¶ Bases:
logging.Handler
Mock logging handler to check for expected logs.
-
emit
(self, record)¶ Do whatever it takes to actually log the specified logging record.
This version is intended to be implemented by subclasses and so raises a NotImplementedError.
-
reset
(self)¶
-
-
class
quartic_sdk.model.tests.
SupportedSpectralModel
¶ Bases:
quartic_sdk.model.BaseSpectralModel
Example Model used for testing spectral model This is a valid spectral model that can be saved to the Quartic AI Platform
-
predict
(self, input_df: pandas.DataFrame) → pandas.Series¶ Abstract method for custom predict method :param input_df: Input Data frame for prediction :return: Returns pd
-
-
class
quartic_sdk.model.tests.
SpectralModelThatReturnsString
¶ Bases:
quartic_sdk.model.BaseSpectralModel
Example Model used for testing spectral model This is a invalid spectral model whose predict function returns data of type string
-
post_transform
(self, data)¶
-
predict
(self, input_df: pandas.DataFrame) → pandas.Series¶ Abstract method for custom predict method :param input_df: Input Data frame for prediction :return: Returns pd
-
-
class
quartic_sdk.model.tests.
SlowSpectralModel
¶ Bases:
quartic_sdk.model.BaseSpectralModel
Example Model used for testing spectral model This is a invalid spectral model whose predict function takes longer processing time than that is supported by the Quartic AI Platform
-
pre_transform
(self, df)¶ A simple transformation that sleeps for x secs before returning same
-
predict
(self, input_df: pandas.DataFrame) → pandas.Series¶ sample prediction
-