-
Notifications
You must be signed in to change notification settings - Fork 60
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
Payload Implementation #828
Conversation
For audio and image data, we don't want to import third-party package directly in the payload class so I keep a loading interface (an abstract method I rewrote the AudioReader into SoundfileAudioPayload example here https://github.com/asyml/forte/pull/828/files#diff-0a7626d45acb22318a269b5ece6049d603ad6326f8108cda7a0ed2dbc3978440. In this example, user import third-party package in the |
True.
I am considering whether this is a good idea since that means users will have to write customized code in the ontology class files (which are generated). This will create a few problems:
Actually, we don't have to make the ontology this complex, the Payload ontology only needs to store the data, but it doesn't have to know how to parse the data. Like in the text processing part, we put most of the work to the reader. Imaging the I would suggest the following:
Note that we are not experts in image formats right now, so for steps 2 and 3, we can create examples first, and not make them core library code. Once we fully master or get comfortable with certain data types (I think it is possible for easy data types like images stored as NumPy matrices), we can move more to the library core. |
…ss and its subclasses to store data processing related metadata
…ss inside the script
…doesn't need to be added into any DataPack
This reverts commit 5aa6be0.
I remember clearly I requested to install |
|
||
# since we cannot pass different modality from generated ontology, and | ||
# we don't want to import base ontology in the header of the file | ||
# we import it here. |
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 not a solution. We cannot import items that are generated back to the source code. This doesn't make sense.
This PR partially implements #810
Description of changes
Payload
in DataPack and DataStorePayload
generic class with its subclasses for different modalities such as text, audio and image.Possible influences of this PR.
Test Conducted
Describe what test cases are included for the PR.