Skip to content

Is there an easy way to know what input/output types a zoo model supports? #3274

Answered by frankfliu
tadayosi asked this question in Q&A
Discussion options

You must be logged in to vote

@tadayosi

Here is an example:

        Map<Application, List<Artifact>> models = ModelZoo.listModels();
        models.forEach(
                (app, list) -> {
                    String appName = app.toString();
                    list.forEach(artifact ->  {
                        logger.info("{} {}", appName, artifact);
                        Map<String, ?> arguments = artifact.getArguments();
                        String factoryName = ArgumentsUtil.stringValue(arguments, "translatorFactory");
                        ClassLoader cl = ClassLoaderUtils.getContextClassLoader();
                        TranslatorFactory factory = ClassLoaderUtils.initClass(cl, TranslatorFactory.class, …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@tadayosi
Comment options

@frankfliu
Comment options

@tadayosi
Comment options

Answer selected by tadayosi
Comment options

You must be logged in to vote
2 replies
@frankfliu
Comment options

@tadayosi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants