Skip to content

Conversation

nastaran78
Copy link
Collaborator

@nastaran78 nastaran78 commented Aug 24, 2025

Changes in this PR

We introduced two updates related to worker IDs:

Users can now explicitly specify the worker_id in neps.run.

By default, worker IDs follow this format:

worker_i-hostname-pid

where i is a zero-based index.

 
Example: User-specified worker_id
import logging
import numpy as np
import neps

def evaluate_pipeline(float1, float2):
    objective_to_minimize = -float(np.sum([float1, float2]))
    return objective_to_minimize

pipeline_space = dict(
    float1=neps.Float(lower=0, upper=1),
    float2=neps.Float(lower=-10, upper=10),
)

logging.basicConfig(level=logging.INFO)

neps.run(
    evaluate_pipeline=evaluate_pipeline,
    pipeline_space=pipeline_space,
    max_evaluations_total=30,
    worker_id="test_worker",  # user-defined worker_id
)

@nastaran78 nastaran78 changed the title [feat] Change Worker ID feat: Change Worker ID Aug 24, 2025
@nastaran78 nastaran78 changed the base branch from master to eval_callback August 25, 2025 05:29
@nastaran78 nastaran78 changed the base branch from eval_callback to master August 25, 2025 05:32
@nastaran78 nastaran78 changed the base branch from master to eval_callback August 25, 2025 05:32
@nastaran78 nastaran78 requested a review from Meganton August 25, 2025 05:40
@nastaran78 nastaran78 changed the base branch from eval_callback to master August 27, 2025 10:42
@nastaran78 nastaran78 requested a review from Neeratyoy September 4, 2025 15:19
@nastaran78 nastaran78 merged commit ed80862 into master Sep 8, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants