Skip to content

Commit

Permalink
Test Iris R model with dataset coming from Python
Browse files Browse the repository at this point in the history
  • Loading branch information
dnouri committed Oct 25, 2018
1 parent c2e863d commit 444d9f0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/R/config-iris-dataset-from-python.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use this file in conjunction with config-iris.py by setting:
#
# export PALLADIUM_CONFIG=config-iris.py,config-iris-dataset-from-python.py

{
'dataset_loader_train': {
'__factory__': 'palladium.dataset.Table',
'path': 'iris.data',
'names': [
'sepal length',
'sepal width',
'petal length',
'petal width',
'species',
],
'target_column': 'species',
'sep': ',',
'nrows': 100,
},

'dataset_loader_test': {
'__copy__': 'dataset_loader_train',
'skiprows': 100,
'nrows': None,
},
}
4 changes: 4 additions & 0 deletions examples/R/test_R_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
'config-iris.py': '/predict?'
'sepal length=1.0&sepal width=1.1&petal length=0.777&petal width=5',

'config-iris.py,config-iris-dataset-from-python.py': '/predict?'
'sepal length=1.0&sepal width=1.1&petal length=0.777&petal width=5',

'config-tooth.py': '/predict?'
'supp=OJ&dose=0.5',
}
Expand All @@ -23,6 +26,7 @@
@pytest.mark.parametrize(
'config_filename', [
'config-iris.py',
'config-iris.py,config-iris-dataset-from-python.py',
'config-tooth.py',
],
)
Expand Down

0 comments on commit 444d9f0

Please sign in to comment.