Turi Create
4.0
toolkit_class_specification.hpp
1
/* Copyright © 2017 Apple Inc. All rights reserved.
2
*
3
* Use of this source code is governed by a BSD-3-clause license that can
4
* be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
5
*/
6
#ifndef TURI_UNITY_LIB_TOOLKIT_CLASS_SPECIFICATION_HPP
7
#define TURI_UNITY_LIB_TOOLKIT_CLASS_SPECIFICATION_HPP
8
9
#include <string>
10
#include <core/data/flexible_type/flexible_type.hpp>
11
namespace
turi
{
12
class
model_base;
13
/**
14
* \ingroup unity
15
* Each model is specified by filling in \ref toolkit_model_specification struct.
16
* The contents of the struct describe user-facing documentation and default
17
* options, as well as a callback to actual toolkit execution.
18
*/
19
struct
toolkit_class_specification
{
20
/**
21
* A short name used to identify this toolkit. For instance,
22
* LDA, or PageRank.
23
*/
24
std::string
name
;
25
26
/**
27
* Model properties.
28
* The following keys are recognized.
29
* - "functions": A dictionary with key: function name, and value,
30
* a list of input parameters.
31
* - "get_properties": The list of all readable properties of the model
32
* - "set_properties": The list of all writable properties of the model
33
* - "file": The file which the toolkit was loaded from
34
* - "documentation": A documentation string
35
*/
36
std::map<std::string, flexible_type>
description
;
37
38
/**
39
* A callback function to call to construct a model
40
*/
41
model_base
* (*constructor)();
42
};
43
44
}
// namespace turi
45
#endif // TURI_UNITY_LIB_TOOLKIT_MODEL_SPECIFICATION_HPP
turi::toolkit_class_specification
Definition:
toolkit_class_specification.hpp:19
turi
SKD.
Definition:
capi_initialization.hpp:11
turi::model_base
Definition:
model_base.hpp:45
turi::toolkit_class_specification::description
std::map< std::string, flexible_type > description
Definition:
toolkit_class_specification.hpp:36
turi::toolkit_class_specification::name
std::string name
Definition:
toolkit_class_specification.hpp:24
model_server
lib
toolkit_class_specification.hpp
Generated by
1.8.13