ml4ai / automates-v2 Goto Github PK
View Code? Open in Web Editor NEWAutoMATES: Automated Model Assembly from Text, Equations and Software
AutoMATES: Automated Model Assembly from Text, Equations and Software
In creating a (de)serializer for Scala (in https://github.com/kwalcock/skema), I noticed these issues, which are probably known, but here are some notes just in case:
It looks like
metadata_collection:
description: |
Table (array) of lists (arrays) of metadata,
where each list in the Table-array represents the collection
of metadata associated with a GroMEt object.
type: array # The Table of metadata_collection(s) (lists)
items:
type: array # Collection (list) of metadata associated with a particular GroMEt object.
items:
$ref: "#/components/schemas/Metadata"
means that anything that includes an
allOf:
- $ref: '#/components/schemas/Metadata'
is allowed. In order for code generation to work, some things need to be added, including a discriminator and probably oneOf. See also https://swagger.io/docs/specification/data-models/oneof-anyof-allof-not/.
This isn't exactly the right place to record this, but the file dict1--Gromet-FN-auto.json includes in its metadata_collection several times a "source_code_reference" that is wrapped in an array. The computer is telling me that's not right. It's one too many arrays down.
Java/Scala code generation doesn't work from files like gromet_FN_v0.1.4.yaml
and gromet_metadata_v0.1.4.yaml
for lack of a discriminator in superclasses. For example,
GrometObject:
description: Generic base class for any GroMEt object
type: object
properties:
metadata:
description: Index (integer) into the metadata_collection table in GrometFNModule.
type: integer
# Lines like the ones below need to be added
gromet_object_type: # added
type: string #
discriminator: # added
propertyName: gromet_object_type
When subclass objects are written out, a field should then appear as such:
{
"gromet_object_type": "GrometFNModule",
"schema": "FN",
"schema_version": "0.1.4",
This allows the generated Java/Scala code to figure out how to deserialize the object.
I don't (yet) know how the Python code is working without this, but will probably notice soon. I am hand editing the files like cond1--Gromet-FN-auto.json
to add this information to make sure the updates to the yaml file that I'm about to suggest work.
Perhaps this issue has been encountered before, so I'm filing this slightly prematurely in case there's more I should know before continuing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.