
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
spaceopt
Advanced tools
SpaceOpt is a hyperparameter optimization algorithm that uses gradient boosting regression to find the most promising candidates for the next trial by predicting their evaluation score.
$ pip install spaceopt
search_space = {
'a': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], # list of ordered numbers: ints
'b': [-3.5, -0.1, 0.0, 2.5, 10.0], # list of ordered numbers: floats
'c': [256, 512, 1024, 2048], # another list of ordered numbers
'd': ['ABC', 'IJK', 'XYZ'], # categorical variable
'e': [True, False], # boolean variable
# ... (add as many as you need)
}
def evaluation_function(spoint: dict) -> float:
# your code (e.g. model fit)
return y # score (e.g. model accuracy)
spoint = {'a': 4, 'b': 0.0, 'c': 512, 'd': 'XYZ', 'e': False}
y = evaluation_function(spoint)
from spaceopt import SpaceOpt
spaceopt = SpaceOpt(search_space=search_space,
target_name='y',
objective='maximize') # or 'minimize'
for iteration in range(200):
if iteration < 20:
spoint = spaceopt.get_random() # exploration
else:
spoint = spaceopt.fit_predict() # exploitation
spoint['y'] = evaluation_function(spoint)
spaceopt.append_evaluated_spoint(spoint)
More examples here.
num_spoints:spoints = spaceopt.get_random(num_spoints=2)
# or
spoints = spaceopt.fit_predict(num_spoints=5)
sample_size (default=10000), which is the number of candidates sampled for ranking:spoint = spaceopt.fit_predict(sample_size=1000) # decreasing `sample_size` increses exploration
spoint = spaceopt.fit_predict(sample_size=100000) # increasing `sample_size` increses exploitation
my_spoint = {'a': 8, 'b': -3.5, 'c': 256, 'd': 'IJK', 'e': False}
my_spoint['y'] = evaluation_function(my_spoint)
spaceopt.append_evaluated_spoint(my_spoint)
MIT License (see LICENSE).
FAQs
Hyperparameter optimization via gradient boosting regression
We found that spaceopt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.