python_code stringlengths 0 187k | repo_name stringlengths 8 46 | file_path stringlengths 6 135 |
|---|---|---|
# encoding: utf-8
# the following try/except block will make the custom check compatible with any Agent version
try:
# first, try to import the base class from old versions of the Agent...
from checks import AgentCheck
except ImportError:
# ...if the above failed, the check is running in Agent version 6 or... | datadog_nvml-master | nvml.py |
"""Manages constants required by multiple files."""
import getpass
import os
import platform
import socket
from pathlib import Path
def make_scene_name(type, num):
if type == "":
return "FloorPlan" + str(num) + "_physics"
elif num < 10:
return "FloorPlan" + type + "0" + str(num) + "_physics"
... | cordial-sync-master | constants.py |
"""Defines the tasks that an agent should complete in a given environment."""
from abc import abstractmethod
from typing import (
Dict,
Any,
Tuple,
TypeVar,
Generic,
List,
Optional,
Callable,
)
EnvType = TypeVar("EnvType")
class Episode(Generic[EnvType]):
def __init__(
sel... | cordial-sync-master | rl_base/episode.py |
from .agent import A3CAgent
from .episode import Episode
from .shared_optim import SharedAdam, SharedRMSprop
| cordial-sync-master | rl_base/__init__.py |
from __future__ import division
import copy
from abc import ABC
from typing import Dict, List, Union, Optional, Any, TypeVar, Generic
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils import net_util
from utils.misc_util import huber_loss
from .episode import Episode
E... | cordial-sync-master | rl_base/agent.py |
from __future__ import division
import math
from collections import defaultdict
from typing import Tuple, Dict, Union, Optional, Iterable, Callable
import torch
import torch.optim as optim
from torch import nn
class SharedRMSprop(optim.Optimizer):
"""Implements RMSprop algorithm with shared states.
"""
... | cordial-sync-master | rl_base/shared_optim.py |
import queue
import random
import warnings
from collections import Counter
from typing import List, Callable, Optional, Dict
import torch
from torch import multiprocessing as mp
from rl_ai2thor.ai2thor_environment import AI2ThorEnvironment
from rl_ai2thor.ai2thor_gridworld_environment import AI2ThorLiftedObjectGridEn... | cordial-sync-master | rl_multi_agent/furnmove_episode_samplers.py |
from __future__ import division
from collections import OrderedDict
from typing import Tuple, Optional, Sequence
import torch
import torch.nn as nn
import torch.nn.functional as F
from utils.misc_util import norm_col_init, weights_init, outer_product, outer_sum
def _unfold_communications(speech_per_agent: torch.Fl... | cordial-sync-master | rl_multi_agent/models.py |
import itertools
import math
import warnings
from typing import Tuple, Dict, List, Any, Union
import matplotlib as mpl
import constants
from rl_ai2thor.ai2thor_environment import AI2ThorEnvironmentWithGraph
from rl_ai2thor.ai2thor_episodes import MultiAgentAI2ThorEpisode
from rl_ai2thor.ai2thor_utils import manhattan... | cordial-sync-master | rl_multi_agent/furnlift_episodes.py |
"import glob\nimport inspect\nimport json\nimport math\nimport os\nimport time\nimport warnings\nfro(...TRUNCATED) | cordial-sync-master | rl_multi_agent/furnmove_utils.py |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 6