MCPcopy
hub / github.com/hyperopt/hyperopt / main_worker

Function main_worker

hyperopt/mongoexp.py:1332–1411  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1330
1331
1332def main_worker():
1333 parser = optparse.OptionParser(usage="%prog [options]")
1334
1335 parser.add_option(
1336 "--exp-key",
1337 dest="exp_key",
1338 default=None,
1339 metavar="str",
1340 help="identifier for this workers's jobs",
1341 )
1342 parser.add_option(
1343 "--last-job-timeout",
1344 dest="last_job_timeout",
1345 metavar="T",
1346 default=None,
1347 help="Do not reserve a job after T seconds have passed",
1348 )
1349 parser.add_option(
1350 "--max-consecutive-failures",
1351 dest="max_consecutive_failures",
1352 metavar="N",
1353 default=4,
1354 help="stop if N consecutive jobs fail (default: 4)",
1355 )
1356 parser.add_option(
1357 "--max-jobs",
1358 dest="max_jobs",
1359 default=sys.maxsize,
1360 help="stop after running this many jobs (default: inf)",
1361 )
1362 parser.add_option(
1363 "--mongo",
1364 dest="mongo",
1365 default="localhost/hyperopt",
1366 help="<host>[:port]/<db> for IPC and job storage",
1367 )
1368 parser.add_option(
1369 "--poll-interval",
1370 dest="poll_interval",
1371 metavar="N",
1372 default=5,
1373 help="check work queue every 1 < T < N seconds (default: 5",
1374 )
1375 parser.add_option(
1376 "--reserve-timeout",
1377 dest="reserve_timeout",
1378 metavar="T",
1379 default=120.0,
1380 help="poll database for up to T seconds to reserve a job",
1381 )
1382 parser.add_option(
1383 "--workdir",
1384 dest="workdir",
1385 default=None,
1386 help="root workdir (default: load from mongo)",
1387 metavar="DIR",
1388 )
1389 parser.add_option(

Callers 1

mainFunction · 0.85

Calls 1

main_worker_helperFunction · 0.85

Tested by

no test coverage detected