Skip to content

Commit

Permalink
some more optimisations
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <[email protected]>
  • Loading branch information
bedapudi6788 committed Oct 28, 2024
1 parent b8b49d3 commit 4d0f45c
Show file tree
Hide file tree
Showing 4 changed files with 280 additions and 145 deletions.
1 change: 1 addition & 0 deletions fastdeploy/_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def add_to_infer_queue(
"-1.predicted_at": 0,
"last_predictor_sequence": -1,
"last_predictor_success": True,
"timedout_in_queue": None,
}
}
)
Expand Down
3 changes: 1 addition & 2 deletions fastdeploy/_loop.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def start_loop(
"-1.predicted_at": 0,
"-1.received_at": {"$lt": time.time() - timeout_time},
"timedout_in_queue": {"$ne": True},
"last_predictor_sequence": {"$ne": _utils.LAST_PREDICTOR_SEQUENCE},
},
update={"timedout_in_queue": True},
select_keys=[],
Expand Down Expand Up @@ -243,8 +244,6 @@ def start_loop(
f"Updated results predictor {predictor_sequence}: {list(unique_id_wise_results)}"
)

last_batch_collection_started_at = time.time()


if __name__ == "__main__":
import sys
Expand Down
2 changes: 1 addition & 1 deletion fastdeploy/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
logging.basicConfig(
format="%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s",
datefmt="%Y-%m-%d:%H:%M:%S",
level=logging.DEBUG,
level=logging.INFO,
)

logger = logging.getLogger(__name__)
Expand Down
Loading

0 comments on commit 4d0f45c

Please sign in to comment.