Releases: wlandau/crew
Releases · wlandau/crew
Simplify auto-scaling, support interoperability with mirai
crew 1.3.0
- Reinstate checks that were temporarily suppressed to help plugins transition to #217.
- Support
reset_globals,reset_packages,reset_options, andgarbage_collectionincrew_controller_sequential()(#217). - Change argument
tlstotlscertin the call tomirai::daemon()(#227, @shikokuchuo). - Use
collectionsqueues instead of custom queues (#229). - Use
collectionsdictionaries instead of hash environments to track tasks (#229). - Remove the long-deprecated
promise()method of the controller. - Improve interoperability of
crew's workers by avoidingnanonext::cv_value()for condition variables (#225). Consequences:wait(mode = "all")no longer guarantees that a task is available forpop(). It just consumes a condition variable signal.pop()should always be checked forNULLreturn values.- Until
miraigains a threaded dispatcher,saturated()needs to avoid the overhead of callingstatus()to get task counts. So the definition of "saturated" has changed: a controller is saturated if the number of uncollected tasks is greater than or equal to the maximum number of workers. Previously, it was the number of unresolved tasks. - Internal counters
.pushedand.poppedare safely removed. - Active bindings
pushedandpoppedare removed.
- Controllers no longer have a
unpopped()method because it is unnecessary to export and it assumes only the controller submits tasks to the compute profile (affecting interoperability). - Allow a custom
laterloop inautoscale(). - Deprecate the
pids()methods in controllers and clients and stop babysitting the dispatcher process (#236). - Deprecate
crew_clean()in favor ofcrew_monitor_local()(#236). - Trim down the argument list of
launch_worker()to just include argumentscallandname. - Simplify the auto-scaling algorithm to support greater interoperability and the eventual threaded dispatcher in
mirai(#232). - Deprecate
processesandasyncincrewlaunchers in favor of job arrays (#218, #237). - Drop the unified controller group throttle. Let individual controllers handle their own throttling based on their own auto-scaling settings.
- When
tasks_maskis finite, setseconds_mintoseconds_intervalin the throttle to give tasks enough time to accumulate. - Use the counters in
mirai::info()instead ofmirai::status()$events(#232, @shikokuchuo). - Allow custom compute profiles in
crew_client(). This is mainly to support the use of the default compute profile to makecrewmore compatible with non-crewmirai-based workflows. It's a quick solution for single controllers but does not work for controller groups. crew_client()$start()now errors if amiraicompute profile of the same name is already active.- Shorten the length of strings from
crew_random_name().
CRAN patch: MKL 'Additional issues'
crew 1.2.1
- CRAN patch (address MKL "Additional issues").
Performance and compatibility
crew 1.2.0
- 22.7x speedup in
controller$walk()with 100000 tasks: pre-compute the task list and defer auto-scaling until all tasks are pushed. Pushing a million tasks inwalk()now takes just under 70 seconds on a local M2 Macbook. - Use
nanonext::ip_addr()instead ofgetip::getip()to get the default IP address of the host (#216, @shikokuchuo). - Add a progress bar to
walk()report progress when pushing tasks. - Move arguments
reset_globals,reset_packages,reset_options, andgarbage_collectionfrom the launcher to the controller (#217).crew_eval()now handles cleanup directly, and workflows runningmirai2.0.0 should mostly run faster because not all cleanup steps are automatically enabled. - Avoid
mirai::call_mirai_()in tests (#222, @shikokuchuo).
Performance
crew 1.1.2
- Speedup for
targets: avoid superfluous processing incontroller$pop(). - Speedup queue methods, especially
queue$push(), by making the queue non-portable and using direct access and direct assignment inR6. - Reduce the frequency of calls to
mirai::status()in workloads with a large number of quick tasks. Instead of resetting the throttle every time there is task or worker activity, only reset if there is worker activity. This was achieved by giving relay objects their own throttles instead of having them use the launcher throttles. - Revert to a logical value for the
dispatcherargument ofmirai::daemons()(#215, @shikokuchuo).
Fix documentation and links
crew 1.1.1
- Fix incorrect messages in documentation about deprecating the
nameandworkersarguments of controllers. They are not deprecated at the controller level. They are only deprecated increw_client().
Serialization and sequential controller
crew 1.1.0
- Change prefix in
name_worker()fromcrew-tocrew-worker-. - Use
call_mirai()instead of the now deprecatedcall_mirai_()(@shikokuchuo, #198). - Add
crew_controller_sequential()(#205). - Add a
serializationargument tocrew_client()(#204).
Migrate to mirai 1.0.0
crew 1.0.0
- Avoid partial match in a call to
crew_terminate_process(). - Migrate to
mirai2.0.0 with the pair 1 poly protocol (#193). Most notably, all workers now share the same URL instead of having different web sockets for different workers. This gets rid ofcrew's previous "slotted" model for workers. - Prohibit duplicated task names in
push(). (The task must be popped first before another task of the same name can be submitted.) This allows controllers to use hash tables to track tasks, which makespush()andpop()orders of magnitude faster. It is also needed for the new retry mechanism based on backup controllers and controller groups. - Use exponential backoff in throttles.
- Share throttles between
scale()andwait()to increase responsiveness. - Use a unified throttle for controller groups, which requires refactoring
wait(mode = "all")for controller groups. - Name every task and record every command.
- Switch URLs from
ws://(andwss://) totcp://(andtls+tcp://) (#193). - Change R-level error status code to -1 (previously 1).
- Add a queue class for resolved tasks to make
pop()andcollect()more efficient.pop()is 64 times faster. - For clarity, rename the
"launcher"column of the results to"controller". - Log crashes and cancellations separately from ordinary errors in
summary().
Improved crash detection
crew 0.10.2
- Eliminate spurious
launch_maxerror from underutilized workers (#189). - Deprecate
launch_maxin favor ofcrashes_error(#189). - Look for crashes of all workers in
rotate()instead of looking for crashes of a specific worker inlaunch()(#189). - Add a
crashes()launcher method to allow plugins to detect and respond to crashes more easily. - Change default
seconds_idleto 300. - Move
autometrictoSuggests:.
Resource logging with autometric
crew 0.10.0
- Give full worker name in the worker launch error message (@multimeric).
- Start the controller automatically in more methods.
- Add an
r_argumentsargument to supply command line arguments to R for workers (#175, @rpruim). - Add a
cancel()controller method to cancel one or more tasks. - Call
cancel(all = TRUE)fromterminate()as a safeguard. - Make
client$dispatcheraps::ps_handle()handle and add a newclient$clienthandle for the current process. - To passively log memory usage when
log_resourcesis given, the controller now callslog()as a side effect in most controller methods, with throttling to preserve speed. - Return a status and status code from
pop()etc. - New internal function
as_monad()makes error reporting more consistent. - Use
path.expand()on local log files. - Switch to
Rscript. - Print session info from
crew_worker()before attempting to dial intomirai. - Add
asyncdial = FALSEback tomirai::daemon()call. - Deprecate
local_log_directoryandlocal_log_joinin favor ofcrew_options_local()and theoptions_localargument. - Add
crew_options_metrics()and theoptions_metricsargument for recording resource metrics (#178). - Add a new
logging.Rmdvignette to explain best practices for logging and resource usage metrics (#178).
CRAN patch
crew 0.9.5
- CRAN patch.