Skip to content
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

BaseIDProvider -- this class should not provide the connection of opinions and samples. #376

Closed
9 tasks done
nicolay-r opened this issue Jul 25, 2022 · 0 comments
Closed
9 tasks done
Assignees
Labels
critical enhancement New feature or request task

Comments

@nicolay-r
Copy link
Owner

nicolay-r commented Jul 25, 2022

Problem: the predefined template of the identifiers does not allow us to consider framework for other cases with different data structuring.

How to refactor: such meta-information should go alongside with the other data instead of being sealed into the specific format of the identifier; for example such columns as relation_index and doc_relation_id could be added.

  • ❌ remove parse_label_in_sample_id
  • ❌ remove parse_index_in_sample_id
  • 🔧 the code below is depend on the id format, while it would be better do depend on the specific columns (mentioned above)

doc_df = self._storage.find_by_value(column_name=const.DOC_ID, value=doc_id)
row_ids = [row_id for row_id in doc_df[const.ID]] # TODO. Adopt storage.
doc_opin_ids = self.__iter_doc_opinion_ids(row_ids=row_ids)

  • 🔧 the same is for sample view; in the snipped below we depend on the column ID

for row_index, sample_id in enumerate(storage.iter_column_values(const.ID)):
sample_id = str(sample_id)
opinion_id = self.__row_ids_provider.parse_opinion_in_sample_id(sample_id)

@nicolay-r nicolay-r added enhancement New feature or request task labels Jul 25, 2022
@nicolay-r nicolay-r self-assigned this Jul 25, 2022
nicolay-r added a commit that referenced this issue Jul 25, 2022
nicolay-r added a commit that referenced this issue Jul 25, 2022
nicolay-r added a commit that referenced this issue Jul 25, 2022
@nicolay-r nicolay-r changed the title BaseIDProvider -- this class should not provide the connection of opinions and samples. BaseIDProvider -- this class should not provide the connection of opinions and samples. Nov 7, 2022
nicolay-r added a commit that referenced this issue Jul 3, 2023
nicolay-r added a commit that referenced this issue Jul 10, 2023
…`convert_sample_id_to_opinion_id`.
@nicolay-r nicolay-r mentioned this issue Jul 10, 2023
24 tasks
nicolay-r added a commit that referenced this issue Jul 11, 2023
nicolay-r added a commit that referenced this issue Jul 22, 2023
#376 related to bag_id.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical enhancement New feature or request task
Projects
No open projects
Development

No branches or pull requests

1 participant