What are the runtimes available for python?


#1

I know javascript has ‘server’, ‘client’ and ‘all’. Does python have the same too?


#2

To answer this question for any tag you can run the command: MetadataStore.tag().runtimes().
You can specify new runtimes by adding a ‘runtimes’ field to your package.json, for the format, see the runtimes field of the MetadataPackage type.


#3

Right now python actions only run in server.

Runtimes can be defined inside package.json and annotated on type method declaration like:

@py(env=‘deeplearning’)
predict: function(dataset: Dataset): Dataset


#4

MetadataStore.tag().runtimes() doesn’t seem to return the “js” runtimes. Are “js-server” etc. always available?


#5

js runtimes are magic and predate the user defined runtimes (by like 6 years). Currently it is a known “bug” that the js runtimes are not returned by the api provided above. Yes, they are always available.


#6

The following also works
c3Grid(CondaActionRuntime.requirementsFilesForLanguage("Python"))


#7

Just wanted to clarify that if you type c3ShowFunc(CondaActionRuntime, "requirementsFilesForLanguage"), you’ll see in the documentation that c3Grid(CondaActionRuntime.requirementsFilesForLanguage("Python")) only works for Python and R right now.