-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
729d4e1
commit 34ce80e
Showing
7 changed files
with
112 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from robotoff.types import BatchJobType, PredictionType | ||
from robotoff import settings | ||
|
||
|
||
# Bucket structure to enable the batch job to load and upload data | ||
BATCH_JOB_TYPE_TO_BUCKET = { | ||
BatchJobType.ingredients_spellcheck: { | ||
"bucket": "robotoff-spellcheck", | ||
"suffix_preprocess": "data/preprocessed_data.parquet", | ||
"suffix_postprocess": "data/postprocessed_data.parquet", | ||
}, | ||
} | ||
|
||
# Paths batch job config files | ||
BATCH_JOB_TYPE_TO_CONFIG_PATH = { | ||
BatchJobType.ingredients_spellcheck: settings.BATCH_JOB_CONFIG_DIR / "job_configs/spellcheck.yaml", | ||
} | ||
|
||
BATCH_JOB_TYPE_TO_QUERY_FILE_PATH = { | ||
BatchJobType.ingredients_spellcheck: settings.BATCH_JOB_CONFIG_DIR / "sql/spellcheck.sql", | ||
} | ||
|
||
# Mapping between batch job type and prediction type | ||
BATCH_JOB_TYPE_TO_PREDICTION_TYPE = { | ||
BatchJobType.ingredients_spellcheck: PredictionType.ingredient_spellcheck, | ||
} | ||
|
||
# Column names in the processed batch of data | ||
BATCH_JOB_TYPE_TO_FEATURES = { | ||
BatchJobType.ingredients_spellcheck: { | ||
"barcode": "code", | ||
"value": "correction", | ||
"value_tag": "lang", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters