Commit 17ac75e5 authored by Sanjeev Namjoshi's avatar Sanjeev Namjoshi Committed by Mitar

Sn/data cleaning test2

parent 5d5e34ea
{"id": "c6820868-1680-4a69-a44c-2db467d80486", "schema": "https://metadata.datadrivendiscovery.org/schemas/v0/pipeline.json", "created": "2019-11-18T23:02:33.723162Z", "inputs": [{"name": "inputs"}], "outputs": [{"data": "steps.5.produce", "name": "output predictions"}], "steps": [{"type": "PRIMITIVE", "primitive": {"id": "4b42ce1e-9b98-4a25-b68e-fad13311eb65", "version": "0.3.0", "python_path": "d3m.primitives.data_transformation.dataset_to_dataframe.Common", "name": "Extract a DataFrame from a Dataset", "digest": "bddea02d001c6633722c14643ec2a065fb4a977354ddbdf74282d076da77e530"}, "arguments": {"inputs": {"type": "CONTAINER", "data": "inputs.0"}}, "outputs": [{"id": "produce"}]}, {"type": "PRIMITIVE", "primitive": {"id": "fc6bf33a-f3e0-3496-aa47-9a40289661bc", "version": "3.0.1", "python_path": "d3m.primitives.data_cleaning.data_cleaning.Datacleaning", "name": "Data cleaning", "digest": "1511f395382c93f717627a45e14597df23dea86db5b9846e35c5e1cfa5c73816"}, "arguments": {"inputs": {"type": "CONTAINER", "data": "steps.0.produce"}}, "outputs": [{"id": "produce"}]}, {"type": "PRIMITIVE", "primitive": {"id": "d510cb7a-1782-4f51-b44c-58f0236e47c7", "version": "0.5.0", "python_path": "d3m.primitives.data_transformation.column_parser.Common", "name": "Parses strings into their types", "digest": "c162d57bc73b6f30a0d600af31136b5028fe0efcd852efc15b9ad2826a2f391f"}, "arguments": {"inputs": {"type": "CONTAINER", "data": "steps.1.produce"}}, "outputs": [{"id": "produce"}]}, {"type": "PRIMITIVE", "primitive": {"id": "d016df89-de62-3c53-87ed-c06bb6a23cde", "version": "2019.6.7", "python_path": "d3m.primitives.data_cleaning.imputer.SKlearn", "name": "sklearn.impute.SimpleImputer", "digest": "adc79e644eec35eb9d616be755a5de83b27f66e42b04f6508a9ceb82d99cc739"}, "arguments": {"inputs": {"type": "CONTAINER", "data": "steps.2.produce"}}, "outputs": [{"id": "produce"}], "hyperparams": {"return_result": {"type": "VALUE", "data": "replace"}, "use_semantic_types": {"type": "VALUE", "data": true}}}, {"type": "PRIMITIVE", "primitive": {"id": "fe0841b7-6e70-4bc3-a56c-0670a95ebc6a", "version": "0.1.0", "python_path": "d3m.primitives.classification.xgboost_gbtree.Common", "name": "XGBoost GBTree classifier", "digest": "bd6ee736730320e83a7c773e6ce9657eea759acc5b316e75bdb5cbfd3aa5c904"}, "arguments": {"inputs": {"type": "CONTAINER", "data": "steps.3.produce"}, "outputs": {"type": "CONTAINER", "data": "steps.3.produce"}}, "outputs": [{"id": "produce"}], "hyperparams": {"add_index_columns": {"type": "VALUE", "data": true}}}, {"type": "PRIMITIVE", "primitive": {"id": "8d38b340-f83f-4877-baaa-162f8e551736", "version": "0.3.0", "python_path": "d3m.primitives.data_transformation.construct_predictions.Common", "name": "Construct pipeline predictions output", "digest": "5144bad4fea16168f6667c991e137067721dd0573c68ab1bf172ead9e2c82869"}, "arguments": {"inputs": {"type": "CONTAINER", "data": "steps.4.produce"}, "reference": {"type": "CONTAINER", "data": "steps.0.produce"}}, "outputs": [{"id": "produce"}]}], "digest": "f161eaa31a09103260ac7263627919791113c5f773344c1b5ab450702a6557cd"}
\ No newline at end of file
{
"id": "fc6bf33a-f3e0-3496-aa47-9a40289661bc",
"version": "3.0.2",
"name": "Data cleaning",
"keywords": [
"Clean data values in data frame"
],
"source": {
"name": "Distil",
"contact": "mailto:jeffrey.gleason@yonder.co",
"uris": [
"https://github.com/NewKnowledge/datacleaning-d3m-wrapper"
]
},
"installation": [
{
"type": "PIP",
"package_uri": "git+https://github.com/NewKnowledge/datacleaning-d3m-wrapper.git@8f576140c4430c319aef4de4f2924830ad6e8efb#egg=DatacleaningD3MWrapper"
}
],
"python_path": "d3m.primitives.data_cleaning.data_cleaning.Datacleaning",
"algorithm_types": [
"DATA_STRUCTURE_ALIGNMENT"
],
"primitive_family": "DATA_CLEANING",
"schema": "https://metadata.datadrivendiscovery.org/schemas/v0/primitive.json",
"original_python_path": "DatacleaningD3MWrapper.wrapper.datacleaning",
"primitive_code": {
"class_type_arguments": {
"Inputs": "d3m.container.pandas.DataFrame",
"Outputs": "d3m.container.pandas.DataFrame",
"Hyperparams": "DatacleaningD3MWrapper.wrapper.Hyperparams",
"Params": "NoneType"
},
"interfaces_version": "2019.11.10",
"interfaces": [
"transformer.TransformerPrimitiveBase",
"base.PrimitiveBase"
],
"hyperparams": {},
"arguments": {
"hyperparams": {
"type": "DatacleaningD3MWrapper.wrapper.Hyperparams",
"kind": "RUNTIME"
},
"random_seed": {
"type": "int",
"kind": "RUNTIME",
"default": 0
},
"timeout": {
"type": "typing.Union[NoneType, float]",
"kind": "RUNTIME",
"default": null
},
"iterations": {
"type": "typing.Union[NoneType, int]",
"kind": "RUNTIME",
"default": null
},
"produce_methods": {
"type": "typing.Sequence[str]",
"kind": "RUNTIME"
},
"inputs": {
"type": "d3m.container.pandas.DataFrame",
"kind": "PIPELINE"
},
"params": {
"type": "NoneType",
"kind": "RUNTIME"
}
},
"class_methods": {},
"instance_methods": {
"__init__": {
"kind": "OTHER",
"arguments": [
"hyperparams",
"random_seed"
],
"returns": "NoneType"
},
"fit": {
"kind": "OTHER",
"arguments": [
"timeout",
"iterations"
],
"returns": "d3m.primitive_interfaces.base.CallResult[NoneType]",
"description": "A noop.\n\nParameters\n----------\ntimeout : float\n A maximum time this primitive should be fitting during this method call, in seconds.\niterations : int\n How many of internal iterations should the primitive do.\n\nReturns\n-------\nCallResult[None]\n A ``CallResult`` with ``None`` value."
},
"fit_multi_produce": {
"kind": "OTHER",
"arguments": [
"produce_methods",
"inputs",
"timeout",
"iterations"
],
"returns": "d3m.primitive_interfaces.base.MultiCallResult",
"description": "A method calling ``fit`` and after that multiple produce methods at once.\n\nParameters\n----------\nproduce_methods : Sequence[str]\n A list of names of produce methods to call.\ninputs : Inputs\n The inputs given to all produce methods.\ntimeout : float\n A maximum time this primitive should take to both fit the primitive and produce outputs\n for all produce methods listed in ``produce_methods`` argument, in seconds.\niterations : int\n How many of internal iterations should the primitive do for both fitting and producing\n outputs of all produce methods.\n\nReturns\n-------\nMultiCallResult\n A dict of values for each produce method wrapped inside ``MultiCallResult``."
},
"get_params": {
"kind": "OTHER",
"arguments": [],
"returns": "NoneType",
"description": "A noop.\n\nReturns\n-------\nParams\n An instance of parameters."
},
"multi_produce": {
"kind": "OTHER",
"arguments": [
"produce_methods",
"inputs",
"timeout",
"iterations"
],
"returns": "d3m.primitive_interfaces.base.MultiCallResult",
"description": "A method calling multiple produce methods at once.\n\nWhen a primitive has multiple produce methods it is common that they might compute the\nsame internal results for same inputs but return different representations of those results.\nIf caller is interested in multiple of those representations, calling multiple produce\nmethods might lead to recomputing same internal results multiple times. To address this,\nthis method allows primitive author to implement an optimized version which computes\ninternal results only once for multiple calls of produce methods, but return those different\nrepresentations.\n\nIf any additional method arguments are added to primitive's produce method(s), they have\nto be added to this method as well. This method should accept an union of all arguments\naccepted by primitive's produce method(s) and then use them accordingly when computing\nresults.\n\nThe default implementation of this method just calls all produce methods listed in\n``produce_methods`` in order and is potentially inefficient.\n\nIf primitive should have been fitted before calling this method, but it has not been,\nprimitive should raise a ``PrimitiveNotFittedError`` exception.\n\nParameters\n----------\nproduce_methods : Sequence[str]\n A list of names of produce methods to call.\ninputs : Inputs\n The inputs given to all produce methods.\ntimeout : float\n A maximum time this primitive should take to produce outputs for all produce methods\n listed in ``produce_methods`` argument, in seconds.\niterations : int\n How many of internal iterations should the primitive do.\n\nReturns\n-------\nMultiCallResult\n A dict of values for each produce method wrapped inside ``MultiCallResult``."
},
"produce": {
"kind": "PRODUCE",
"arguments": [
"inputs",
"timeout",
"iterations"
],
"returns": "d3m.primitive_interfaces.base.CallResult[d3m.container.pandas.DataFrame]",
"singleton": false,
"inputs_across_samples": [],
"description": "Produce primitive's best choice of the output for each of the inputs.\n\nThe output value should be wrapped inside ``CallResult`` object before returning.\n\nIn many cases producing an output is a quick operation in comparison with ``fit``, but not\nall cases are like that. For example, a primitive can start a potentially long optimization\nprocess to compute outputs. ``timeout`` and ``iterations`` can serve as a way for a caller\nto guide the length of this process.\n\nIdeally, a primitive should adapt its call to try to produce the best outputs possible\ninside the time allocated. If this is not possible and the primitive reaches the timeout\nbefore producing outputs, it should raise a ``TimeoutError`` exception to signal that the\ncall was unsuccessful in the given time. The state of the primitive after the exception\nshould be as the method call has never happened and primitive should continue to operate\nnormally. The purpose of ``timeout`` is to give opportunity to a primitive to cleanly\nmanage its state instead of interrupting execution from outside. Maintaining stable internal\nstate should have precedence over respecting the ``timeout`` (caller can terminate the\nmisbehaving primitive from outside anyway). If a longer ``timeout`` would produce\ndifferent outputs, then ``CallResult``'s ``has_finished`` should be set to ``False``.\n\nSome primitives have internal iterations (for example, optimization iterations).\nFor those, caller can provide how many of primitive's internal iterations\nshould a primitive do before returning outputs. Primitives should make iterations as\nsmall as reasonable. If ``iterations`` is ``None``, then there is no limit on\nhow many iterations the primitive should do and primitive should choose the best amount\nof iterations on its own (potentially controlled through hyper-parameters).\nIf ``iterations`` is a number, a primitive has to do those number of iterations,\nif possible. ``timeout`` should still be respected and potentially less iterations\ncan be done because of that. Primitives with internal iterations should make\n``CallResult`` contain correct values.\n\nFor primitives which do not have internal iterations, any value of ``iterations``\nmeans that they should run fully, respecting only ``timeout``.\n\nIf primitive should have been fitted before calling this method, but it has not been,\nprimitive should raise a ``PrimitiveNotFittedError`` exception.\n\nParameters\n----------\ninputs : Input pandas frame\n\nReturns\n-------\nOutputs : A frame structurally identical to the input frame, with each feature\n cleaned according to its type (e.g. all date objects will be modified to be\n of a common structure)"
},
"set_params": {
"kind": "OTHER",
"arguments": [
"params"
],
"returns": "NoneType",
"description": "A noop.\n\nParameters\n----------\nparams : Params\n An instance of parameters."
},
"set_training_data": {
"kind": "OTHER",
"arguments": [],
"returns": "NoneType",
"description": "A noop.\n\nParameters\n----------"
}
},
"class_attributes": {
"logger": "logging.Logger",
"metadata": "d3m.metadata.base.PrimitiveMetadata"
},
"instance_attributes": {
"hyperparams": "d3m.metadata.hyperparams.Hyperparams",
"random_seed": "int",
"docker_containers": "typing.Dict[str, d3m.primitive_interfaces.base.DockerContainer]",
"volumes": "typing.Dict[str, str]",
"temporary_directory": "typing.Union[NoneType, str]"
}
},
"structural_type": "DatacleaningD3MWrapper.wrapper.datacleaning",
"description": "Perform basic cleaning operations on the data, including enforcing consistency of\ndata and properly handling missing values.\n\nAttributes\n----------\nmetadata : PrimitiveMetadata\n Primitive's metadata. Available as a class attribute.\nlogger : Logger\n Primitive's logger. Available as a class attribute.\nhyperparams : Hyperparams\n Hyperparams passed to the constructor.\nrandom_seed : int\n Random seed passed to the constructor.\ndocker_containers : Dict[str, DockerContainer]\n A dict mapping Docker image keys from primitive's metadata to (named) tuples containing\n container's address under which the container is accessible by the primitive, and a\n dict mapping exposed ports to ports on that address.\nvolumes : Dict[str, str]\n A dict mapping volume keys from primitive's metadata to file and directory paths\n where downloaded and extracted files are available to the primitive.\ntemporary_directory : str\n An absolute path to a temporary directory a primitive can use to store any files\n for the duration of the current pipeline run phase. Directory is automatically\n cleaned up after the current pipeline run phase finishes.",
"digest": "86f391bddc57bcab2d5af1728f442e7469298425a6678dc004312ed4a470f4d8"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment