Title: not JSON serializable error when running flow on a task · Issue #477 · openml/openml-python · GitHub
Open Graph Title: not JSON serializable error when running flow on a task · Issue #477 · openml/openml-python
X Title: not JSON serializable error when running flow on a task · Issue #477 · openml/openml-python
Description: Description I encounter the following error when running a flow (for example 7103) on a task (for example 146607).
Open Graph Description: Description I encounter the following error when running a flow (for example 7103) on a task (for example 146607).
X Description: Description I encounter the following error when running a flow (for example 7103) on a task (for example 146607). <openml.flows.flow.OpenMLFlow object at 0x11cc43110> is not JSON serializabl...
Opengraph URL: https://github.com/openml/openml-python/issues/477
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"not JSON serializable error when running flow on a task","articleBody":"#### Description\r\nI encounter the following error when running a flow (for example 7103) on a task (for example 146607).\r\n`\u003copenml.flows.flow.OpenMLFlow object at 0x11cc43110\u003e is not JSON serializable`\r\n\r\n#### Steps/Code to Reproduce\r\n\r\nExample:\r\n```python\r\nimport openml\r\nflow = openml.flows.get_flow(7103)\r\ntask = openml.tasks.get_task(146607)\r\nrun = runs.run_flow_on_task(task, flow)\r\n```\r\n\r\n\r\n#### Expected Results\r\nOpenMLRun object\r\n\r\n#### Actual Results\r\n```\r\n---------------------------------------------------------------------------\r\nTypeError Traceback (most recent call last)\r\n\u003cipython-input-102-f7fb112d9304\u003e in \u003cmodule\u003e()\r\n----\u003e 1 run = runs.run_flow_on_task(task, flow)\r\n\r\n/usr/local/lib/python2.7/site-packages/openml-0.7.0-py2.7.egg/openml/runs/functions.pyc in run_flow_on_task(task, flow, avoid_duplicate_runs, flow_tags, seed)\r\n 85 if avoid_duplicate_runs and flow_id:\r\n 86 flow_from_server = get_flow(flow_id)\r\n---\u003e 87 setup_id = setup_exists(flow_from_server, flow.model)\r\n 88 ids = _run_exists(task.task_id, setup_id)\r\n 89 if ids:\r\n\r\n/usr/local/lib/python2.7/site-packages/openml-0.7.0-py2.7.egg/openml/setups/functions.pyc in setup_exists(flow, model)\r\n 44 raise ValueError('This should not happen!')\r\n 45 \r\n---\u003e 46 openml_param_settings = openml.runs.OpenMLRun._parse_parameters(flow, model)\r\n 47 description = xmltodict.unparse(_to_dict(flow.flow_id,\r\n 48 openml_param_settings),\r\n\r\n/usr/local/lib/python2.7/site-packages/openml-0.7.0-py2.7.egg/openml/runs/run.pyc in _parse_parameters(flow, model)\r\n 360 flow_dict = get_flow_dict(flow)\r\n 361 parameters = extract_parameters(flow, flow_dict, model,\r\n--\u003e 362 True, flow.flow_id)\r\n 363 \r\n 364 return parameters\r\n\r\n/usr/local/lib/python2.7/site-packages/openml-0.7.0-py2.7.egg/openml/runs/run.pyc in extract_parameters(_flow, _flow_dict, component_model, _main_call, main_id)\r\n 340 raise e\r\n 341 elif not isinstance(step, openml.flows.OpenMLFlow):\r\n--\u003e 342 raise e\r\n 343 continue\r\n 344 else:\r\n\r\nTypeError: \u003copenml.flows.flow.OpenMLFlow object at 0x11cc43110\u003e is not JSON serializable\r\n\r\n```\r\n\r\n#### Versions\r\nDarwin-17.5.0-x86_64-i386-64bit\r\n('Python', '2.7.15 (default, May 28 2018, 14:20:45) \\n[GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)]')\r\n('NumPy', '1.13.3')\r\n('SciPy', '1.0.0')\r\n('Scikit-Learn', '0.18.1')\r\n('OpenML', '0.7.0')\r\n\r\n\r\n\u003c!-- Thanks for contributing! --\u003e","author":{"url":"https://github.com/dbehrouz","@type":"Person","name":"dbehrouz"},"datePublished":"2018-06-05T09:10:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/477/openml-python/issues/477"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:a99ce009-1a09-f77b-243d-779373c74871 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83EE:2C37E4:112E024:191BBA2:6A4E3951 |
| html-safe-nonce | ba54a23edcf1b371db22490e4d4337ae23117cc0a6f9897f45b53621c941864f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0VFOjJDMzdFNDoxMTJFMDI0OjE5MUJCQTI6NkE0RTM5NTEiLCJ2aXNpdG9yX2lkIjoiMjU5MDM0MjYzMjUyNjcyMzQwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | afce0991ff8e3ef8ab01f75263139bef9edcd6cdd6544832f2428cf8c7ee5f73 |
| hovercard-subject-tag | issue:329366398 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/openml/openml-python/477/issue_layout |
| twitter:image | https://opengraph.githubassets.com/18e797df9640805a76fbc14761618ed1392d2299b1fde51729354befdea7c620/openml/openml-python/issues/477 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/18e797df9640805a76fbc14761618ed1392d2299b1fde51729354befdea7c620/openml/openml-python/issues/477 |
| og:image:alt | Description I encounter the following error when running a flow (for example 7103) on a task (for example 146607). |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dbehrouz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0 |
| turbo-cache-control | no-preview |
| go-import | github.com/openml/openml-python git https://github.com/openml/openml-python.git |
| octolytics-dimension-user_id | 4984562 |
| octolytics-dimension-user_login | openml |
| octolytics-dimension-repository_id | 17939040 |
| octolytics-dimension-repository_nwo | openml/openml-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 17939040 |
| octolytics-dimension-repository_network_root_nwo | openml/openml-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 42a6d378d7587a44c93aca255096cd66b7c8eb2d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width