Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/release-preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,21 @@ jobs:
exit 1
fi

- name: Configure authenticated Git remote
- name: Configure Git credentials
env:
RELEASE_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
run: |
git remote set-url origin https://x-access-token:${RELEASE_TOKEN}@github.com/${{ github.repository }}.git
set -euo pipefail
# Disable any credential helpers the runner may have configured
# (gh CLI, credential-manager, etc.) that can intercept push auth.
git config --local --unset-all credential.helper || true
git config --local credential.helper ''
# Use the extraheader method — the same mechanism actions/checkout
# uses internally. Works reliably for both fetch and push.
BASIC=$(echo -n "x-access-token:${RELEASE_TOKEN}" | base64)
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${BASIC}"

- name: Preflight token and push checks
env:
RELEASE_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
run: |
set -euo pipefail

Expand All @@ -73,9 +79,9 @@ jobs:
echo "Checking write access via dry-run push to unprotected ref..."
test_ref="refs/preflight/sr-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
if ! git push --dry-run origin "HEAD:${test_ref}" 2>&1; then
echo "::error::SEMANTIC_RELEASE_TOKEN exists but cannot push to ${GITHUB_REPOSITORY}."
echo "::error::SEMANTIC_RELEASE_TOKEN cannot push to ${GITHUB_REPOSITORY}."
echo "::error::Ensure the PAT has Contents: Read and write (fine-grained) or 'repo' scope (classic)."
echo "::error::For org repos, also verify the fine-grained PAT was approved in org settings."
echo "::error::For org repos, verify the fine-grained PAT was approved in org settings."
exit 1
fi

Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,15 @@ jobs:
@semantic-release/exec@6 \
conventional-changelog-conventionalcommits@7

- name: Configure authenticated Git remote
- name: Configure Git credentials
env:
RELEASE_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN || github.token }}
run: |
git remote set-url origin https://x-access-token:${RELEASE_TOKEN}@github.com/${{ github.repository }}.git
set -euo pipefail
git config --local --unset-all credential.helper || true
git config --local credential.helper ''
BASIC=$(echo -n "x-access-token:${RELEASE_TOKEN}" | base64)
git config --local http.https://github.com/.extraheader "AUTHORIZATION: basic ${BASIC}"

- name: Semantic Release
env:
Expand Down
137 changes: 137 additions & 0 deletions docs/spotoptim_class.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
title: "SpotOptim Class"
description: "Structure of the Methods"
---


## Overview

# TASK_VARS:

* detect_var_type
* modify_bounds_based_on_var_type
* repair_non_numeric
* handle_default_var_trans
* process_factor_bounds


# TASK_SAVE_LOAD:

* get_pickle_safe_optimizer
* reinitialize_components

# TASK_DIM:

* setup_dimension_reduction()
* to_red_dim()
* to_all_dim()

# TASK_TRANSFORM:

* transform_value()
* inverse_transform_value()
* transform_X()
* inverse_transform_X()
* transform_bounds()
* map_to_factor_values()

# TASK_INIT_DESIGN:

* get_initial_design()
* generate_initial_design()
* curate_initial_design()
* rm_initial_design_NA_values()
* validate_x0()
* check_size_initial_design()
* get_best_xy_initial_design()

# TASK_Surrogate:

* init_surrogate()
* _fit_surrogate()
*_fit_scheduler()

# TASK_PREDICT:

* _predict_with_uncertainty()
* _acquisition_function()

# TASK_OPTIM:

* evaluate_function()
* _optimize_acquisition_tricands()
* _prepare_de_kwargs()
* _optimize_acquisition_de()
* _optimize_acquisition_scipy()
* _try_optimizer_candidates()
* remove_nan()
* _handle_acquisition_failure()
* _try_fallback_strategy()
* get_shape()
* optimize_acquisition_func()
* _optimize_run_task()
* optimize()
* execute_optimization_run()

# TASK_MO:

* store_mo()
* mo2so()

# TASK_OCBA:

* apply_ocba()
* get_ranks()
* get_ocba()
* get_ocba_X()

# TASK_SELECT:

* select_distant_points()
* select_best_cluster()
* _selection_dispatcher()
* select_new()
* suggest_next_infill_point()

# TASK_OPTIM_SEQ:

* determine_termination()
* apply_penalty_NA()
* update_best_main_loop()
* handle_NA_new_points()
* optimize_sequential_run()
* _initialize_run()
* update_repeats_infill_points()
* _run_sequential_loop()

# TASK_OPTIM_PARALLEL:

* _update_storage_steady()
* optimize_steady_state()

# TASK_STATS:

* init_storage()
* update_storage()
* update_stats()
* update_success_rate()
* get_success_rate()
* aggregate_mean_var()
* get_best_hyperparameters

# TASK_RESULTS:

* save_result()
* load_result()
* save_experiment()
* load_experiment()
* get_result_filename()
* get_experiment_filename()
* print_results()
* print_best()
* get_results_table()
* get_design_table()
* gen_design_table()
* get_importance()
* sensitivity_spearman()
* get_stars()
Loading
Loading