Skip to content

Commit

Permalink
Auto detect is now inline. Cannot be used in GMT atm
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneTR committed Feb 22, 2024
1 parent 3232ae2 commit abbff01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import numpy as np
from xgboost import XGBRegressor

import auto_detect

logger = logging.getLogger(__name__)
logger.addHandler(logging.StreamHandler())
logger.setLevel(logging.INFO)
Expand Down Expand Up @@ -139,6 +137,8 @@ def interpolate_predictions(predictions):
if not any(args_dict.values()) or args.auto:
logger.info('No arguments where supplied, or auto mode was forced. Running auto detect on the sytem.')

import auto_detect

data = auto_detect.get_cpu_info(logger)

logger.info('The following data was auto detected: %s', data)
Expand Down Expand Up @@ -214,4 +214,4 @@ def cpu_utilization():
(time.time_ns() - current_time) / 1_000_000_000, flush=True)
current_time = time.time_ns()
else:
print(interpolated_predictions[utilization] * args.vhost_ratio, flush=True)
print(interpolated_predictions[utilization] * args.vhost_ratio, flush=True)

0 comments on commit abbff01

Please sign in to comment.