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

Feature_names is redundant when using jsonData in predict. Also meta is redundant in response, as meta can be combined in the jsonData. #665

Closed
chennupushkar opened this issue Jun 27, 2019 · 2 comments
Projects
Milestone

Comments

@chennupushkar
Copy link

When using jsonData, why does the predict signature still require features_names as an argument in the Predict function?

        """
        Return a prediction.

        Parameters
        ----------
        X : array-like
        feature_names : array of feature names (optional)
        """
        print("Predict called - will run identity function")
        return X```
. Also the response of the Predict function when using jsonData has meta:{} in it. When jsonData is suppose to be generic json why is predict function returning meta?
```curl -g http://localhost:5000/predict --data-urlencode 'json={"jsonData": {"ndarray": [[4.098, 2.128, 9.715, 2.977]]}}'
{"jsonData":{"my_predictions":[[3.9589564268624405e-18,4.098772877346702e-09,0.9999999959012271]]},"meta":{}}```
@ukclivecox
Copy link
Contributor

Meta data is for the whole request and is understood by the engine component that manages the requests. So makes sense to keep it as a core Seldon feature for meta irrespective of data payload.

I agree feature names could be made a keyword argument which defaults to None.

def predict(self, X: np.ndarray, names: Iterable[str], meta: Dict = None) -> Union[

@ukclivecox ukclivecox added this to the 1.0.x milestone Aug 23, 2019
@ukclivecox ukclivecox added this to To do in 1.0 via automation Aug 23, 2019
@ukclivecox
Copy link
Contributor

Closing. Please open if issue.

1.0 automation moved this from To do to Done Nov 7, 2019
agrski added a commit that referenced this issue Dec 2, 2022
* remove versions dropdown and align top bar with V1 docs

* Use consistent capitalisation of v2 in SCv2 name

* Update author to be company not individual

* Remove extraneous config

* Set nav title explicitly

* Set base URL for docs as per SCv1

* Update title header on landing page

Co-authored-by: Alex Rakowski <20504869+agrski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
1.0
  
Done
Development

No branches or pull requests

2 participants