55from .constraints import Constraint
66from .callbacks import Callback
77from .instructions import Instruction
8- from .exceptions import *
8+ from .exceptions import InsufficientSpecificationError
99
1010
1111class Function :
1212 # A model is a function that is defined by its input and output domain/ranges, and its behaviour. These
1313 # aspects of a model are not 'mutable' in the sense that changing these means creating a new model, as
1414 # two models with a different description are not the same model.
15- def __init__ (
16- self ,
17- behaviour : str ,
18- output_schema : dict ,
19- input_schema : dict ,
20- constraints : List [Constraint ] = None
21- ):
15+ def __init__ (self , behaviour : str , output_schema : dict , input_schema : dict , constraints : List [Constraint ] = None ):
2216 self .behaviour = behaviour
2317 self .output_schema = output_schema
2418 self .input_schema = input_schema
@@ -32,11 +26,11 @@ def __init__(
3226 # Note: we do not consider the dataset to be a property of the model itself
3327 # Note: there would also be an async version of this method
3428 def build (
35- self ,
36- dataset : Union [str , Generator ] = None ,
37- instructions : List [Instruction ] = None , # these are "hints" that can be followed during training
38- callbacks : List [Callback ] = None , # these are functions that are called during training
39- isolation : Literal [' local' , ' subprocess' , ' docker' ] = ' local' # this controls the sandboxing of training
29+ self ,
30+ dataset : Union [str , Generator ] = None ,
31+ instructions : List [Instruction ] = None , # these are "hints" that can be followed during training
32+ callbacks : List [Callback ] = None , # these are functions that are called during training
33+ isolation : Literal [" local" , " subprocess" , " docker" ] = " local" , # this controls the sandboxing of training
4034 ) -> None :
4135 pass
4236
@@ -55,4 +49,4 @@ def describe(self) -> str:
5549
5650 # Returns a list of "instruction" objects that could be followed to further improve the model
5751 def suggest (self ) -> List [Instruction ]:
58- pass
52+ pass
0 commit comments