Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

ID to class mapping should not be hardcoded in the service #87

Open
ravwojdyla opened this issue Apr 17, 2018 · 2 comments
Open

ID to class mapping should not be hardcoded in the service #87

ravwojdyla opened this issue Apr 17, 2018 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ravwojdyla
Copy link
Contributor

This should not be hardcoded here:
https://github.com/spotify/zoltar/blob/master/examples/apollo-service-example/src/main/java/com/spotify/zoltar/examples/apollo/IrisPrediction.java#L64-L67

Might come for feature spec or whatever makes sense.

@ravwojdyla ravwojdyla added bug Something isn't working help wanted Extra attention is needed labels Apr 17, 2018
@regadas
Copy link
Contributor

regadas commented Apr 17, 2018

@ravwojdyla yeah I guess we can move it to the config file for now?

@brianmartin
Copy link
Contributor

Here's the original reference:

private static Map<Integer, String> idToClass = ImmutableMap.of(
0, "Iris-setosa",
1, "Iris-versicolor",
2, "Iris-virginica");

That class mapping now lives here:

private static Map<Long, String> idToClass = ImmutableMap.of(
0L, "Iris-setosa",
1L, "Iris-versicolor",
2L, "Iris-virginica");

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants