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

Remove DataPack.text property #845

Closed
hepengfe opened this issue Jun 29, 2022 · 4 comments
Closed

Remove DataPack.text property #845

hepengfe opened this issue Jun 29, 2022 · 4 comments
Labels
data_efficiency wontfix This will not be worked on

Comments

@hepengfe
Copy link
Collaborator

hepengfe commented Jun 29, 2022

Describe the bug
With the introduction of Payload with modalities, we have multiple payloads in the datapack. Therefore, it's not good to continue to use DataPack.text which could be ambiguous in which text payload it refers to. In the past, DataPack.text refers to the single text in the DataPack, and for backward compatibility we let it be the text in the first TextPayload.

To Reproduce
Steps to reproduce the behavior:

  1. Prepare data ...
  2. Run command '....'
  3. See error

Expected behavior

  • DataPack.text is removed
  • All code dependent on it will be changed to use DataPack.get_payload_data_at(Modality.Text, 0)

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Python and Package verions: [e.g. Python version, Pytorch version]

Additional context
Add any other context about the problem here.

@hunterhector
Copy link
Member

No, don't change existing APIs. The payload API itself is much longer and non-user friendly

@hunterhector hunterhector added the wontfix This will not be worked on label Jun 30, 2022
@hepengfe
Copy link
Collaborator Author

I removed DataPack.audio already in #828. Should I add it back?

@hunterhector
Copy link
Member

hmm, sorry I didn't notice that one. Yes, let's add it back. Now is not the time to change the interfaces. Instead we should make sure all old interfaces work.

@hunterhector
Copy link
Member

I removed DataPack.audio already in #828. Should I add it back?

@hepengfe let's add this back as an issue to track it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data_efficiency wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants