Skip to content

Commit

Permalink
apply_model is responsible for getting the approprate input from the …
Browse files Browse the repository at this point in the history
…input folder
  • Loading branch information
Sara Veldhoen committed Apr 29, 2024
1 parent f97e8bd commit 809225c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main_data_processor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
from typing import Tuple, Optional
import time
import os
from dane.config import cfg
from dane.s3_util import validate_s3_uri
from io_util import (
Expand Down Expand Up @@ -126,7 +127,10 @@ def apply_model(
) -> ThisWorkerOutput:
logger.info("Starting model application")
start = time.time() * 1000 # convert to ms
with open(feature_extraction_input.input_file_path, "r") as f:
file_to_read = os.path.join(
feature_extraction_input.input_file_path,
feature_extraction_input.source_id + '.input')
with open(file_to_read, "r") as f:
cnt = len(f.readline().split())
destination = get_output_file_path(
feature_extraction_input.source_id, OutputType.FOOBAR
Expand Down

0 comments on commit 809225c

Please sign in to comment.