ebonite.core.analyzer.dataset module

class ebonite.core.analyzer.dataset.DatasetHook[source]

Bases: ebonite.core.analyzer.base.Hook

Base hook type for DatasetAnalyzer. Analysis result is an instance of DatasetType

process(obj, **kwargs) → ebonite.core.objects.dataset_type.DatasetType[source]

Analyzes obj and returns result. Result type is determined by specific Hook class sub-hierarchy

Parameters:
  • obj – object to analyze
  • kwargs – additional information to be used for analysis
Returns:

analysis result

class ebonite.core.analyzer.dataset.PrimitivesHook[source]

Bases: ebonite.core.analyzer.dataset.DatasetHook

Hook for primitive data, for example when you model outputs just one int

can_process(obj)[source]

Must return True if obj can be processed by this hook

Parameters:obj – object to analyze
Returns:True or False
must_process(obj)[source]

Must return True if obj must be processed by this hook. “must” means you sure that no other hook should handle this object, for example this hook is for sklearn objects and obj is exactly that.

Parameters:obj – object to analyze
Returns:True or False
process(obj, **kwargs) → ebonite.core.objects.dataset_type.DatasetType[source]

Analyzes obj and returns result. Result type is determined by specific Hook class sub-hierarchy

Parameters:
  • obj – object to analyze
  • kwargs – additional information to be used for analysis
Returns:

analysis result

class ebonite.core.analyzer.dataset.OrderedCollectionHookDelegator[source]

Bases: ebonite.core.analyzer.dataset.DatasetHook

Hook for list/tuple data

can_process(obj) → bool[source]

Must return True if obj can be processed by this hook

Parameters:obj – object to analyze
Returns:True or False
must_process(obj) → bool[source]

Must return True if obj must be processed by this hook. “must” means you sure that no other hook should handle this object, for example this hook is for sklearn objects and obj is exactly that.

Parameters:obj – object to analyze
Returns:True or False
process(obj, **kwargs) → ebonite.core.objects.dataset_type.DatasetType[source]

Analyzes obj and returns result. Result type is determined by specific Hook class sub-hierarchy

Parameters:
  • obj – object to analyze
  • kwargs – additional information to be used for analysis
Returns:

analysis result

class ebonite.core.analyzer.dataset.DictHookDelegator[source]

Bases: ebonite.core.analyzer.dataset.DatasetHook

Hook for dict data

can_process(obj) → bool[source]

Must return True if obj can be processed by this hook

Parameters:obj – object to analyze
Returns:True or False
must_process(obj) → bool[source]

Must return True if obj must be processed by this hook. “must” means you sure that no other hook should handle this object, for example this hook is for sklearn objects and obj is exactly that.

Parameters:obj – object to analyze
Returns:True or False
process(obj, **kwargs) → ebonite.core.objects.dataset_type.DatasetType[source]

Analyzes obj and returns result. Result type is determined by specific Hook class sub-hierarchy

Parameters:
  • obj – object to analyze
  • kwargs – additional information to be used for analysis
Returns:

analysis result

class ebonite.core.analyzer.dataset.BytesDatasetHook[source]

Bases: ebonite.core.analyzer.dataset.DatasetHook

Hook for bytes objects

process(obj, **kwargs) → ebonite.core.objects.dataset_type.DatasetType[source]

Analyzes obj and returns result. Result type is determined by specific Hook class sub-hierarchy

Parameters:
  • obj – object to analyze
  • kwargs – additional information to be used for analysis
Returns:

analysis result

can_process(obj) → bool[source]

Must return True if obj can be processed by this hook

Parameters:obj – object to analyze
Returns:True or False
must_process(obj) → bool[source]

Must return True if obj must be processed by this hook. “must” means you sure that no other hook should handle this object, for example this hook is for sklearn objects and obj is exactly that.

Parameters:obj – object to analyze
Returns:True or False