Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapper for autoai_libs.nsfa transformer added #1329

Closed
wants to merge 1 commit into from
Closed

Wrapper for autoai_libs.nsfa transformer added #1329

wants to merge 1 commit into from

Conversation

Rafalll-Maciasz
Copy link
Contributor

Changes:

  • schema and wrapper for new autoai_libs transformer NSFA

Copy link
Member

@shinnar shinnar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks nice. I made a few suggestions for improvement.

Also, just to confirm: the input to fit and the input/output of transform can be arrays of arrays of anything? If, for example, the output is always an array of array of numbers, that should be specified (in the output_transform_schema in that case).

Comment on lines +21 to +33
class _NSFAImpl:
def __init__(self, **hyperparams):
self._wrapped_model = autoai_libs.cognito.transforms.transform_utils.NSFA(
**hyperparams
)

def fit(self, X, **fit_params):
self._wrapped_model.fit(X, **fit_params)
return self

def transform(self, X):
result = self._wrapped_model.transform(X)
return result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not look like this impl class is needed.
Instead, simply pass autoai_libs.cognito.transforms.transform_utils.NSF to the lale.operators.make_operator call on line 125

Comment on lines +50 to +51
{"type": "array", "items": {"type": "number", "minimum": 0.0}},
{"type": "array", "items": {"type": "integer", "minimum": 0}},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe these are redundant. In JSON schema, integers are numbers. I would suggest removing the second line. If intent is to document that a common pattern is to provide specifically an array of integers, then it is reasonable to leave, although you may want a nested description string explaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants