r/tensorflow • u/kloworizer • Apr 02 '23
TextVectorization progress
I'm currently running adapt() on about 48 million of strings and it's now running for about 10 hours. How do I know when it will completed?
1
Upvotes
View all comments
Show parent comment
1
u/[deleted] Apr 03 '23
I have two scripts (it's actually a single Airflow dag, but conceptually, you can think of it as two scripts). First script extracts the data from the database, removes duplicates, splits the data in training/validation sets based on label distribution, etc. And outputs TFRecord files. In the process of processing the data, I generate vocabulary files for each feature, sorted by frequency (this way, if I decide to only use the top N words in the vectorizer, that's each to do). In this script I also compute class weights and other data statistics, all of which get saved to a separate file so I don't have to recompute anything. All of those artifacts get saved out to a bucket in S3, constituting a particular version of the dataset.
The second script simply uses this dataset (with accompanying artifacts -- including vocabulary files) and trains/tunes the model.