Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
7568aef842
|
|||
c4b6cbbb6f | |||
1cf4454153
|
|||
bf15f4a7b7
|
|||
12903b2540
|
|||
959b9af378
|
|||
8fd1b75e13
|
20
CHANGELOG.md
20
CHANGELOG.md
@@ -2,6 +2,26 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||||
|
|
||||||
|
### [0.6.7](https://gitea.deepak.science:2222/physics/deepdog/compare/0.6.6...0.6.7) (2023-04-14)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* adds option to cap core count for real spectrum run ([bf15f4a](https://gitea.deepak.science:2222/physics/deepdog/commit/bf15f4a7b7f59504983624e7d512ed7474372032))
|
||||||
|
* adds option to cap core count for temp aware run ([12903b2](https://gitea.deepak.science:2222/physics/deepdog/commit/12903b2540cefb040174d230bc0d04719a6dc1b7))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* avoids redefinition of core count in loop ([1cf4454](https://gitea.deepak.science:2222/physics/deepdog/commit/1cf44541531541088198bd4599d467df3e1acbcf))
|
||||||
|
|
||||||
|
### [0.6.6](https://gitea.deepak.science:2222/physics/deepdog/compare/0.6.5...0.6.6) (2023-04-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* removes bad logging in multiprocessing function ([8fd1b75](https://gitea.deepak.science:2222/physics/deepdog/commit/8fd1b75e1378301210bfa8f14dd09174bbd21414))
|
||||||
|
|
||||||
### [0.6.5](https://gitea.deepak.science:2222/physics/deepdog/compare/0.6.4...0.6.5) (2023-04-09)
|
### [0.6.5](https://gitea.deepak.science:2222/physics/deepdog/compare/0.6.4...0.6.5) (2023-04-09)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -88,6 +88,7 @@ class RealSpectrumRun:
|
|||||||
chunksize: int = CHUNKSIZE,
|
chunksize: int = CHUNKSIZE,
|
||||||
initial_seed: int = 12345,
|
initial_seed: int = 12345,
|
||||||
use_fast_filter: bool = True,
|
use_fast_filter: bool = True,
|
||||||
|
cap_core_count: int = 0,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.measurements = measurements
|
self.measurements = measurements
|
||||||
self.dot_inputs = [(measure.r, measure.f) for measure in self.measurements]
|
self.dot_inputs = [(measure.r, measure.f) for measure in self.measurements]
|
||||||
@@ -123,6 +124,8 @@ class RealSpectrumRun:
|
|||||||
self.filename = f"{timestamp}-{filename_slug}.realdata.{ff_string}.bayesrun.csv"
|
self.filename = f"{timestamp}-{filename_slug}.realdata.{ff_string}.bayesrun.csv"
|
||||||
self.initial_seed = initial_seed
|
self.initial_seed = initial_seed
|
||||||
|
|
||||||
|
self.cap_core_count = cap_core_count
|
||||||
|
|
||||||
def go(self) -> None:
|
def go(self) -> None:
|
||||||
with open(self.filename, "a", newline="") as outfile:
|
with open(self.filename, "a", newline="") as outfile:
|
||||||
writer = csv.DictWriter(outfile, fieldnames=self.csv_fields, dialect="unix")
|
writer = csv.DictWriter(outfile, fieldnames=self.csv_fields, dialect="unix")
|
||||||
@@ -140,11 +143,14 @@ class RealSpectrumRun:
|
|||||||
|
|
||||||
results = []
|
results = []
|
||||||
_logger.debug("Going to iterate over models now")
|
_logger.debug("Going to iterate over models now")
|
||||||
|
core_count = multiprocessing.cpu_count() - 1 or 1
|
||||||
|
if (self.cap_core_count >= 1) and (self.cap_core_count < core_count):
|
||||||
|
core_count = self.cap_core_count
|
||||||
|
_logger.info(f"Using {core_count} cores")
|
||||||
for model_count, (model, model_name) in enumerate(
|
for model_count, (model, model_name) in enumerate(
|
||||||
zip(self.models, self.model_names)
|
zip(self.models, self.model_names)
|
||||||
):
|
):
|
||||||
_logger.debug(f"Doing model #{model_count}: {model_name}")
|
_logger.debug(f"Doing model #{model_count}: {model_name}")
|
||||||
core_count = multiprocessing.cpu_count() - 1 or 1
|
|
||||||
with multiprocessing.Pool(core_count) as pool:
|
with multiprocessing.Pool(core_count) as pool:
|
||||||
cycle_count = 0
|
cycle_count = 0
|
||||||
cycle_success = 0
|
cycle_success = 0
|
||||||
|
@@ -40,8 +40,6 @@ def get_a_result_fast_filter(input) -> int:
|
|||||||
for temp in dot_inputs_dict.keys():
|
for temp in dot_inputs_dict.keys():
|
||||||
dot_inputs = dot_inputs_dict[temp]
|
dot_inputs = dot_inputs_dict[temp]
|
||||||
lows, highs = low_high_dict[temp]
|
lows, highs = low_high_dict[temp]
|
||||||
_logger.info(f"current sample length: {len(current_sample)}")
|
|
||||||
_logger.info(f"workng on temp {temp}")
|
|
||||||
for di, low, high in zip(dot_inputs, lows, highs):
|
for di, low, high in zip(dot_inputs, lows, highs):
|
||||||
|
|
||||||
if len(current_sample) < 1:
|
if len(current_sample) < 1:
|
||||||
@@ -92,6 +90,7 @@ class TempAwareRealSpectrumRun:
|
|||||||
max_monte_carlo_cycles_steps: int = 10,
|
max_monte_carlo_cycles_steps: int = 10,
|
||||||
chunksize: int = CHUNKSIZE,
|
chunksize: int = CHUNKSIZE,
|
||||||
initial_seed: int = 12345,
|
initial_seed: int = 12345,
|
||||||
|
cap_core_count: int = 0,
|
||||||
) -> None:
|
) -> None:
|
||||||
self.measurements_dict = measurements_dict
|
self.measurements_dict = measurements_dict
|
||||||
self.dot_inputs_dict = {
|
self.dot_inputs_dict = {
|
||||||
@@ -128,6 +127,8 @@ class TempAwareRealSpectrumRun:
|
|||||||
self.filename = f"{timestamp}-{filename_slug}.realdata.{ff_string}.bayesrun.csv"
|
self.filename = f"{timestamp}-{filename_slug}.realdata.{ff_string}.bayesrun.csv"
|
||||||
self.initial_seed = initial_seed
|
self.initial_seed = initial_seed
|
||||||
|
|
||||||
|
self.cap_core_count = cap_core_count
|
||||||
|
|
||||||
def go(self) -> None:
|
def go(self) -> None:
|
||||||
with open(self.filename, "a", newline="") as outfile:
|
with open(self.filename, "a", newline="") as outfile:
|
||||||
writer = csv.DictWriter(outfile, fieldnames=self.csv_fields, dialect="unix")
|
writer = csv.DictWriter(outfile, fieldnames=self.csv_fields, dialect="unix")
|
||||||
@@ -148,11 +149,14 @@ class TempAwareRealSpectrumRun:
|
|||||||
|
|
||||||
results = []
|
results = []
|
||||||
_logger.debug("Going to iterate over models now")
|
_logger.debug("Going to iterate over models now")
|
||||||
|
core_count = multiprocessing.cpu_count() - 1 or 1
|
||||||
|
if (self.cap_core_count >= 1) and (self.cap_core_count < core_count):
|
||||||
|
core_count = self.cap_core_count
|
||||||
|
_logger.info(f"Using {core_count} cores")
|
||||||
for model_count, (model, model_name) in enumerate(
|
for model_count, (model, model_name) in enumerate(
|
||||||
zip(self.models, self.model_names)
|
zip(self.models, self.model_names)
|
||||||
):
|
):
|
||||||
_logger.debug(f"Doing model #{model_count}: {model_name}")
|
_logger.debug(f"Doing model #{model_count}: {model_name}")
|
||||||
core_count = multiprocessing.cpu_count() - 1 or 1
|
|
||||||
with multiprocessing.Pool(core_count) as pool:
|
with multiprocessing.Pool(core_count) as pool:
|
||||||
cycle_count = 0
|
cycle_count = 0
|
||||||
cycle_success = 0
|
cycle_success = 0
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "deepdog"
|
name = "deepdog"
|
||||||
version = "0.6.5"
|
version = "0.6.7"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Deepak Mallubhotla <dmallubhotla+github@gmail.com>"]
|
authors = ["Deepak Mallubhotla <dmallubhotla+github@gmail.com>"]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user