Skip to content

Commit

Permalink
Prepare 0.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarolopez committed Jul 23, 2019
1 parent f6347e2 commit 3de0f4d
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
43 changes: 33 additions & 10 deletions doc/source/devel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,42 @@ Once loaded, the API exposes the following functions or methods:
single argument that will contain a list of urls to be analyzed as a
single prediction.
* ``train()``: Perform a training over a dataset.
* ``get_train_args()``: Retrieve the parameters needed for training. This method must return a dict of dicts. A possible
example is the following:
* ``get_train_args()``: Retrieve the parameters needed for training. This
method must return a dict of dicts. A possible example is the following:

.. code-block:: python
{ 'arg1' : {'default': '1', #value must be a string (use json.dumps to convert Python objects and json.loads to convert back)
'help': '', #can be an empty string
'required': False #bool (whether or not the user must fill the parameter, for example if there is no default)
},
'arg2' : {...
},
...
}
{
'arg1': {
'default': '1', # value must be a string (use json.dumps to convert Python objects)
'help': '', # can be an empty string
'required': False # boolean defining whether the value
# must be filled to accept the query
},
'arg2': {
...
},
...
}
* ``get_test_args()``: Retrieve the parameters needed for testing. This method
must return a dict of dicts. A possible example is the following:

.. code-block:: python
{
'arg1': {
'default': '1', # value must be a string (use json.dumps to convert Python objects)
'help': '', # can be an empty string
'required': False # boolean defining whether the value
# must be filled to accept the query
},
'arg2': {
...
},
...
}
If the API fails to lookup any of these methods it will not silently fail, but
return a 501 Not Implemented HTTP Error.
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/allow-passing-args-dbadafef832265e9.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
features:
- Allow to specify which arguments the underlying model accepts for the testing
calls. In this release users can implement a "get_test_args" function in the
module entry point, allowing to expose those arguments through the API.
fixes:
- https://jira.deep-hybrid-datacloud.eu/browse/DPD-489

0 comments on commit 3de0f4d

Please sign in to comment.