-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path__init__.py
More file actions
executable file
·33 lines (32 loc) · 2.2 KB
/
Copy path__init__.py
File metadata and controls
executable file
·33 lines (32 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import ding
from .collection_helper import iter_mapping
from .compression_helper import get_data_compressor, get_data_decompressor
from .default_helper import override, dicts_to_lists, lists_to_dicts, squeeze, default_get, error_wrapper, list_split, \
LimitedSpaceContainer, deep_merge_dicts, set_pkg_seed, flatten_dict, one_time_warning, split_data_generator, \
RunningMeanStd
from .design_helper import SingletonMetaclass
from .file_helper import read_file, save_file, remove_file
from .import_helper import try_import_ceph, try_import_mc, try_import_link, import_module, try_import_redis, \
try_import_rediscluster
from .k8s_helper import get_operator_server_kwargs, exist_operator_server, DEFAULT_K8S_COLLECTOR_PORT, \
DEFAULT_K8S_LEARNER_PORT, DEFAULT_K8S_AGGREGATOR_SLAVE_PORT, DEFAULT_K8S_COORDINATOR_PORT, pod_exec_command, \
K8sLauncher
from .orchestrator_launcher import OrchestratorLauncher
from .lock_helper import LockContext, LockContextType, get_file_lock, get_rw_file_lock
from .log_helper import build_logger, DistributionTimeImage, pretty_print, LoggerFactory
from .registry_factory import registries, POLICY_REGISTRY, ENV_REGISTRY, LEARNER_REGISTRY, COMM_LEARNER_REGISTRY, \
SERIAL_COLLECTOR_REGISTRY, PARALLEL_COLLECTOR_REGISTRY, COMM_COLLECTOR_REGISTRY, \
COMMANDER_REGISTRY, LEAGUE_REGISTRY, PLAYER_REGISTRY, MODEL_REGISTRY, \
ENV_MANAGER_REGISTRY, REWARD_MODEL_REGISTRY, BUFFER_REGISTRY, DATASET_REGISTRY, SERIAL_EVALUATOR_REGISTRY
from .segment_tree import SumSegmentTree, MinSegmentTree, SegmentTree
from .slurm_helper import find_free_port_slurm, node_to_host, node_to_partition
from .system_helper import get_ip, get_pid, get_task_uid, PropagatingThread, find_free_port
from .time_helper import build_time_helper, EasyTimer, WatchDog
from .type_helper import SequenceType
from .scheduler_helper import Scheduler
if ding.enable_linklink:
from .linklink_dist_helper import get_rank, get_world_size, dist_mode, dist_init, dist_finalize, \
allreduce, broadcast, DistContext, allreduce_async, synchronize
else:
from .pytorch_ddp_dist_helper import get_rank, get_world_size, dist_mode, dist_init, dist_finalize, \
allreduce, broadcast, DistContext, allreduce_async, synchronize