-
Notifications
You must be signed in to change notification settings - Fork 38
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
Define formal primitives specification #42
Comments
I agree on using a json schema for this. Note that the primitive specification is mostly explained already in the MLBlocks documentation, even though it is not defined in a truly formal way. Regarding the validation function, I totally agree on creating it, but also on the MLBlocks side. |
Suppose someone were to make a pull request to MLPrimitives to add a new primitive. Would it make sense that MLPrimitives needs to rely on an external library to decide if the primitive is valid? I think it makes sense to define the specification for primitives in MLPrimitives. Certainly the existing documentation and validation works for our purposes so far but a jsonschema would formalize this and make our lives easier. |
(Correction: I meant the |
Yes, absolutely. It would make sense. Basically because MLPrimitives is a collection of primitives specifically crafted to be compliant with this third party library. So yes, without any doubt, the specification has to be in MLBlocks, and MLPrimitives has to follow it. Or, at most, if additional things that belong only to MLPrimitives exist, extend it to add them. |
@csala Bumping this. Has our thinking changed on the presence of a formal specification? I still suggest adding a json schema specification for ml primitives within the mlprimitives repo. Even the specification is sufficient; a validator is not strictly needed, though would be useful. |
@micahjsmith this is pending to be discussed in the future, after some other changes get in first. |
The JSON primitives files can be fairly large and complicated and susceptible to misspecification. Implement a formal specification for the JSON files using json schema
define the specification in JSON schema (I suggest using the
jsonschema
package from PyPI)implement a validator to validate a JSON primitive file:
The text was updated successfully, but these errors were encountered: