Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[ENH] V1 -> V2 Migration - Flows (module) #1609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
[ENH] V1 -> V2 Migration - Flows (module) #1609
Changes from all commits
92d88e4443ade9468087d5bc37b808d99169660e78f60c78bf25c95b8caba116e577c41913c10768194901840a526ed4c1c588d0cb6ff72080d5afcf47112cd44cf3eea7dda1f0e5947edcd006cde0aaeedc5772aa1e56006b8497384da911878138dc26e01e2d059bd156ad4d7a3788b5b9ef668820fe567eca4a82a636d39d9d0724c4ae0251f49e213873b6f38cde06c538fccb7723d61b27b2287c3b7e285efd43c48f4aab6bd43cf863e323ed9195fa65342eecadc0e74bfb2d3ecabaecfd1da932671f07785c111339bf86a7b66677d2224c49608c36f6bc7f7baa3a38c9e4b73acfa2bb63fa0a0aa9d4868802b8a52b93feec9477f0c480dac7d9fe5935b64eb273193911f44d10d134a935f0f49514df853bee940e05a16741319133b4ca0a6b9a45f924b32541b0f2acb173f3e8d1f0f83bdb52a42712001caadfb38a2d03c4ca98d708fd4f75bba164f66fc4dae4336c20a2ab3c1ebff0220ef8144e22a488ca599c7e12867862f09f3cd5f731cebad7842aefdb380f40b027ac16726ac1dfe62924c927696bb190face95daaa67841ea8cc515aae6a92df1b8c22afc839a61c922afffa9ce9a7b2d2127fe790896511272ea1a4a696c49755636dd07af342d9c8ec002b989045d896c437966e27470ad04d9569263f7f79dea29f6497c2dce7f5440dd4600fc917c3d86b18aba3d3ed99d54ddc22e3a731857329ef187cf94c89298fbda987050233065c276b92bb419edcbcb6d9378544c8ad4c413bfab1a154e75b9249c6d59af9f5e6276324a73f75942ee7fa319546404be5bbd9027c01e5461a97d899a9858741423a3450ac28f82097e27cc28c8082d698ed65592199f3ca32ffe596d4a66245c762fb477c21f2eac24fc2ed65fef3b07de29db3f13b4e5388ac886b305f4f0b2bf164e97e6c2c66d73caa54e8e2d452d3c23581239eb82350eed377a000eb79f618756de184b1a9e7fd716ecf3c29e71b4ff0b293155eed3cc9a7a6b82f434199738de99b745c85d97d611071ecbbba65472ed44b48b504bc83bf926092309f136d274cb52896b41df67df12a7e9ced0dc1853eabc19299cbdaa942d52b89a08467271bede49f4773b4893d0d8f17f9530f1d9f95231c8bd5857123f4f4e2bd218baa197fd3d612dafdf7edb2a74bb68b4d1f419d39afe04d1489787e6d8d056e30a9fb68dd0fc872902915b4cba26b3259ab95ffeb26cd4f62f606File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FlowV1API.get()does not detect v1-style error payloads (<oml:error>...) that are returned with HTTP 200.HTTPClientonly validates by status code, so this method can end up passing an error dict intoOpenMLFlow._from_dict()and failing with a confusing parsing error. Please add an<oml:error>check similar toexists()/list()and raiseOpenMLServerExceptionwith the server-provided code/message.Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing something, but it seems to me like just having a separate parser would have been more useful. Or even allowing the parser to be called with or without a required
oml:prefix. Largely because after sunset of v1, we wouldn't want to keep this code around anymore, so we would have to do extra work.Considering it works now and this is easily addressed as a separate PR at a later date, I'm not going to request a change here. If there were considerations or attempts that prevented you from doing it that way, I would be interested to hear about them so they can be taken into account when this is worked on in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think anything prevented from doing it that way. Btw in a long-term plan, are you suggesting to update the schema definition of flow dict?
Also I don't think I exactly get your idea of separate parser. Are you thinking of a general json to xml parser that could work across several other cases in code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I just meant that we currently interface with the XML endpoints of the REST API, which include additional qualifiers (e.g,. the
oml:prefix). However, the JSON endpoint (both in v1 and v2) don't have this.So it might have made more sense to directly parse the JSON instead of first coercing it back into the v1 style XML response.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, and going forward this should be the way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing the top-level
openmlpackage from withinopenml.flows.flowincreases the risk of circular-import issues (the packageopenml/__init__.pyimportsopenml.flows, which imports this module). Since the new code only needs the backend, consider importing_backend(orAPIBackend) directly fromopenml._apilazily inside methods, rather thanimport openmlat module import time.Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.