Compare commits
1 Commits
efe6436648
...
ee1a2fa4d2
Author | SHA1 | Date | |
---|---|---|---|
ee1a2fa4d2 |
65
CHANGELOG.md
65
CHANGELOG.md
@ -2,71 +2,6 @@
|
|||||||
|
|
||||||
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.7.3](https://gitea.deepak.science:2222/physics/deepdog/compare/0.7.2...0.7.3) (2023-07-27)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* adds utility options and avoids memory leak ([598dad1](https://gitea.deepak.science:2222/physics/deepdog/commit/598dad1e6dc8fc0b7a5b4a90c8e17bf744e8d98c))
|
|
||||||
|
|
||||||
### [0.7.2](https://gitea.deepak.science:2222/physics/deepdog/compare/0.7.1...0.7.2) (2023-07-24)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* clamps results now ([9bb8fc5](https://gitea.deepak.science:2222/physics/deepdog/commit/9bb8fc50fe1bd1a285a333c5a396bfb6ac3176cf))
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* fixes clamping format etc. ([a170a3c](https://gitea.deepak.science:2222/physics/deepdog/commit/a170a3ce01adcec356e5aaab9abcc0ec4accd64b))
|
|
||||||
|
|
||||||
### [0.7.1](https://gitea.deepak.science:2222/physics/deepdog/compare/0.7.0...0.7.1) (2023-07-24)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* adds subset simulation stuff ([33cab9a](https://gitea.deepak.science:2222/physics/deepdog/commit/33cab9ab4179cec13ae9e591a8ffc32df4dda989))
|
|
||||||
|
|
||||||
## [0.7.0](https://gitea.deepak.science:2222/physics/deepdog/compare/0.6.7...0.7.0) (2023-05-01)
|
|
||||||
|
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
|
||||||
|
|
||||||
* removes fastfilter parameter because it should never be needed
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* adds pair capability to real spectrum run hopefully ([a089951](https://gitea.deepak.science:2222/physics/deepdog/commit/a089951bbefcd8a0b2efeb49b7a8090412cbb23d))
|
|
||||||
* removes fastfilter parameter because it should never be needed ([a015daf](https://gitea.deepak.science:2222/physics/deepdog/commit/a015daf5ff6fa5f6155c8d7e02981b588840a5b0))
|
|
||||||
|
|
||||||
### [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)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* adds temp aware guy using new pdme temp-flexible feature for bundling temp models ([de1ec3e](https://gitea.deepak.science:2222/physics/deepdog/commit/de1ec3e70062d418e0d4c89716905cc9313d2e26))
|
|
||||||
|
|
||||||
### [0.6.4](https://gitea.deepak.science:2222/physics/deepdog/compare/0.6.3...0.6.4) (2022-08-13)
|
### [0.6.4](https://gitea.deepak.science:2222/physics/deepdog/compare/0.6.3...0.6.4) (2022-08-13)
|
||||||
|
|
||||||
|
|
||||||
|
20
Jenkinsfile
vendored
20
Jenkinsfile
vendored
@ -4,7 +4,7 @@ pipeline {
|
|||||||
label 'deepdog' // all your pods will be named with this prefix, followed by a unique id
|
label 'deepdog' // all your pods will be named with this prefix, followed by a unique id
|
||||||
idleMinutes 5 // how long the pod will live after no jobs have run on it
|
idleMinutes 5 // how long the pod will live after no jobs have run on it
|
||||||
yamlFile 'jenkins/ci-agent-pod.yaml' // path to the pod definition relative to the root of our project
|
yamlFile 'jenkins/ci-agent-pod.yaml' // path to the pod definition relative to the root of our project
|
||||||
defaultContainer 'poetry' // define a default container if more than a few stages use it, will default to jnlp container
|
defaultContainer 'python' // define a default container if more than a few stages use it, will default to jnlp container
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12,30 +12,36 @@ pipeline {
|
|||||||
parallelsAlwaysFailFast()
|
parallelsAlwaysFailFast()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
environment {
|
||||||
|
POETRY_HOME="/opt/poetry"
|
||||||
|
POETRY_VERSION="1.1.12"
|
||||||
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
stage('Build') {
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Building...'
|
echo 'Building...'
|
||||||
sh 'python --version'
|
sh 'python --version'
|
||||||
sh 'poetry --version'
|
sh 'curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python'
|
||||||
sh 'poetry install'
|
sh '${POETRY_HOME}/bin/poetry --version'
|
||||||
|
sh '${POETRY_HOME}/bin/poetry install'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
parallel{
|
parallel{
|
||||||
stage('pytest') {
|
stage('pytest') {
|
||||||
steps {
|
steps {
|
||||||
sh 'poetry run pytest'
|
sh '${POETRY_HOME}/bin/poetry run pytest'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('lint') {
|
stage('lint') {
|
||||||
steps {
|
steps {
|
||||||
sh 'poetry run flake8 deepdog tests'
|
sh '${POETRY_HOME}/bin/poetry run flake8 deepdog tests'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('mypy') {
|
stage('mypy') {
|
||||||
steps {
|
steps {
|
||||||
sh 'poetry run mypy deepdog'
|
sh '${POETRY_HOME}/bin/poetry run mypy deepdog'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,7 +57,7 @@ pipeline {
|
|||||||
}
|
}
|
||||||
steps {
|
steps {
|
||||||
echo 'Deploying...'
|
echo 'Deploying...'
|
||||||
sh 'poetry publish -u ${PYPI_USR} -p ${PYPI_PSW} --build'
|
sh '${POETRY_HOME}/bin/poetry publish -u ${PYPI_USR} -p ${PYPI_PSW} --build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
[](https://jenkins.deepak.science/job/gitea-physics/job/deepdog/job/master/)
|
[](https://jenkins.deepak.science/job/gitea-physics/job/deepdog/job/master/)
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
The DiPole DiaGnostic tool.
|
The DiPole DiaGnostic tool.
|
||||||
|
|
||||||
|
@ -3,8 +3,6 @@ from deepdog.meta import __version__
|
|||||||
from deepdog.bayes_run import BayesRun
|
from deepdog.bayes_run import BayesRun
|
||||||
from deepdog.bayes_run_simulpairs import BayesRunSimulPairs
|
from deepdog.bayes_run_simulpairs import BayesRunSimulPairs
|
||||||
from deepdog.real_spectrum_run import RealSpectrumRun
|
from deepdog.real_spectrum_run import RealSpectrumRun
|
||||||
from deepdog.temp_aware_real_spectrum_run import TempAwareRealSpectrumRun
|
|
||||||
from deepdog.bayes_run_with_ss import BayesRunWithSubspaceSimulation
|
|
||||||
|
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
@ -16,8 +14,6 @@ __all__ = [
|
|||||||
"BayesRun",
|
"BayesRun",
|
||||||
"BayesRunSimulPairs",
|
"BayesRunSimulPairs",
|
||||||
"RealSpectrumRun",
|
"RealSpectrumRun",
|
||||||
"TempAwareRealSpectrumRun",
|
|
||||||
"BayesRunWithSubspaceSimulation",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,238 +0,0 @@
|
|||||||
import deepdog.subset_simulation
|
|
||||||
import pdme.inputs
|
|
||||||
import pdme.model
|
|
||||||
import pdme.measurement.input_types
|
|
||||||
import pdme.measurement.oscillating_dipole
|
|
||||||
import pdme.util.fast_v_calc
|
|
||||||
import pdme.util.fast_nonlocal_spectrum
|
|
||||||
from typing import Sequence, Tuple, List, Optional
|
|
||||||
import datetime
|
|
||||||
import csv
|
|
||||||
import logging
|
|
||||||
import numpy
|
|
||||||
import numpy.typing
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: remove hardcode
|
|
||||||
CHUNKSIZE = 50
|
|
||||||
|
|
||||||
# TODO: It's garbage to have this here duplicated from pdme.
|
|
||||||
DotInput = Tuple[numpy.typing.ArrayLike, float]
|
|
||||||
|
|
||||||
|
|
||||||
CLAMPING_FACTOR = 10
|
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
class BayesRunWithSubspaceSimulation:
|
|
||||||
"""
|
|
||||||
A single Bayes run for a given set of dots.
|
|
||||||
|
|
||||||
Parameters
|
|
||||||
----------
|
|
||||||
dot_inputs : Sequence[DotInput]
|
|
||||||
The dot inputs for this bayes run.
|
|
||||||
|
|
||||||
models_with_names : Sequence[Tuple(str, pdme.model.DipoleModel)]
|
|
||||||
The models to evaluate.
|
|
||||||
|
|
||||||
actual_model : pdme.model.DipoleModel
|
|
||||||
The model which is actually correct.
|
|
||||||
|
|
||||||
filename_slug : str
|
|
||||||
The filename slug to include.
|
|
||||||
|
|
||||||
run_count: int
|
|
||||||
The number of runs to do.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
dot_positions: Sequence[numpy.typing.ArrayLike],
|
|
||||||
frequency_range: Sequence[float],
|
|
||||||
models_with_names: Sequence[Tuple[str, pdme.model.DipoleModel]],
|
|
||||||
actual_model: pdme.model.DipoleModel,
|
|
||||||
filename_slug: str,
|
|
||||||
max_frequency: float = 20,
|
|
||||||
end_threshold: float = None,
|
|
||||||
run_count=100,
|
|
||||||
chunksize: int = CHUNKSIZE,
|
|
||||||
ss_n_c: int = 500,
|
|
||||||
ss_n_s: int = 100,
|
|
||||||
ss_m_max: int = 15,
|
|
||||||
ss_target_cost: Optional[float] = None,
|
|
||||||
ss_level_0_seed: int = 200,
|
|
||||||
ss_mcmc_seed: int = 20,
|
|
||||||
ss_use_adaptive_steps=True,
|
|
||||||
ss_default_phi_step=0.01,
|
|
||||||
ss_default_theta_step=0.01,
|
|
||||||
ss_default_r_step=0.01,
|
|
||||||
ss_default_w_log_step=0.01,
|
|
||||||
ss_default_upper_w_log_step=4,
|
|
||||||
ss_dump_last_generation=False,
|
|
||||||
) -> None:
|
|
||||||
self.dot_inputs = pdme.inputs.inputs_with_frequency_range(
|
|
||||||
dot_positions, frequency_range
|
|
||||||
)
|
|
||||||
self.dot_inputs_array = pdme.measurement.input_types.dot_inputs_to_array(
|
|
||||||
self.dot_inputs
|
|
||||||
)
|
|
||||||
|
|
||||||
self.models_with_names = models_with_names
|
|
||||||
self.models = [model for (_, model) in models_with_names]
|
|
||||||
self.model_names = [name for (name, _) in models_with_names]
|
|
||||||
self.actual_model = actual_model
|
|
||||||
|
|
||||||
self.n: int
|
|
||||||
try:
|
|
||||||
self.n = self.actual_model.n # type: ignore
|
|
||||||
except AttributeError:
|
|
||||||
self.n = 1
|
|
||||||
|
|
||||||
self.model_count = len(self.models)
|
|
||||||
|
|
||||||
self.csv_fields = []
|
|
||||||
for i in range(self.n):
|
|
||||||
self.csv_fields.extend(
|
|
||||||
[
|
|
||||||
f"dipole_moment_{i+1}",
|
|
||||||
f"dipole_location_{i+1}",
|
|
||||||
f"dipole_frequency_{i+1}",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
self.compensate_zeros = True
|
|
||||||
self.chunksize = chunksize
|
|
||||||
for name in self.model_names:
|
|
||||||
self.csv_fields.extend([f"{name}_likelihood", f"{name}_prob"])
|
|
||||||
|
|
||||||
self.probabilities = [1 / self.model_count] * self.model_count
|
|
||||||
|
|
||||||
timestamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
|
|
||||||
self.filename = f"{timestamp}-{filename_slug}.bayesrunwithss.csv"
|
|
||||||
self.max_frequency = max_frequency
|
|
||||||
|
|
||||||
if end_threshold is not None:
|
|
||||||
if 0 < end_threshold < 1:
|
|
||||||
self.end_threshold: float = end_threshold
|
|
||||||
self.use_end_threshold = True
|
|
||||||
_logger.info(f"Will abort early, at {self.end_threshold}.")
|
|
||||||
else:
|
|
||||||
raise ValueError(
|
|
||||||
f"end_threshold should be between 0 and 1, but is actually {end_threshold}"
|
|
||||||
)
|
|
||||||
|
|
||||||
self.ss_n_c = ss_n_c
|
|
||||||
self.ss_n_s = ss_n_s
|
|
||||||
self.ss_m_max = ss_m_max
|
|
||||||
self.ss_target_cost = ss_target_cost
|
|
||||||
self.ss_level_0_seed = ss_level_0_seed
|
|
||||||
self.ss_mcmc_seed = ss_mcmc_seed
|
|
||||||
self.ss_use_adaptive_steps = ss_use_adaptive_steps
|
|
||||||
self.ss_default_phi_step = ss_default_phi_step
|
|
||||||
self.ss_default_theta_step = ss_default_theta_step
|
|
||||||
self.ss_default_r_step = ss_default_r_step
|
|
||||||
self.ss_default_w_log_step = ss_default_w_log_step
|
|
||||||
self.ss_default_upper_w_log_step = ss_default_upper_w_log_step
|
|
||||||
self.ss_dump_last_generation = ss_dump_last_generation
|
|
||||||
|
|
||||||
self.run_count = run_count
|
|
||||||
|
|
||||||
def go(self) -> None:
|
|
||||||
with open(self.filename, "a", newline="") as outfile:
|
|
||||||
writer = csv.DictWriter(outfile, fieldnames=self.csv_fields, dialect="unix")
|
|
||||||
writer.writeheader()
|
|
||||||
|
|
||||||
for run in range(1, self.run_count + 1):
|
|
||||||
|
|
||||||
# Generate the actual dipoles
|
|
||||||
actual_dipoles = self.actual_model.get_dipoles(self.max_frequency)
|
|
||||||
|
|
||||||
measurements = actual_dipoles.get_dot_measurements(self.dot_inputs)
|
|
||||||
|
|
||||||
_logger.info(f"Going to work on dipole at {actual_dipoles.dipoles}")
|
|
||||||
|
|
||||||
# define a new seed sequence for each run
|
|
||||||
|
|
||||||
results = []
|
|
||||||
_logger.debug("Going to iterate over models now")
|
|
||||||
for model_count, model in enumerate(self.models_with_names):
|
|
||||||
_logger.debug(f"Doing model #{model_count}, {model[0]}")
|
|
||||||
subset_run = deepdog.subset_simulation.SubsetSimulation(
|
|
||||||
model,
|
|
||||||
self.dot_inputs,
|
|
||||||
measurements,
|
|
||||||
self.ss_n_c,
|
|
||||||
self.ss_n_s,
|
|
||||||
self.ss_m_max,
|
|
||||||
self.ss_target_cost,
|
|
||||||
self.ss_level_0_seed,
|
|
||||||
self.ss_mcmc_seed,
|
|
||||||
self.ss_use_adaptive_steps,
|
|
||||||
self.ss_default_phi_step,
|
|
||||||
self.ss_default_theta_step,
|
|
||||||
self.ss_default_r_step,
|
|
||||||
self.ss_default_w_log_step,
|
|
||||||
self.ss_default_upper_w_log_step,
|
|
||||||
keep_probs_list=False,
|
|
||||||
dump_last_generation_to_file=self.ss_dump_last_generation,
|
|
||||||
)
|
|
||||||
results.append(subset_run.execute())
|
|
||||||
|
|
||||||
_logger.debug("Done, constructing output now")
|
|
||||||
row = {
|
|
||||||
"dipole_moment_1": actual_dipoles.dipoles[0].p,
|
|
||||||
"dipole_location_1": actual_dipoles.dipoles[0].s,
|
|
||||||
"dipole_frequency_1": actual_dipoles.dipoles[0].w,
|
|
||||||
}
|
|
||||||
for i in range(1, self.n):
|
|
||||||
try:
|
|
||||||
current_dipoles = actual_dipoles.dipoles[i]
|
|
||||||
row[f"dipole_moment_{i+1}"] = current_dipoles.p
|
|
||||||
row[f"dipole_location_{i+1}"] = current_dipoles.s
|
|
||||||
row[f"dipole_frequency_{i+1}"] = current_dipoles.w
|
|
||||||
except IndexError:
|
|
||||||
_logger.info(f"Not writing anymore, saw end after {i}")
|
|
||||||
break
|
|
||||||
|
|
||||||
likelihoods: List[float] = []
|
|
||||||
|
|
||||||
for (name, result) in zip(self.model_names, results):
|
|
||||||
if result.over_target_likelihood is None:
|
|
||||||
clamped_likelihood = result.probs_list[-1][0] / CLAMPING_FACTOR
|
|
||||||
_logger.warning(
|
|
||||||
f"got a none result, clamping to {clamped_likelihood}"
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
clamped_likelihood = result.over_target_likelihood
|
|
||||||
likelihoods.append(clamped_likelihood)
|
|
||||||
row[f"{name}_likelihood"] = clamped_likelihood
|
|
||||||
|
|
||||||
success_weight = sum(
|
|
||||||
[
|
|
||||||
likelihood * prob
|
|
||||||
for likelihood, prob in zip(likelihoods, self.probabilities)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
new_probabilities = [
|
|
||||||
likelihood * old_prob / success_weight
|
|
||||||
for likelihood, old_prob in zip(likelihoods, self.probabilities)
|
|
||||||
]
|
|
||||||
self.probabilities = new_probabilities
|
|
||||||
for name, probability in zip(self.model_names, self.probabilities):
|
|
||||||
row[f"{name}_prob"] = probability
|
|
||||||
_logger.info(row)
|
|
||||||
|
|
||||||
with open(self.filename, "a", newline="") as outfile:
|
|
||||||
writer = csv.DictWriter(
|
|
||||||
outfile, fieldnames=self.csv_fields, dialect="unix"
|
|
||||||
)
|
|
||||||
writer.writerow(row)
|
|
||||||
|
|
||||||
if self.use_end_threshold:
|
|
||||||
max_prob = max(self.probabilities)
|
|
||||||
if max_prob > self.end_threshold:
|
|
||||||
_logger.info(
|
|
||||||
f"Aborting early, because {max_prob} is greater than {self.end_threshold}"
|
|
||||||
)
|
|
||||||
break
|
|
@ -5,7 +5,7 @@ import pdme.measurement.input_types
|
|||||||
import pdme.measurement.oscillating_dipole
|
import pdme.measurement.oscillating_dipole
|
||||||
import pdme.util.fast_v_calc
|
import pdme.util.fast_v_calc
|
||||||
import pdme.util.fast_nonlocal_spectrum
|
import pdme.util.fast_nonlocal_spectrum
|
||||||
from typing import Sequence, Tuple, List, Dict, Union, Optional
|
from typing import Sequence, Tuple, List, Dict, Union
|
||||||
import datetime
|
import datetime
|
||||||
import csv
|
import csv
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
@ -20,50 +20,16 @@ CHUNKSIZE = 50
|
|||||||
_logger = logging.getLogger(__name__)
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
def get_a_result_fast_filter_pairs(input) -> int:
|
def get_a_result(input) -> int:
|
||||||
(
|
model, dot_inputs, lows, highs, monte_carlo_count, seed = input
|
||||||
model,
|
|
||||||
dot_inputs,
|
|
||||||
lows,
|
|
||||||
highs,
|
|
||||||
pair_inputs,
|
|
||||||
pair_lows,
|
|
||||||
pair_highs,
|
|
||||||
monte_carlo_count,
|
|
||||||
seed,
|
|
||||||
) = input
|
|
||||||
|
|
||||||
rng = numpy.random.default_rng(seed)
|
rng = numpy.random.default_rng(seed)
|
||||||
# TODO: A long term refactor is to pull the frequency stuff out from here. The None stands for max_frequency, which is unneeded in the actually useful models.
|
# TODO: A long term refactor is to pull the frequency stuff out from here. The None stands for max_frequency, which is unneeded in the actually useful models.
|
||||||
sample_dipoles = model.get_monte_carlo_dipole_inputs(
|
sample_dipoles = model.get_monte_carlo_dipole_inputs(
|
||||||
monte_carlo_count, None, rng_to_use=rng
|
monte_carlo_count, None, rng_to_use=rng
|
||||||
)
|
)
|
||||||
|
vals = pdme.util.fast_v_calc.fast_vs_for_dipoleses(dot_inputs, sample_dipoles)
|
||||||
current_sample = sample_dipoles
|
return numpy.count_nonzero(pdme.util.fast_v_calc.between(vals, lows, highs))
|
||||||
for di, low, high in zip(dot_inputs, lows, highs):
|
|
||||||
|
|
||||||
if len(current_sample) < 1:
|
|
||||||
break
|
|
||||||
vals = pdme.util.fast_v_calc.fast_vs_for_dipoleses(
|
|
||||||
numpy.array([di]), current_sample
|
|
||||||
)
|
|
||||||
|
|
||||||
current_sample = current_sample[numpy.all((vals > low) & (vals < high), axis=1)]
|
|
||||||
|
|
||||||
for pi, plow, phigh in zip(pair_inputs, pair_lows, pair_highs):
|
|
||||||
if len(current_sample) < 1:
|
|
||||||
break
|
|
||||||
vals = pdme.util.fast_nonlocal_spectrum.fast_s_nonlocal_dipoleses(
|
|
||||||
numpy.array([pi]), current_sample
|
|
||||||
)
|
|
||||||
|
|
||||||
current_sample = current_sample[
|
|
||||||
numpy.all(
|
|
||||||
((vals > plow) & (vals < phigh)) | ((vals < plow) & (vals > phigh)),
|
|
||||||
axis=1,
|
|
||||||
)
|
|
||||||
]
|
|
||||||
return len(current_sample)
|
|
||||||
|
|
||||||
|
|
||||||
def get_a_result_fast_filter(input) -> int:
|
def get_a_result_fast_filter(input) -> int:
|
||||||
@ -121,10 +87,7 @@ class RealSpectrumRun:
|
|||||||
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,
|
use_fast_filter: bool = True,
|
||||||
pair_measurements: Optional[
|
|
||||||
Sequence[pdme.measurement.DotPairRangeMeasurement]
|
|
||||||
] = None,
|
|
||||||
) -> 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]
|
||||||
@ -133,21 +96,6 @@ class RealSpectrumRun:
|
|||||||
self.dot_inputs
|
self.dot_inputs
|
||||||
)
|
)
|
||||||
|
|
||||||
if pair_measurements is not None:
|
|
||||||
self.pair_measurements = pair_measurements
|
|
||||||
self.use_pair_measurements = True
|
|
||||||
self.dot_pair_inputs = [
|
|
||||||
(measure.r1, measure.r2, measure.f)
|
|
||||||
for measure in self.pair_measurements
|
|
||||||
]
|
|
||||||
self.dot_pair_inputs_array = (
|
|
||||||
pdme.measurement.input_types.dot_pair_inputs_to_array(
|
|
||||||
self.dot_pair_inputs
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
self.use_pair_measurements = False
|
|
||||||
|
|
||||||
self.models = [model for (_, model) in models_with_names]
|
self.models = [model for (_, model) in models_with_names]
|
||||||
self.model_names = [name for (name, _) in models_with_names]
|
self.model_names = [name for (name, _) in models_with_names]
|
||||||
self.model_count = len(self.models)
|
self.model_count = len(self.models)
|
||||||
@ -168,14 +116,13 @@ class RealSpectrumRun:
|
|||||||
self.probabilities = [1 / self.model_count] * self.model_count
|
self.probabilities = [1 / self.model_count] * self.model_count
|
||||||
|
|
||||||
timestamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
|
timestamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
|
||||||
|
self.use_fast_filter = use_fast_filter
|
||||||
|
ff_string = "no_fast_filter"
|
||||||
|
if self.use_fast_filter:
|
||||||
ff_string = "fast_filter"
|
ff_string = "fast_filter"
|
||||||
|
|
||||||
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")
|
||||||
@ -188,29 +135,16 @@ class RealSpectrumRun:
|
|||||||
self.measurements
|
self.measurements
|
||||||
)
|
)
|
||||||
|
|
||||||
pair_lows = None
|
|
||||||
pair_highs = None
|
|
||||||
if self.use_pair_measurements:
|
|
||||||
(
|
|
||||||
pair_lows,
|
|
||||||
pair_highs,
|
|
||||||
) = pdme.measurement.input_types.dot_range_measurements_low_high_arrays(
|
|
||||||
self.pair_measurements
|
|
||||||
)
|
|
||||||
|
|
||||||
# define a new seed sequence for each run
|
# define a new seed sequence for each run
|
||||||
seed_sequence = numpy.random.SeedSequence(self.initial_seed)
|
seed_sequence = numpy.random.SeedSequence(self.initial_seed)
|
||||||
|
|
||||||
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
|
||||||
@ -228,32 +162,13 @@ class RealSpectrumRun:
|
|||||||
# that way we get more stuff.
|
# that way we get more stuff.
|
||||||
seeds = seed_sequence.spawn(self.monte_carlo_cycles)
|
seeds = seed_sequence.spawn(self.monte_carlo_cycles)
|
||||||
|
|
||||||
if self.use_pair_measurements:
|
if self.use_fast_filter:
|
||||||
current_success = sum(
|
result_func = get_a_result_fast_filter
|
||||||
pool.imap_unordered(
|
|
||||||
get_a_result_fast_filter_pairs,
|
|
||||||
[
|
|
||||||
(
|
|
||||||
model,
|
|
||||||
self.dot_inputs_array,
|
|
||||||
lows,
|
|
||||||
highs,
|
|
||||||
self.dot_pair_inputs_array,
|
|
||||||
pair_lows,
|
|
||||||
pair_highs,
|
|
||||||
self.monte_carlo_count,
|
|
||||||
seed,
|
|
||||||
)
|
|
||||||
for seed in seeds
|
|
||||||
],
|
|
||||||
self.chunksize,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
|
result_func = get_a_result
|
||||||
current_success = sum(
|
current_success = sum(
|
||||||
pool.imap_unordered(
|
pool.imap_unordered(
|
||||||
get_a_result_fast_filter,
|
result_func,
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
model,
|
model,
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
from deepdog.subset_simulation.subset_simulation_impl import SubsetSimulation
|
|
||||||
|
|
||||||
__all__ = ["SubsetSimulation"]
|
|
@ -1,337 +0,0 @@
|
|||||||
import logging
|
|
||||||
import numpy
|
|
||||||
import pdme.measurement
|
|
||||||
import pdme.measurement.input_types
|
|
||||||
import pdme.subspace_simulation
|
|
||||||
from typing import Sequence, Tuple, Optional
|
|
||||||
|
|
||||||
from dataclasses import dataclass
|
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class SubsetSimulationResult:
|
|
||||||
probs_list: Sequence[Tuple]
|
|
||||||
over_target_cost: Optional[float]
|
|
||||||
over_target_likelihood: Optional[float]
|
|
||||||
under_target_cost: Optional[float]
|
|
||||||
under_target_likelihood: Optional[float]
|
|
||||||
lowest_likelihood: Optional[float]
|
|
||||||
|
|
||||||
|
|
||||||
class SubsetSimulation:
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
model_name_pair,
|
|
||||||
dot_inputs,
|
|
||||||
actual_measurements: Sequence[pdme.measurement.DotMeasurement],
|
|
||||||
n_c: int,
|
|
||||||
n_s: int,
|
|
||||||
m_max: int,
|
|
||||||
target_cost: Optional[float] = None,
|
|
||||||
level_0_seed: int = 200,
|
|
||||||
mcmc_seed: int = 20,
|
|
||||||
use_adaptive_steps=True,
|
|
||||||
default_phi_step=0.01,
|
|
||||||
default_theta_step=0.01,
|
|
||||||
default_r_step=0.01,
|
|
||||||
default_w_log_step=0.01,
|
|
||||||
default_upper_w_log_step=4,
|
|
||||||
keep_probs_list=True,
|
|
||||||
dump_last_generation_to_file=False,
|
|
||||||
):
|
|
||||||
name, model = model_name_pair
|
|
||||||
self.model_name = name
|
|
||||||
self.model = model
|
|
||||||
_logger.info(f"got model {self.model_name}")
|
|
||||||
|
|
||||||
self.dot_inputs_array = pdme.measurement.input_types.dot_inputs_to_array(
|
|
||||||
dot_inputs
|
|
||||||
)
|
|
||||||
# _logger.debug(f"actual measurements: {actual_measurements}")
|
|
||||||
self.actual_measurement_array = numpy.array([m.v for m in actual_measurements])
|
|
||||||
|
|
||||||
def cost_function_to_use(dipoles_to_test):
|
|
||||||
return pdme.subspace_simulation.proportional_costs_vs_actual_measurement(
|
|
||||||
self.dot_inputs_array, self.actual_measurement_array, dipoles_to_test
|
|
||||||
)
|
|
||||||
|
|
||||||
self.cost_function_to_use = cost_function_to_use
|
|
||||||
|
|
||||||
self.n_c = n_c
|
|
||||||
self.n_s = n_s
|
|
||||||
self.m_max = m_max
|
|
||||||
|
|
||||||
self.level_0_seed = level_0_seed
|
|
||||||
self.mcmc_seed = mcmc_seed
|
|
||||||
|
|
||||||
self.use_adaptive_steps = use_adaptive_steps
|
|
||||||
self.default_phi_step = default_phi_step
|
|
||||||
self.default_theta_step = default_theta_step
|
|
||||||
self.default_r_step = default_r_step
|
|
||||||
self.default_w_log_step = default_w_log_step
|
|
||||||
self.default_upper_w_log_step = default_upper_w_log_step
|
|
||||||
|
|
||||||
_logger.info("using params:")
|
|
||||||
_logger.info(f"\tn_c: {self.n_c}")
|
|
||||||
_logger.info(f"\tn_s: {self.n_s}")
|
|
||||||
_logger.info(f"\tm: {self.m_max}")
|
|
||||||
_logger.info("let's do level 0...")
|
|
||||||
|
|
||||||
self.target_cost = target_cost
|
|
||||||
_logger.info(f"will stop at target cost {target_cost}")
|
|
||||||
|
|
||||||
self.keep_probs_list = keep_probs_list
|
|
||||||
self.dump_last_generations = dump_last_generation_to_file
|
|
||||||
|
|
||||||
def execute(self) -> SubsetSimulationResult:
|
|
||||||
|
|
||||||
probs_list = []
|
|
||||||
|
|
||||||
sample_dipoles = self.model.get_monte_carlo_dipole_inputs(
|
|
||||||
self.n_c * self.n_s,
|
|
||||||
-1,
|
|
||||||
rng_to_use=numpy.random.default_rng(self.level_0_seed),
|
|
||||||
)
|
|
||||||
# _logger.debug(sample_dipoles)
|
|
||||||
# _logger.debug(sample_dipoles.shape)
|
|
||||||
costs = self.cost_function_to_use(sample_dipoles)
|
|
||||||
|
|
||||||
_logger.debug(f"costs: {costs}")
|
|
||||||
sorted_indexes = costs.argsort()[::-1]
|
|
||||||
|
|
||||||
_logger.debug(costs[sorted_indexes])
|
|
||||||
_logger.debug(sample_dipoles[sorted_indexes])
|
|
||||||
|
|
||||||
sorted_costs = costs[sorted_indexes]
|
|
||||||
sorted_dipoles = sample_dipoles[sorted_indexes]
|
|
||||||
|
|
||||||
threshold_cost = sorted_costs[-self.n_c]
|
|
||||||
|
|
||||||
all_dipoles = numpy.array(
|
|
||||||
[
|
|
||||||
pdme.subspace_simulation.sort_array_of_dipoles_by_frequency(samp)
|
|
||||||
for samp in sorted_dipoles
|
|
||||||
]
|
|
||||||
)
|
|
||||||
all_chains = list(zip(sorted_costs, all_dipoles))
|
|
||||||
|
|
||||||
mcmc_rng = numpy.random.default_rng(self.mcmc_seed)
|
|
||||||
|
|
||||||
for i in range(self.m_max):
|
|
||||||
next_seeds = all_chains[-self.n_c:]
|
|
||||||
|
|
||||||
if self.dump_last_generations:
|
|
||||||
_logger.info("writing out csv file")
|
|
||||||
next_dipoles_seed_dipoles = numpy.array([n[1] for n in next_seeds])
|
|
||||||
for n in range(self.model.n):
|
|
||||||
_logger.info(f"{next_dipoles_seed_dipoles[:, n].shape}")
|
|
||||||
numpy.savetxt(
|
|
||||||
f"generation_{self.n_c}_{self.n_s}_{i}_dipole_{n}.csv",
|
|
||||||
next_dipoles_seed_dipoles[:, n],
|
|
||||||
delimiter=",",
|
|
||||||
)
|
|
||||||
|
|
||||||
if self.keep_probs_list:
|
|
||||||
for cost_index, cost_chain in enumerate(all_chains[: -self.n_c]):
|
|
||||||
probs_list.append(
|
|
||||||
(
|
|
||||||
((self.n_c * self.n_s - cost_index) / (self.n_c * self.n_s))
|
|
||||||
/ (self.n_s ** (i)),
|
|
||||||
cost_chain[0],
|
|
||||||
i + 1,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
next_seeds_as_array = numpy.array([s for _, s in next_seeds])
|
|
||||||
|
|
||||||
stdevs = self.get_stdevs_from_arrays(next_seeds_as_array)
|
|
||||||
_logger.info(f"got stdevs: {stdevs.stdevs}")
|
|
||||||
|
|
||||||
all_chains = []
|
|
||||||
for c, s in next_seeds:
|
|
||||||
# chain = mcmc(s, threshold_cost, n_s, model, dot_inputs_array, actual_measurement_array, mcmc_rng, curr_cost=c, stdevs=stdevs)
|
|
||||||
# until new version gotta do
|
|
||||||
chain = self.model.get_mcmc_chain(
|
|
||||||
s,
|
|
||||||
self.cost_function_to_use,
|
|
||||||
self.n_s,
|
|
||||||
threshold_cost,
|
|
||||||
stdevs,
|
|
||||||
initial_cost=c,
|
|
||||||
rng_arg=mcmc_rng,
|
|
||||||
)
|
|
||||||
for cost, chained in chain:
|
|
||||||
try:
|
|
||||||
filtered_cost = cost[0]
|
|
||||||
except IndexError:
|
|
||||||
filtered_cost = cost
|
|
||||||
all_chains.append((filtered_cost, chained))
|
|
||||||
|
|
||||||
# _logger.debug(all_chains)
|
|
||||||
|
|
||||||
all_chains.sort(key=lambda c: c[0], reverse=True)
|
|
||||||
|
|
||||||
threshold_cost = all_chains[-self.n_c][0]
|
|
||||||
_logger.info(
|
|
||||||
f"current threshold cost: {threshold_cost}, at P = (1 / {self.n_s})^{i + 1}"
|
|
||||||
)
|
|
||||||
if (self.target_cost is not None) and (threshold_cost < self.target_cost):
|
|
||||||
_logger.info(
|
|
||||||
f"got a threshold cost {threshold_cost}, less than {self.target_cost}. will leave early"
|
|
||||||
)
|
|
||||||
|
|
||||||
cost_list = [c[0] for c in all_chains]
|
|
||||||
over_index = reverse_bisect_right(cost_list, self.target_cost)
|
|
||||||
|
|
||||||
shorter_probs_list = []
|
|
||||||
for cost_index, cost_chain in enumerate(all_chains):
|
|
||||||
if self.keep_probs_list:
|
|
||||||
probs_list.append(
|
|
||||||
(
|
|
||||||
(
|
|
||||||
(self.n_c * self.n_s - cost_index)
|
|
||||||
/ (self.n_c * self.n_s)
|
|
||||||
)
|
|
||||||
/ (self.n_s ** (i)),
|
|
||||||
cost_chain[0],
|
|
||||||
i + 1,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
shorter_probs_list.append(
|
|
||||||
(
|
|
||||||
cost_chain[0],
|
|
||||||
((self.n_c * self.n_s - cost_index) / (self.n_c * self.n_s))
|
|
||||||
/ (self.n_s ** (i)),
|
|
||||||
)
|
|
||||||
)
|
|
||||||
# _logger.info(shorter_probs_list)
|
|
||||||
result = SubsetSimulationResult(
|
|
||||||
probs_list=probs_list,
|
|
||||||
over_target_cost=shorter_probs_list[over_index - 1][0],
|
|
||||||
over_target_likelihood=shorter_probs_list[over_index - 1][1],
|
|
||||||
under_target_cost=shorter_probs_list[over_index][0],
|
|
||||||
under_target_likelihood=shorter_probs_list[over_index][1],
|
|
||||||
lowest_likelihood=shorter_probs_list[-1][1],
|
|
||||||
)
|
|
||||||
return result
|
|
||||||
|
|
||||||
# _logger.debug([c[0] for c in all_chains[-n_c:]])
|
|
||||||
_logger.info(f"doing level {i + 1}")
|
|
||||||
|
|
||||||
if self.keep_probs_list:
|
|
||||||
for cost_index, cost_chain in enumerate(all_chains):
|
|
||||||
probs_list.append(
|
|
||||||
(
|
|
||||||
((self.n_c * self.n_s - cost_index) / (self.n_c * self.n_s))
|
|
||||||
/ (self.n_s ** (self.m_max)),
|
|
||||||
cost_chain[0],
|
|
||||||
self.m_max + 1,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
threshold_cost = all_chains[-self.n_c][0]
|
|
||||||
_logger.info(
|
|
||||||
f"final threshold cost: {threshold_cost}, at P = (1 / {self.n_s})^{self.m_max + 1}"
|
|
||||||
)
|
|
||||||
for a in all_chains[-10:]:
|
|
||||||
_logger.info(a)
|
|
||||||
# for prob, prob_cost in probs_list:
|
|
||||||
# _logger.info(f"\t{prob}: {prob_cost}")
|
|
||||||
probs_list.sort(key=lambda c: c[0], reverse=True)
|
|
||||||
|
|
||||||
min_likelihood = ((1) / (self.n_c * self.n_s)) / (self.n_s ** (self.m_max + 1))
|
|
||||||
|
|
||||||
result = SubsetSimulationResult(
|
|
||||||
probs_list=probs_list,
|
|
||||||
over_target_cost=None,
|
|
||||||
over_target_likelihood=None,
|
|
||||||
under_target_cost=None,
|
|
||||||
under_target_likelihood=None,
|
|
||||||
lowest_likelihood=min_likelihood,
|
|
||||||
)
|
|
||||||
return result
|
|
||||||
|
|
||||||
def get_stdevs_from_arrays(
|
|
||||||
self, array
|
|
||||||
) -> pdme.subspace_simulation.MCMCStandardDeviation:
|
|
||||||
# stdevs = get_stdevs_from_arrays(next_seeds_as_array, model)
|
|
||||||
if self.use_adaptive_steps:
|
|
||||||
|
|
||||||
stdev_array = []
|
|
||||||
count = array.shape[1]
|
|
||||||
for dipole_index in range(count):
|
|
||||||
selected = array[:, dipole_index]
|
|
||||||
pxs = selected[:, 0]
|
|
||||||
pys = selected[:, 1]
|
|
||||||
pzs = selected[:, 2]
|
|
||||||
thetas = numpy.arccos(pzs / self.model.pfixed)
|
|
||||||
phis = numpy.arctan2(pys, pxs)
|
|
||||||
|
|
||||||
rstdevs = numpy.maximum(
|
|
||||||
numpy.std(selected, axis=0)[3:6],
|
|
||||||
self.default_r_step / (self.n_s * 10),
|
|
||||||
)
|
|
||||||
frequency_stdevs = numpy.minimum(
|
|
||||||
numpy.maximum(
|
|
||||||
numpy.std(numpy.log(selected[:, -1])),
|
|
||||||
self.default_w_log_step / (self.n_s * 10),
|
|
||||||
),
|
|
||||||
self.default_upper_w_log_step,
|
|
||||||
)
|
|
||||||
stdev_array.append(
|
|
||||||
pdme.subspace_simulation.DipoleStandardDeviation(
|
|
||||||
p_theta_step=max(
|
|
||||||
numpy.std(thetas), self.default_theta_step / (self.n_s * 10)
|
|
||||||
),
|
|
||||||
p_phi_step=max(
|
|
||||||
numpy.std(phis), self.default_phi_step / (self.n_s * 10)
|
|
||||||
),
|
|
||||||
rx_step=rstdevs[0],
|
|
||||||
ry_step=rstdevs[1],
|
|
||||||
rz_step=rstdevs[2],
|
|
||||||
w_log_step=frequency_stdevs,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
default_stdev = pdme.subspace_simulation.DipoleStandardDeviation(
|
|
||||||
self.default_phi_step,
|
|
||||||
self.default_theta_step,
|
|
||||||
self.default_r_step,
|
|
||||||
self.default_r_step,
|
|
||||||
self.default_r_step,
|
|
||||||
self.default_w_log_step,
|
|
||||||
)
|
|
||||||
stdev_array = [default_stdev]
|
|
||||||
stdevs = pdme.subspace_simulation.MCMCStandardDeviation(stdev_array)
|
|
||||||
return stdevs
|
|
||||||
|
|
||||||
|
|
||||||
def reverse_bisect_right(a, x, lo=0, hi=None):
|
|
||||||
"""Return the index where to insert item x in list a, assuming a is sorted in descending order.
|
|
||||||
|
|
||||||
The return value i is such that all e in a[:i] have e >= x, and all e in
|
|
||||||
a[i:] have e < x. So if x already appears in the list, a.insert(x) will
|
|
||||||
insert just after the rightmost x already there.
|
|
||||||
|
|
||||||
Optional args lo (default 0) and hi (default len(a)) bound the
|
|
||||||
slice of a to be searched.
|
|
||||||
|
|
||||||
Essentially, the function returns number of elements in a which are >= than x.
|
|
||||||
>>> a = [8, 6, 5, 4, 2]
|
|
||||||
>>> reverse_bisect_right(a, 5)
|
|
||||||
3
|
|
||||||
>>> a[:reverse_bisect_right(a, 5)]
|
|
||||||
[8, 6, 5]
|
|
||||||
"""
|
|
||||||
if lo < 0:
|
|
||||||
raise ValueError("lo must be non-negative")
|
|
||||||
if hi is None:
|
|
||||||
hi = len(a)
|
|
||||||
while lo < hi:
|
|
||||||
mid = (lo + hi) // 2
|
|
||||||
if x > a[mid]:
|
|
||||||
hi = mid
|
|
||||||
else:
|
|
||||||
lo = mid + 1
|
|
||||||
return lo
|
|
@ -1,231 +0,0 @@
|
|||||||
import pdme.inputs
|
|
||||||
import pdme.model
|
|
||||||
import pdme.measurement
|
|
||||||
import pdme.measurement.input_types
|
|
||||||
import pdme.measurement.oscillating_dipole
|
|
||||||
import pdme.util.fast_v_calc
|
|
||||||
import pdme.util.fast_nonlocal_spectrum
|
|
||||||
from typing import Sequence, Tuple, List, Dict, Union, Mapping
|
|
||||||
import datetime
|
|
||||||
import csv
|
|
||||||
import multiprocessing
|
|
||||||
import logging
|
|
||||||
import numpy
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: remove hardcode
|
|
||||||
CHUNKSIZE = 50
|
|
||||||
|
|
||||||
|
|
||||||
_logger = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
def get_a_result_fast_filter(input) -> int:
|
|
||||||
# (
|
|
||||||
# model,
|
|
||||||
# self.dot_inputs_array_dict,
|
|
||||||
# low_high_dict,
|
|
||||||
# self.monte_carlo_count,
|
|
||||||
# seed,
|
|
||||||
# )
|
|
||||||
model, dot_inputs_dict, low_high_dict, monte_carlo_count, seed = input
|
|
||||||
|
|
||||||
rng = numpy.random.default_rng(seed)
|
|
||||||
# TODO: A long term refactor is to pull the frequency stuff out from here. The None stands for max_frequency, which is unneeded in the actually useful models.
|
|
||||||
sample_dipoles = model.get_monte_carlo_dipole_inputs(
|
|
||||||
monte_carlo_count, None, rng_to_use=rng
|
|
||||||
)
|
|
||||||
|
|
||||||
current_sample = sample_dipoles
|
|
||||||
for temp in dot_inputs_dict.keys():
|
|
||||||
dot_inputs = dot_inputs_dict[temp]
|
|
||||||
lows, highs = low_high_dict[temp]
|
|
||||||
for di, low, high in zip(dot_inputs, lows, highs):
|
|
||||||
|
|
||||||
if len(current_sample) < 1:
|
|
||||||
break
|
|
||||||
vals = pdme.util.fast_v_calc.fast_vs_for_asymmetric_dipoleses(
|
|
||||||
numpy.array([di]), current_sample, temp
|
|
||||||
)
|
|
||||||
|
|
||||||
current_sample = current_sample[
|
|
||||||
numpy.all((vals > low) & (vals < high), axis=1)
|
|
||||||
]
|
|
||||||
return len(current_sample)
|
|
||||||
|
|
||||||
|
|
||||||
class TempAwareRealSpectrumRun:
|
|
||||||
"""
|
|
||||||
A bayes run given some real data, with potentially variable temperature.
|
|
||||||
|
|
||||||
Parameters
|
|
||||||
----------
|
|
||||||
measurements_dict : Dict[float, Sequence[pdme.measurement.DotRangeMeasurement]]
|
|
||||||
The dot inputs for this bayes run, in a dictionary indexed by temperatures
|
|
||||||
|
|
||||||
models_with_names : models_with_names: Sequence[Tuple[str, pdme.model.DipoleModel]],
|
|
||||||
|
|
||||||
The models to evaluate.
|
|
||||||
|
|
||||||
actual_model : pdme.model.DipoleModel
|
|
||||||
The model which is actually correct.
|
|
||||||
|
|
||||||
filename_slug : str
|
|
||||||
The filename slug to include.
|
|
||||||
|
|
||||||
run_count: int
|
|
||||||
The number of runs to do.
|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(
|
|
||||||
self,
|
|
||||||
measurements_dict: Mapping[
|
|
||||||
float, Sequence[pdme.measurement.DotRangeMeasurement]
|
|
||||||
],
|
|
||||||
models_with_names: Sequence[Tuple[str, pdme.model.DipoleModel]],
|
|
||||||
filename_slug: str,
|
|
||||||
monte_carlo_count: int = 10000,
|
|
||||||
monte_carlo_cycles: int = 10,
|
|
||||||
target_success: int = 100,
|
|
||||||
max_monte_carlo_cycles_steps: int = 10,
|
|
||||||
chunksize: int = CHUNKSIZE,
|
|
||||||
initial_seed: int = 12345,
|
|
||||||
cap_core_count: int = 0,
|
|
||||||
) -> None:
|
|
||||||
self.measurements_dict = measurements_dict
|
|
||||||
self.dot_inputs_dict = {
|
|
||||||
k: [(measure.r, measure.f) for measure in measurements]
|
|
||||||
for k, measurements in measurements_dict.items()
|
|
||||||
}
|
|
||||||
|
|
||||||
self.dot_inputs_array_dict = {
|
|
||||||
k: pdme.measurement.input_types.dot_inputs_to_array(dot_inputs)
|
|
||||||
for k, dot_inputs in self.dot_inputs_dict.items()
|
|
||||||
}
|
|
||||||
|
|
||||||
self.models = [model for (_, model) in models_with_names]
|
|
||||||
self.model_names = [name for (name, _) in models_with_names]
|
|
||||||
self.model_count = len(self.models)
|
|
||||||
|
|
||||||
self.monte_carlo_count = monte_carlo_count
|
|
||||||
self.monte_carlo_cycles = monte_carlo_cycles
|
|
||||||
self.target_success = target_success
|
|
||||||
self.max_monte_carlo_cycles_steps = max_monte_carlo_cycles_steps
|
|
||||||
|
|
||||||
self.csv_fields = []
|
|
||||||
|
|
||||||
self.compensate_zeros = True
|
|
||||||
self.chunksize = chunksize
|
|
||||||
for name in self.model_names:
|
|
||||||
self.csv_fields.extend([f"{name}_success", f"{name}_count", f"{name}_prob"])
|
|
||||||
|
|
||||||
# for now initialise priors as uniform.
|
|
||||||
self.probabilities = [1 / self.model_count] * self.model_count
|
|
||||||
|
|
||||||
timestamp = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
|
|
||||||
ff_string = "fast_filter"
|
|
||||||
self.filename = f"{timestamp}-{filename_slug}.realdata.{ff_string}.bayesrun.csv"
|
|
||||||
self.initial_seed = initial_seed
|
|
||||||
|
|
||||||
self.cap_core_count = cap_core_count
|
|
||||||
|
|
||||||
def go(self) -> None:
|
|
||||||
with open(self.filename, "a", newline="") as outfile:
|
|
||||||
writer = csv.DictWriter(outfile, fieldnames=self.csv_fields, dialect="unix")
|
|
||||||
writer.writeheader()
|
|
||||||
|
|
||||||
low_high_dict = {}
|
|
||||||
for temp, measurements in self.measurements_dict.items():
|
|
||||||
(
|
|
||||||
lows,
|
|
||||||
highs,
|
|
||||||
) = pdme.measurement.input_types.dot_range_measurements_low_high_arrays(
|
|
||||||
measurements
|
|
||||||
)
|
|
||||||
low_high_dict[temp] = (lows, highs)
|
|
||||||
|
|
||||||
# define a new seed sequence for each run
|
|
||||||
seed_sequence = numpy.random.SeedSequence(self.initial_seed)
|
|
||||||
|
|
||||||
results = []
|
|
||||||
_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(
|
|
||||||
zip(self.models, self.model_names)
|
|
||||||
):
|
|
||||||
_logger.debug(f"Doing model #{model_count}: {model_name}")
|
|
||||||
with multiprocessing.Pool(core_count) as pool:
|
|
||||||
cycle_count = 0
|
|
||||||
cycle_success = 0
|
|
||||||
cycles = 0
|
|
||||||
while (cycles < self.max_monte_carlo_cycles_steps) and (
|
|
||||||
cycle_success <= self.target_success
|
|
||||||
):
|
|
||||||
_logger.debug(f"Starting cycle {cycles}")
|
|
||||||
cycles += 1
|
|
||||||
current_success = 0
|
|
||||||
cycle_count += self.monte_carlo_count * self.monte_carlo_cycles
|
|
||||||
|
|
||||||
# generate a seed from the sequence for each core.
|
|
||||||
# note this needs to be inside the loop for monte carlo cycle steps!
|
|
||||||
# that way we get more stuff.
|
|
||||||
seeds = seed_sequence.spawn(self.monte_carlo_cycles)
|
|
||||||
|
|
||||||
result_func = get_a_result_fast_filter
|
|
||||||
|
|
||||||
current_success = sum(
|
|
||||||
pool.imap_unordered(
|
|
||||||
result_func,
|
|
||||||
[
|
|
||||||
(
|
|
||||||
model,
|
|
||||||
self.dot_inputs_array_dict,
|
|
||||||
low_high_dict,
|
|
||||||
self.monte_carlo_count,
|
|
||||||
seed,
|
|
||||||
)
|
|
||||||
for seed in seeds
|
|
||||||
],
|
|
||||||
self.chunksize,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
cycle_success += current_success
|
|
||||||
_logger.debug(f"current running successes: {cycle_success}")
|
|
||||||
results.append((cycle_count, cycle_success))
|
|
||||||
|
|
||||||
_logger.debug("Done, constructing output now")
|
|
||||||
row: Dict[str, Union[int, float, str]] = {}
|
|
||||||
|
|
||||||
successes: List[float] = []
|
|
||||||
counts: List[int] = []
|
|
||||||
for model_index, (name, (count, result)) in enumerate(
|
|
||||||
zip(self.model_names, results)
|
|
||||||
):
|
|
||||||
|
|
||||||
row[f"{name}_success"] = result
|
|
||||||
row[f"{name}_count"] = count
|
|
||||||
successes.append(max(result, 0.5))
|
|
||||||
counts.append(count)
|
|
||||||
|
|
||||||
success_weight = sum(
|
|
||||||
[
|
|
||||||
(succ / count) * prob
|
|
||||||
for succ, count, prob in zip(successes, counts, self.probabilities)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
new_probabilities = [
|
|
||||||
(succ / count) * old_prob / success_weight
|
|
||||||
for succ, count, old_prob in zip(successes, counts, self.probabilities)
|
|
||||||
]
|
|
||||||
self.probabilities = new_probabilities
|
|
||||||
for name, probability in zip(self.model_names, self.probabilities):
|
|
||||||
row[f"{name}_prob"] = probability
|
|
||||||
_logger.info(row)
|
|
||||||
|
|
||||||
with open(self.filename, "a", newline="") as outfile:
|
|
||||||
writer = csv.DictWriter(outfile, fieldnames=self.csv_fields, dialect="unix")
|
|
||||||
writer.writerow(row)
|
|
@ -1,11 +1,9 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Pod
|
kind: Pod
|
||||||
spec:
|
spec:
|
||||||
imagePullSecrets:
|
|
||||||
- name: regcreds
|
|
||||||
containers: # list of containers that you want present for your build, you can define a default container in the Jenkinsfile
|
containers: # list of containers that you want present for your build, you can define a default container in the Jenkinsfile
|
||||||
- name: poetry
|
- name: python
|
||||||
image: ghcr.io/dmallubhotla/poetry-image:1
|
image: python:3.8
|
||||||
command: ["tail", "-f", "/dev/null"] # this or any command that is bascially a noop is required, this is so that you don't overwrite the entrypoint of the base container
|
command: ["tail", "-f", "/dev/null"] # this or any command that is bascially a noop is required, this is so that you don't overwrite the entrypoint of the base container
|
||||||
imagePullPolicy: Always # use cache or pull image for agent
|
imagePullPolicy: Always # use cache or pull image for agent
|
||||||
resources: # limits the resources your build contaienr
|
resources: # limits the resources your build contaienr
|
||||||
|
361
poetry.lock
generated
361
poetry.lock
generated
@ -1,17 +1,39 @@
|
|||||||
|
[[package]]
|
||||||
|
name = "atomicwrites"
|
||||||
|
version = "1.4.0"
|
||||||
|
description = "Atomic file writes."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "attrs"
|
||||||
|
version = "21.4.0"
|
||||||
|
description = "Classes Without Boilerplate"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"]
|
||||||
|
docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"]
|
||||||
|
tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"]
|
||||||
|
tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "black"
|
name = "black"
|
||||||
version = "22.12.0"
|
version = "22.3.0"
|
||||||
description = "The uncompromising code formatter."
|
description = "The uncompromising code formatter."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.6.2"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
click = ">=8.0.0"
|
click = ">=8.0.0"
|
||||||
mypy-extensions = ">=0.4.3"
|
mypy-extensions = ">=0.4.3"
|
||||||
pathspec = ">=0.9.0"
|
pathspec = ">=0.9.0"
|
||||||
platformdirs = ">=2"
|
platformdirs = ">=2"
|
||||||
tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""}
|
tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""}
|
||||||
typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}
|
typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
@ -22,7 +44,7 @@ uvloop = ["uvloop (>=0.15.2)"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bleach"
|
name = "bleach"
|
||||||
version = "6.0.0"
|
version = "5.0.0"
|
||||||
description = "An easy safelist-based HTML-sanitizing tool."
|
description = "An easy safelist-based HTML-sanitizing tool."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -33,11 +55,12 @@ six = ">=1.9.0"
|
|||||||
webencodings = "*"
|
webencodings = "*"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
css = ["tinycss2 (>=1.1.0,<1.2)"]
|
css = ["tinycss2 (>=1.1.0)"]
|
||||||
|
dev = ["pip-tools (==6.5.1)", "pytest (==7.1.1)", "flake8 (==4.0.1)", "tox (==3.24.5)", "sphinx (==4.3.2)", "twine (==4.0.0)", "wheel (==0.37.1)", "hashin (==0.17.0)", "black (==22.3.0)", "mypy (==0.942)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "certifi"
|
name = "certifi"
|
||||||
version = "2022.12.7"
|
version = "2022.5.18.1"
|
||||||
description = "Python package for providing Mozilla's CA Bundle."
|
description = "Python package for providing Mozilla's CA Bundle."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -45,7 +68,7 @@ python-versions = ">=3.6"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cffi"
|
name = "cffi"
|
||||||
version = "1.15.1"
|
version = "1.15.0"
|
||||||
description = "Foreign Function Interface for Python calling C code."
|
description = "Foreign Function Interface for Python calling C code."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -56,11 +79,14 @@ pycparser = "*"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "charset-normalizer"
|
name = "charset-normalizer"
|
||||||
version = "3.1.0"
|
version = "2.0.12"
|
||||||
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
|
description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7.0"
|
python-versions = ">=3.5.0"
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
unicode_backport = ["unicodedata2"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "click"
|
name = "click"
|
||||||
@ -86,15 +112,15 @@ click = "*"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "colorama"
|
name = "colorama"
|
||||||
version = "0.4.6"
|
version = "0.4.4"
|
||||||
description = "Cross-platform colored terminal text."
|
description = "Cross-platform colored terminal text."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "coverage"
|
name = "coverage"
|
||||||
version = "7.2.7"
|
version = "6.4.2"
|
||||||
description = "Code coverage measurement for Python"
|
description = "Code coverage measurement for Python"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -108,7 +134,7 @@ toml = ["tomli"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cryptography"
|
name = "cryptography"
|
||||||
version = "40.0.1"
|
version = "37.0.2"
|
||||||
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -118,41 +144,31 @@ python-versions = ">=3.6"
|
|||||||
cffi = ">=1.12"
|
cffi = ">=1.12"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"]
|
docs = ["sphinx (>=1.6.5,!=1.8.0,!=3.1.0,!=3.1.1)", "sphinx-rtd-theme"]
|
||||||
docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"]
|
docstest = ["pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"]
|
||||||
pep8test = ["black", "ruff", "mypy", "check-manifest"]
|
pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"]
|
||||||
sdist = ["setuptools-rust (>=0.11.4)"]
|
sdist = ["setuptools_rust (>=0.11.4)"]
|
||||||
ssh = ["bcrypt (>=3.1.5)"]
|
ssh = ["bcrypt (>=3.1.5)"]
|
||||||
test = ["pytest (>=6.2.0)", "pytest-shard (>=0.1.2)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601"]
|
test = ["pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,!=3.79.2)"]
|
||||||
test-randomorder = ["pytest-randomly"]
|
|
||||||
tox = ["tox"]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "docutils"
|
name = "docutils"
|
||||||
version = "0.19"
|
version = "0.18.1"
|
||||||
description = "Docutils -- Python Documentation Utilities"
|
description = "Docutils -- Python Documentation Utilities"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dotty-dict"
|
name = "dotty-dict"
|
||||||
version = "1.3.1"
|
version = "1.3.0"
|
||||||
description = "Dictionary wrapper for quick access to deeply nested keys."
|
description = "Dictionary wrapper for quick access to deeply nested keys."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.5,<4.0"
|
python-versions = "*"
|
||||||
|
|
||||||
[[package]]
|
[package.dependencies]
|
||||||
name = "exceptiongroup"
|
setuptools_scm = "*"
|
||||||
version = "1.1.1"
|
|
||||||
description = "Backport of PEP 654 (exception groups)"
|
|
||||||
category = "dev"
|
|
||||||
optional = false
|
|
||||||
python-versions = ">=3.7"
|
|
||||||
|
|
||||||
[package.extras]
|
|
||||||
test = ["pytest (>=6)"]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "flake8"
|
name = "flake8"
|
||||||
@ -169,19 +185,19 @@ pyflakes = ">=2.4.0,<2.5.0"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gitdb"
|
name = "gitdb"
|
||||||
version = "4.0.10"
|
version = "4.0.9"
|
||||||
description = "Git Object Database"
|
description = "Git Object Database"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.6"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
smmap = ">=3.0.1,<6"
|
smmap = ">=3.0.1,<6"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gitpython"
|
name = "gitpython"
|
||||||
version = "3.1.31"
|
version = "3.1.27"
|
||||||
description = "GitPython is a Python library used to interact with Git repositories"
|
description = "GitPython is a python library used to interact with Git repositories"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
@ -191,7 +207,7 @@ gitdb = ">=4.0.1,<5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "idna"
|
name = "idna"
|
||||||
version = "3.4"
|
version = "3.3"
|
||||||
description = "Internationalized Domain Names in Applications (IDNA)"
|
description = "Internationalized Domain Names in Applications (IDNA)"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -199,7 +215,7 @@ python-versions = ">=3.5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "importlib-metadata"
|
name = "importlib-metadata"
|
||||||
version = "6.2.1"
|
version = "4.11.4"
|
||||||
description = "Read metadata from Python packages"
|
description = "Read metadata from Python packages"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -209,55 +225,25 @@ python-versions = ">=3.7"
|
|||||||
zipp = ">=0.5"
|
zipp = ">=0.5"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"]
|
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
|
||||||
perf = ["ipython"]
|
perf = ["ipython"]
|
||||||
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8", "importlib-resources (>=1.3)"]
|
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "importlib-resources"
|
|
||||||
version = "5.12.0"
|
|
||||||
description = "Read resources from Python packages"
|
|
||||||
category = "dev"
|
|
||||||
optional = false
|
|
||||||
python-versions = ">=3.7"
|
|
||||||
|
|
||||||
[package.dependencies]
|
|
||||||
zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""}
|
|
||||||
|
|
||||||
[package.extras]
|
|
||||||
docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"]
|
|
||||||
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "iniconfig"
|
name = "iniconfig"
|
||||||
version = "2.0.0"
|
version = "1.1.1"
|
||||||
description = "brain-dead simple config-ini parsing"
|
description = "iniconfig: brain-dead simple config-ini parsing"
|
||||||
category = "dev"
|
|
||||||
optional = false
|
|
||||||
python-versions = ">=3.7"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "invoke"
|
|
||||||
version = "1.7.3"
|
|
||||||
description = "Pythonic task execution"
|
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jaraco.classes"
|
name = "invoke"
|
||||||
version = "3.2.3"
|
version = "1.7.1"
|
||||||
description = "Utility functions for Python class constructs"
|
description = "Pythonic task execution"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = "*"
|
||||||
|
|
||||||
[package.dependencies]
|
|
||||||
more-itertools = "*"
|
|
||||||
|
|
||||||
[package.extras]
|
|
||||||
docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"]
|
|
||||||
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jeepney"
|
name = "jeepney"
|
||||||
@ -273,24 +259,21 @@ trio = ["trio", "async-generator"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "keyring"
|
name = "keyring"
|
||||||
version = "23.13.1"
|
version = "23.6.0"
|
||||||
description = "Store and access your passwords safely."
|
description = "Store and access your passwords safely."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
importlib-metadata = {version = ">=4.11.4", markers = "python_version < \"3.12\""}
|
importlib-metadata = {version = ">=3.6", markers = "python_version < \"3.10\""}
|
||||||
importlib-resources = {version = "*", markers = "python_version < \"3.9\""}
|
|
||||||
"jaraco.classes" = "*"
|
|
||||||
jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""}
|
jeepney = {version = ">=0.4.2", markers = "sys_platform == \"linux\""}
|
||||||
pywin32-ctypes = {version = ">=0.2.0", markers = "sys_platform == \"win32\""}
|
pywin32-ctypes = {version = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1", markers = "sys_platform == \"win32\""}
|
||||||
SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""}
|
SecretStorage = {version = ">=3.2", markers = "sys_platform == \"linux\""}
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
completion = ["shtab"]
|
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"]
|
||||||
docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "jaraco.tidelift (>=1.4)"]
|
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
|
||||||
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mccabe"
|
name = "mccabe"
|
||||||
@ -300,14 +283,6 @@ category = "dev"
|
|||||||
optional = false
|
optional = false
|
||||||
python-versions = "*"
|
python-versions = "*"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "more-itertools"
|
|
||||||
version = "9.1.0"
|
|
||||||
description = "More routines for operating on iterables, beyond itertools"
|
|
||||||
category = "dev"
|
|
||||||
optional = false
|
|
||||||
python-versions = ">=3.7"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mypy"
|
name = "mypy"
|
||||||
version = "0.971"
|
version = "0.971"
|
||||||
@ -328,11 +303,11 @@ reports = ["lxml"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mypy-extensions"
|
name = "mypy-extensions"
|
||||||
version = "1.0.0"
|
version = "0.4.3"
|
||||||
description = "Type system extensions for programs checked with the mypy type checker."
|
description = "Experimental type system extensions for programs checked with the mypy typechecker."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.5"
|
python-versions = "*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "numpy"
|
name = "numpy"
|
||||||
@ -344,54 +319,57 @@ python-versions = ">=3.8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "packaging"
|
name = "packaging"
|
||||||
version = "23.0"
|
version = "21.3"
|
||||||
description = "Core utilities for Python packages"
|
description = "Core utilities for Python packages"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pathspec"
|
|
||||||
version = "0.11.1"
|
|
||||||
description = "Utility library for gitignore style pattern matching of file paths."
|
|
||||||
category = "dev"
|
|
||||||
optional = false
|
|
||||||
python-versions = ">=3.7"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pdme"
|
|
||||||
version = "0.9.1"
|
|
||||||
description = "Python dipole model evaluator"
|
|
||||||
category = "main"
|
|
||||||
optional = false
|
|
||||||
python-versions = ">=3.8.1,<3.10"
|
|
||||||
|
|
||||||
[package.dependencies]
|
|
||||||
numpy = ">=1.22.3,<2.0.0"
|
|
||||||
scipy = ">=1.10,<1.11"
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pkginfo"
|
|
||||||
version = "1.9.6"
|
|
||||||
description = "Query metadata from sdists / bdists / installed packages."
|
|
||||||
category = "dev"
|
|
||||||
optional = false
|
|
||||||
python-versions = ">=3.6"
|
python-versions = ">=3.6"
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
pyparsing = ">=2.0.2,<3.0.5 || >3.0.5"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pathspec"
|
||||||
|
version = "0.9.0"
|
||||||
|
description = "Utility library for gitignore style pattern matching of file paths."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pdme"
|
||||||
|
version = "0.8.6"
|
||||||
|
description = "Python dipole model evaluator"
|
||||||
|
category = "main"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.8,<3.10"
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
numpy = ">=1.22.3,<2.0.0"
|
||||||
|
scipy = ">=1.8,<1.9"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pkginfo"
|
||||||
|
version = "1.8.3"
|
||||||
|
description = "Query metadatdata from sdists / bdists / installed packages."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
testing = ["pytest", "pytest-cov"]
|
testing = ["nose", "coverage"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "platformdirs"
|
name = "platformdirs"
|
||||||
version = "3.2.0"
|
version = "2.5.2"
|
||||||
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
|
description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx-autodoc-typehints (>=1.22,!=1.23.4)", "sphinx (>=6.1.3)"]
|
docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"]
|
||||||
test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest-cov (>=4)", "pytest-mock (>=3.10)", "pytest (>=7.2.2)"]
|
test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pluggy"
|
name = "pluggy"
|
||||||
@ -405,6 +383,14 @@ python-versions = ">=3.6"
|
|||||||
dev = ["pre-commit", "tox"]
|
dev = ["pre-commit", "tox"]
|
||||||
testing = ["pytest", "pytest-benchmark"]
|
testing = ["pytest", "pytest-benchmark"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "py"
|
||||||
|
version = "1.11.0"
|
||||||
|
description = "library with cross-python path, ini-parsing, io, code, log facilities"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pycodestyle"
|
name = "pycodestyle"
|
||||||
version = "2.8.0"
|
version = "2.8.0"
|
||||||
@ -431,41 +417,51 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pygments"
|
name = "pygments"
|
||||||
version = "2.14.0"
|
version = "2.12.0"
|
||||||
description = "Pygments is a syntax highlighting package written in Python."
|
description = "Pygments is a syntax highlighting package written in Python."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.6"
|
python-versions = ">=3.6"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pyparsing"
|
||||||
|
version = "3.0.9"
|
||||||
|
description = "pyparsing module - Classes and methods to define and execute parsing grammars"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6.8"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
plugins = ["importlib-metadata"]
|
diagrams = ["railroad-diagrams", "jinja2"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pytest"
|
name = "pytest"
|
||||||
version = "7.3.0"
|
version = "7.1.2"
|
||||||
description = "pytest: simple powerful testing with Python"
|
description = "pytest: simple powerful testing with Python"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
|
atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""}
|
||||||
|
attrs = ">=19.2.0"
|
||||||
colorama = {version = "*", markers = "sys_platform == \"win32\""}
|
colorama = {version = "*", markers = "sys_platform == \"win32\""}
|
||||||
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
|
|
||||||
iniconfig = "*"
|
iniconfig = "*"
|
||||||
packaging = "*"
|
packaging = "*"
|
||||||
pluggy = ">=0.12,<2.0"
|
pluggy = ">=0.12,<2.0"
|
||||||
tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
|
py = ">=1.8.2"
|
||||||
|
tomli = ">=1.0.0"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
|
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pytest-cov"
|
name = "pytest-cov"
|
||||||
version = "4.1.0"
|
version = "3.0.0"
|
||||||
description = "Pytest plugin for measuring coverage."
|
description = "Pytest plugin for measuring coverage."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.6"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
coverage = {version = ">=5.2.1", extras = ["toml"]}
|
coverage = {version = ">=5.2.1", extras = ["toml"]}
|
||||||
@ -476,7 +472,7 @@ testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtuale
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "python-gitlab"
|
name = "python-gitlab"
|
||||||
version = "3.13.0"
|
version = "3.5.0"
|
||||||
description = "Interact with GitLab API"
|
description = "Interact with GitLab API"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -484,7 +480,7 @@ python-versions = ">=3.7.0"
|
|||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
requests = ">=2.25.0"
|
requests = ">=2.25.0"
|
||||||
requests-toolbelt = ">=0.10.1"
|
requests-toolbelt = ">=0.9.1"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
autocompletion = ["argcomplete (>=1.10.0,<3)"]
|
autocompletion = ["argcomplete (>=1.10.0,<3)"]
|
||||||
@ -492,7 +488,7 @@ yaml = ["PyYaml (>=5.2)"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "python-semantic-release"
|
name = "python-semantic-release"
|
||||||
version = "7.33.2"
|
version = "7.29.1"
|
||||||
description = "Automatic Semantic Versioning for Python projects"
|
description = "Automatic Semantic Versioning for Python projects"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -504,18 +500,17 @@ click-log = ">=0.3,<1"
|
|||||||
dotty-dict = ">=1.3.0,<2"
|
dotty-dict = ">=1.3.0,<2"
|
||||||
gitpython = ">=3.0.8,<4"
|
gitpython = ">=3.0.8,<4"
|
||||||
invoke = ">=1.4.1,<2"
|
invoke = ">=1.4.1,<2"
|
||||||
packaging = "*"
|
|
||||||
python-gitlab = ">=2,<4"
|
python-gitlab = ">=2,<4"
|
||||||
requests = ">=2.25,<3"
|
requests = ">=2.25,<3"
|
||||||
semver = ">=2.10,<3"
|
semver = ">=2.10,<3"
|
||||||
tomlkit = ">=0.10,<1.0"
|
tomlkit = ">=0.10.0,<0.11.0"
|
||||||
twine = ">=3,<4"
|
twine = ">=3,<4"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
dev = ["tox", "isort", "black"]
|
dev = ["tox", "isort", "black"]
|
||||||
docs = ["Sphinx (==1.3.6)", "Jinja2 (==3.0.3)"]
|
docs = ["Sphinx (==1.3.6)", "Jinja2 (==3.0.3)"]
|
||||||
mypy = ["mypy", "types-requests"]
|
mypy = ["mypy", "types-requests"]
|
||||||
test = ["coverage (>=5,<6)", "pytest (>=7,<8)", "pytest-xdist (>=1,<2)", "pytest-mock (>=2,<3)", "responses (==0.13.3)", "mock (==1.3.0)"]
|
test = ["coverage (>=5,<6)", "pytest (>=5,<6)", "pytest-xdist (>=1,<2)", "pytest-mock (>=2,<3)", "responses (==0.13.3)", "mock (==1.3.0)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pywin32-ctypes"
|
name = "pywin32-ctypes"
|
||||||
@ -527,7 +522,7 @@ python-versions = "*"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "readme-renderer"
|
name = "readme-renderer"
|
||||||
version = "37.3"
|
version = "35.0"
|
||||||
description = "readme_renderer is a library for rendering \"readme\" descriptions for Warehouse"
|
description = "readme_renderer is a library for rendering \"readme\" descriptions for Warehouse"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -543,7 +538,7 @@ md = ["cmarkgfm (>=0.8.0)"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "requests"
|
name = "requests"
|
||||||
version = "2.28.2"
|
version = "2.28.0"
|
||||||
description = "Python HTTP for Humans."
|
description = "Python HTTP for Humans."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -551,21 +546,21 @@ python-versions = ">=3.7, <4"
|
|||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
certifi = ">=2017.4.17"
|
certifi = ">=2017.4.17"
|
||||||
charset-normalizer = ">=2,<4"
|
charset-normalizer = ">=2.0.0,<2.1.0"
|
||||||
idna = ">=2.5,<4"
|
idna = ">=2.5,<4"
|
||||||
urllib3 = ">=1.21.1,<1.27"
|
urllib3 = ">=1.21.1,<1.27"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
socks = ["PySocks (>=1.5.6,!=1.5.7)"]
|
socks = ["PySocks (>=1.5.6,!=1.5.7)"]
|
||||||
use_chardet_on_py3 = ["chardet (>=3.0.2,<6)"]
|
use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "requests-toolbelt"
|
name = "requests-toolbelt"
|
||||||
version = "0.10.1"
|
version = "0.9.1"
|
||||||
description = "A utility belt for advanced users of python-requests"
|
description = "A utility belt for advanced users of python-requests"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
python-versions = "*"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
requests = ">=2.0.1,<3.0.0"
|
requests = ">=2.0.1,<3.0.0"
|
||||||
@ -583,23 +578,18 @@ idna2008 = ["idna"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scipy"
|
name = "scipy"
|
||||||
version = "1.10.0"
|
version = "1.8.0"
|
||||||
description = "Fundamental algorithms for scientific computing in Python"
|
description = "SciPy: Scientific Library for Python"
|
||||||
category = "main"
|
category = "main"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = "<3.12,>=3.8"
|
python-versions = ">=3.8,<3.11"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
numpy = ">=1.19.5,<1.27.0"
|
numpy = ">=1.17.3,<1.25.0"
|
||||||
|
|
||||||
[package.extras]
|
|
||||||
test = ["pytest", "pytest-cov", "pytest-timeout", "pytest-xdist", "asv", "mpmath", "gmpy2", "threadpoolctl", "scikit-umfpack", "pooch"]
|
|
||||||
doc = ["sphinx (!=4.1.0)", "pydata-sphinx-theme (==0.9.0)", "sphinx-design (>=0.2.0)", "matplotlib (>2)", "numpydoc"]
|
|
||||||
dev = ["mypy", "typing-extensions", "pycodestyle", "flake8", "rich-click", "click", "doit (>=0.36.0)", "pydevtool"]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "secretstorage"
|
name = "secretstorage"
|
||||||
version = "3.3.3"
|
version = "3.3.2"
|
||||||
description = "Python bindings to FreeDesktop.org Secret Service API"
|
description = "Python bindings to FreeDesktop.org Secret Service API"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -617,6 +607,22 @@ category = "dev"
|
|||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "setuptools-scm"
|
||||||
|
version = "6.4.2"
|
||||||
|
description = "the blessed package to manage your versions by scm tags"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6"
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
packaging = ">=20.0"
|
||||||
|
tomli = ">=1.0.0"
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
test = ["pytest (>=6.2)", "virtualenv (>20)"]
|
||||||
|
toml = ["setuptools (>=42)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "six"
|
name = "six"
|
||||||
version = "1.16.0"
|
version = "1.16.0"
|
||||||
@ -643,19 +649,19 @@ python-versions = ">=3.7"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tomlkit"
|
name = "tomlkit"
|
||||||
version = "0.11.7"
|
version = "0.10.2"
|
||||||
description = "Style preserving TOML library"
|
description = "Style preserving TOML library"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.6,<4.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tqdm"
|
name = "tqdm"
|
||||||
version = "4.65.0"
|
version = "4.64.0"
|
||||||
description = "Fast, Extensible Progress Meter"
|
description = "Fast, Extensible Progress Meter"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7"
|
||||||
|
|
||||||
[package.dependencies]
|
[package.dependencies]
|
||||||
colorama = {version = "*", markers = "platform_system == \"Windows\""}
|
colorama = {version = "*", markers = "platform_system == \"Windows\""}
|
||||||
@ -688,7 +694,7 @@ urllib3 = ">=1.26.0"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typing-extensions"
|
name = "typing-extensions"
|
||||||
version = "4.5.0"
|
version = "4.2.0"
|
||||||
description = "Backported and Experimental Type Hints for Python 3.7+"
|
description = "Backported and Experimental Type Hints for Python 3.7+"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
@ -696,15 +702,15 @@ python-versions = ">=3.7"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "urllib3"
|
name = "urllib3"
|
||||||
version = "1.26.15"
|
version = "1.26.9"
|
||||||
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*"
|
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"]
|
brotli = ["brotlicffi (>=0.8.0)", "brotli (>=1.0.9)", "brotlipy (>=0.6.0)"]
|
||||||
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "urllib3-secure-extra", "ipaddress"]
|
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"]
|
||||||
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
|
socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -717,22 +723,24 @@ python-versions = "*"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zipp"
|
name = "zipp"
|
||||||
version = "3.15.0"
|
version = "3.8.0"
|
||||||
description = "Backport of pathlib-compatible object wrapper for zip files"
|
description = "Backport of pathlib-compatible object wrapper for zip files"
|
||||||
category = "dev"
|
category = "dev"
|
||||||
optional = false
|
optional = false
|
||||||
python-versions = ">=3.7"
|
python-versions = ">=3.7"
|
||||||
|
|
||||||
[package.extras]
|
[package.extras]
|
||||||
docs = ["sphinx (>=3.5)", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "furo", "sphinx-lint", "jaraco.tidelift (>=1.4)"]
|
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
|
||||||
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "flake8 (<5)", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco.itertools", "jaraco.functools", "more-itertools", "big-o", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "pytest-flake8"]
|
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "1.1"
|
lock-version = "1.1"
|
||||||
python-versions = ">=3.8.1,<3.10"
|
python-versions = "^3.8,<3.10"
|
||||||
content-hash = "111972d04616ce3ddfc9039a0b38c7eb7c4a41f10390139b27e958aedac7e979"
|
content-hash = "1e52cabf54af905e05d979683b28779e59690cf38ad4f805dbbf455b19d0a337"
|
||||||
|
|
||||||
[metadata.files]
|
[metadata.files]
|
||||||
|
atomicwrites = []
|
||||||
|
attrs = []
|
||||||
black = []
|
black = []
|
||||||
bleach = []
|
bleach = []
|
||||||
certifi = []
|
certifi = []
|
||||||
@ -745,20 +753,16 @@ coverage = []
|
|||||||
cryptography = []
|
cryptography = []
|
||||||
docutils = []
|
docutils = []
|
||||||
dotty-dict = []
|
dotty-dict = []
|
||||||
exceptiongroup = []
|
|
||||||
flake8 = []
|
flake8 = []
|
||||||
gitdb = []
|
gitdb = []
|
||||||
gitpython = []
|
gitpython = []
|
||||||
idna = []
|
idna = []
|
||||||
importlib-metadata = []
|
importlib-metadata = []
|
||||||
importlib-resources = []
|
|
||||||
iniconfig = []
|
iniconfig = []
|
||||||
invoke = []
|
invoke = []
|
||||||
"jaraco.classes" = []
|
|
||||||
jeepney = []
|
jeepney = []
|
||||||
keyring = []
|
keyring = []
|
||||||
mccabe = []
|
mccabe = []
|
||||||
more-itertools = []
|
|
||||||
mypy = []
|
mypy = []
|
||||||
mypy-extensions = []
|
mypy-extensions = []
|
||||||
numpy = []
|
numpy = []
|
||||||
@ -768,10 +772,12 @@ pdme = []
|
|||||||
pkginfo = []
|
pkginfo = []
|
||||||
platformdirs = []
|
platformdirs = []
|
||||||
pluggy = []
|
pluggy = []
|
||||||
|
py = []
|
||||||
pycodestyle = []
|
pycodestyle = []
|
||||||
pycparser = []
|
pycparser = []
|
||||||
pyflakes = []
|
pyflakes = []
|
||||||
pygments = []
|
pygments = []
|
||||||
|
pyparsing = []
|
||||||
pytest = []
|
pytest = []
|
||||||
pytest-cov = []
|
pytest-cov = []
|
||||||
python-gitlab = []
|
python-gitlab = []
|
||||||
@ -784,6 +790,7 @@ rfc3986 = []
|
|||||||
scipy = []
|
scipy = []
|
||||||
secretstorage = []
|
secretstorage = []
|
||||||
semver = []
|
semver = []
|
||||||
|
setuptools-scm = []
|
||||||
six = []
|
six = []
|
||||||
smmap = []
|
smmap = []
|
||||||
tomli = []
|
tomli = []
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "deepdog"
|
name = "deepdog"
|
||||||
version = "0.7.3"
|
version = "0.6.4"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Deepak Mallubhotla <dmallubhotla+github@gmail.com>"]
|
authors = ["Deepak Mallubhotla <dmallubhotla+github@gmail.com>"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = ">=3.8.1,<3.10"
|
python = "^3.8,<3.10"
|
||||||
pdme = "^0.9.1"
|
pdme = "^0.8.6"
|
||||||
numpy = "1.22.3"
|
numpy = "1.22.3"
|
||||||
scipy = "1.10"
|
scipy = "1.8.0"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
pytest = ">=6"
|
pytest = ">=6"
|
||||||
flake8 = "^6.0.0"
|
flake8 = "^6.0.0"
|
||||||
pytest-cov = "^4.1.0"
|
pytest-cov = "^3.0.0"
|
||||||
mypy = "^0.971"
|
mypy = "^0.971"
|
||||||
python-semantic-release = "^7.24.0"
|
python-semantic-release = "^7.24.0"
|
||||||
black = "^22.3.0"
|
black = "^22.3.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user