-
Notifications
You must be signed in to change notification settings - Fork 326
feat(data-manager): Added a data manager class #81
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
Conversation
cosmic-cortex
commented
May 9, 2020
@talolard Hi! I am really sorry, but I forgot to review the PR :( In the last month I was working crazy hard to launch a new startup and a new product, so I set everything aside. If it is still fine by you, I'll review it now and add it.
@cosmic-cortex
cosmic-cortex
left a comment
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 have highlighted some issues which should be changed. Otherwise, I don't have any suggestions to improve the API at the moment, it feels like intuitive for me.
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.
Can you rewrite the docstrings in google format? (https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html) This is what is used throughout modAL, and it would be best to keep them consistent.
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.
This won't work if labels is a single Label. I suggest to always require a list of labels.
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.
@talolard Hi! I am really sorry, but I forgot to review the PR :( In the last month I was working crazy hard to launch a new startup and a new product, so I set everything aside. If it is still fine by you, I'll review it now and add it.
Hi, no worries.
I'm moving this into it's own package and will update docs here with an example using it. Hope the launch went well
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.
Cool! Let me know, when the package is available!
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.
This is probably a typo, should be unlabeled.
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.
This should be a TypeError instead of a generic exception, since it perfectly fits the scope of TypeError.
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.
Can you rename the variables from camelCase to use lower_and_under conventions?
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.
This is just a typo, can you change the function name to _offset_new_labels?
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.
This can change the data type of labels, if labels_dtype is not explicitly given upon initialization. How about adding a new attribute to the class where we store the label_dtype? This can be None by default and set during the add_labels method, so this method can return self._labels[self.labeled_mask].astype(self.label_dtype). What do you think?
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 would write the following here:
elif not isinstance(labels, Container):
raise TypeError("Malformed input. Please add either a tuple (ix,label) or a list [(ix,label),..]")
where Collections is from collections.abc.
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 really understand what sources is used for, can you explain it in more detail?
In any case, it is not used by any of the methods (except remaining_sources), so it seems to me that it can be removed.
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.
Why do you put this into a for block? the index variable is not used and the iterator which you loop through has a single element.
codecov-io
commented
Feb 8, 2021
Codecov Report
Merging #81 (3281990) into dev (1e23453) will not change coverage.
The diff coverage isn/a.
@@ Coverage Diff @@ ## dev #81 +/- ## ======================================= Coverage 97.19% 97.19% ======================================= Files 31 31 Lines 1641 1641 ======================================= Hits 1595 1595 Misses 46 46
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered by Codecov. Last update 1e23453...3281990. Read the comment docs.
codecov-commenter
commented
Apr 24, 2025
Codecov Report
All modified and coverable lines are covered by tests ✅
Project coverage is 97.19%. Comparing base (
1e23453) to head (3281990).
Report is 115 commits behind head on dev.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@ Coverage Diff @@ ## dev #81 +/- ## ======================================= Coverage 97.19% 97.19% ======================================= Files 31 31 Lines 1641 1641 ======================================= Hits 1595 1595 Misses 46 46
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Per #80 made a DataManager class.
Probably easiest to get a sense of it through the examples, but highlight is that users don't need to do bookeeping because they can just do
And the manager keeps everything in sync.
I bet the API can be improved, but it's a solid and convenient start. Looking forward to feedback