Skip to content

Commit

Permalink
Merge branch 'develop' into docs/generator_section_refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
jlnav committed Jan 7, 2025
2 parents dfeb9a0 + 5b7a14d commit 52ee430
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.28.4
- uses: crate-ci/typos@v1.29.4
2 changes: 1 addition & 1 deletion .github/workflows/extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.28.4
- uses: crate-ci/typos@v1.29.4
17 changes: 1 addition & 16 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,18 @@ class Mock(MagicMock):
def __getattr__(cls, name):
return MagicMock()

autodoc_mock_imports = ["ax", "balsam", "gpcam", "IPython", "matplotlib", "pandas", "scipy", "surmise"]

MOCK_MODULES = [
"argparse",
"dfols",
"IPython",
"IPython.display",
"IPython.core",
"IPython.core.pylabtools",
"math",
"matplotlib",
"matplotlib.pyplot",
"mpi4py",
"mpmath",
"nlopt",
"PETSc",
"petsc4py",
"psutil",
"scipy",
"scipy.io",
"scipy.sparse",
"scipy.spatial",
"scipy.spatial.distance",
# "scipy.special", # Adding this raises many more errors
"scipy.stats",
"surmise.calibration",
"surmise.emulation",
"Tasmanian",
]

Expand Down Expand Up @@ -132,7 +118,6 @@ def __getattr__(cls, name):

autodoc_pydantic_model_show_json = False

autodoc_mock_imports = ["balsam"]
extlinks = {
"duref": ("http://docutils.sourceforge.net/docs/ref/rst/" "restructuredtext.html#%s", ""),
"durole": ("http://docutils.sourceforge.net/docs/ref/rst/" "roles.html#%s", ""),
Expand Down
1 change: 1 addition & 0 deletions docs/examples/gen_funcs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Here we list many generator functions included with libEnsemble.
:maxdepth: 2
:caption: Modeling and Approximation

gpcam
tasmanian
fd_param_finder
surmise
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/executor_forces_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ Running forces application with input file
Many applications read an input file instead of being given parameters directly on the run line.

forces_simple_with_input_file_ directory contains a variant of this example, where a templated
input file is parametized for each evaluation.
input file is parameterized for each evaluation.

This requires **jinja2** to be installed::

Expand Down
2 changes: 2 additions & 0 deletions libensemble/gen_funcs/persistent_ax_multitask.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
from libensemble.message_numbers import EVAL_GEN_TAG, FINISHED_PERSISTENT_GEN_TAG, PERSIS_STOP, STOP_TAG
from libensemble.tools.persistent_support import PersistentSupport

__all__ = ["persistent_gp_mt_ax_gen_f"]


def persistent_gp_mt_ax_gen_f(H, persis_info, gen_specs, libE_info):
"""
Expand Down
6 changes: 4 additions & 2 deletions libensemble/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ def _get_shortname(calling_file):

# =================== save libE output to pickle and np ========================


def save_libE_output(H, persis_info, calling_file, nworkers, dest_path=os.getcwd(), mess="Run completed"):
def save_libE_output(H, persis_info, calling_file, nworkers, dest_path=None, mess="Run completed"):
"""
Writes out history array and persis_info to files.
Expand Down Expand Up @@ -121,6 +120,9 @@ def save_libE_output(H, persis_info, calling_file, nworkers, dest_path=os.getcwd
A message to print/log when saving the file.
"""
if dest_path is None:
dest_path = os.getcwd()

short_name = _get_shortname(calling_file)
prob_str = "length=" + str(len(H)) + "_evals=" + str(sum(H["sim_ended"])) + "_workers=" + str(nworkers)

Expand Down

0 comments on commit 52ee430

Please sign in to comment.