...
Code Block | ||
---|---|---|
| ||
# define data to store ml_datasets = [ { "name": "ml-algorithms", "responsible": "John Doe", "type": "algorithm", "description": "no comment!" } ] ml_result = { 'time_endstart': '2016-01-22T17:27:59.001Z', 'lat_hg': 12, 'long_hg': 4.2, 'algorithm_name': 'LassoCV', 'algorithm_parameters': { 'store': 'what you want', 'also here': [1, 2, 3, 4] } } |
...
Code Block | ||
---|---|---|
| ||
# add provenancedataset print('creating provenancedataset...') requests.post("http://localhost:8002/dataset/bulk", json=ml_datasets) # add region print('storing data...') requests.post("http://localhost:8002/region/%s" % ml_datasets[0]['name'], json=post_data) |
...