mirror of
https://github.com/wassname/ray.git
synced 2026-08-06 13:31:10 +08:00
Remove register_class from API. (#550)
* Perform ray.register_class under the hood. * Fix bug. * Release worker lock when waiting for imports to arrive in get. * Remove calls to register_class from examples and tests. * Clear serialization state between tests. * Fix bug and add test for multiple custom classes with same name. * Fix failure test. * Fix linting and cleanups to python code. * Fixes to documentation. * Implement recursion depth for recursively registering classes. * Fix linting. * Push warning to user if waiting for class for too long. * Fix typos. * Don't export FunctionToRun if pickling the function fails. * Don't broadcast class definition when pickling class.
This commit is contained in:
committed by
Philipp Moritz
parent
3ebfd850e1
commit
ec2534422b
@@ -154,10 +154,6 @@ if __name__ == "__main__":
|
||||
ray.init(redis_address=args.redis_address,
|
||||
num_workers=(0 if args.redis_address is None else None))
|
||||
|
||||
# Tell Ray to serialize Config and Result objects.
|
||||
ray.register_class(Config)
|
||||
ray.register_class(Result)
|
||||
|
||||
config = Config(l2coeff=0.005,
|
||||
noise_stdev=0.02,
|
||||
episodes_per_batch=10000,
|
||||
|
||||
@@ -33,10 +33,6 @@ if __name__ == "__main__":
|
||||
|
||||
ray.init(redis_address=args.redis_address)
|
||||
|
||||
ray.register_class(AtariRamPreprocessor)
|
||||
ray.register_class(AtariPixelPreprocessor)
|
||||
ray.register_class(NoPreprocessor)
|
||||
|
||||
mdp_name = args.environment
|
||||
if args.environment == "Pong-v0":
|
||||
preprocessor = AtariPixelPreprocessor()
|
||||
|
||||
Reference in New Issue
Block a user