ml4ai / askem-ta1-dockervm Goto Github PK
View Code? Open in Web Editor NEWDocker recipes demonstrating how to use our pipelines
Docker recipes demonstrating how to use our pipelines
@Free-Quarks , as a step towards simplifying and consolidating our examples (#39), can you work on migrating whatever MORAE examples in https://github.com/ml4ai/ASKEM-TA1-DockerVM you’re committing to maintaining to the end-to-end-rest
subdir and modify such that they use the docker-compose file included there?
There are a few notebooks we have with examples of using our endpoints. However I think they are probably outdated at this point. We should make sure they get updated before the program ends so they are still valid documentation. This issue is to remind us and track that work.
We should also make sure the README is up to date as well with respect to these endpoints.
Create a REST API using fastapi
to serve as the entry point that will orchestrate our annotation workflows and route requests to the appropriate web service (MIT or AZ)
This endpoint will receive one or more text files in its request's body and pass them along to the reading pipelines.
After both results are ready, it will run the canonical format unifier
Enrich the jupyter notebook associated with code2fn-rest
with an example illustrating how to process a zip archive of code.
In coordination with @vincentraymond-ua , add add code2FN notebooks to code2fn-rest
example.
In coordination with @Free-Quarks , enhance or supplement end-to-end-rest
example with AMR output.
We have a snippet we expect to work (to be added to code2amr.ipynb
), but MORAE doesn't yet support our typical gromet:
from IPython.display import display, HTML, Image
from pathlib import Path
import requests
import json
import os
pp = lambda x: print(json.dumps(x, indent=2))
SKEMA_PA_SERVICE = os.environ.get("SKEMA_PA_ADDRESS", "http://skema-py:8000")
SKEMA_RS_SERVICE = os.environ.get("SKEMA_RS_ADDRESS", "http://skema-rs:8080")
filename = "CHIME_SIR.py"
with open(Path("/data") / "skema" / "code" / filename, "r") as infile:
code = infile.read()
# display file contents
display(HTML(f"<code>{code}</code>"))
# API call and response
response = requests.post(f"{SKEMA_RS_SERVICE}/extract-comments", json={"language" : "Python", "code" : code})
r = requests.put(f"{BASE_URL}/models/PN", json=response.json())
r.json()
# NOTE: the put request cleans up after itself (from @Free-Quarks)
#requests.delete(f"{BASE_URL}/models/{MODEL_ID}").text
@enoriega , as a step towards simplifying and consolidating our examples (#39), can you work on migrating whatever text reading examples in https://github.com/ml4ai/ASKEM-TA1-DockerVM you’re committing to maintaining to the end-to-end-rest
subdir and modify such that they use the docker-compose file included there?
Now that we have demo notebooks, we should package them nice and tidy for the hackaton
<text>
The Code2FN service take code as input (in multiple different forms), runs the program analysis pipeline to parse the files into CAST and translate the CAST into a Function Network (FN) and returns Gromet Function Network Module Collection (GrometFNModuleCollection) JSON.
The service currently accepts Python and Fortran (family) source code. The language type is determined by the filename extensions:
.py
.f
, for
, f95
The service can accept the following four types of code forms:
</text>
Provide a jupyter notebook for the code2fn-rest
example illustrating how to call program analysis endpoints to generate function networks from code.
To reduce confusion, we move away from the subdir-based examples to a unified approach that uses a single docker-compose file.
Currently set to 20 GB by default, perhaps this is too much and too restrictive. Find if a lower amount works and set it default
Consulting with @adarshp , add an example notebook to code2fn-rest
subdir that demonstrates how to call the comment extraction service from lumai/askem-skema-rs
.
In coordination with @Free-Quarks , add AMR service for output to equations-rest
example.
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.