code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
# Script to dump TensorFlow weights in TRT v1 and v2 dump format. # The V1 format is for TensorRT 4.0. The V2 format is for TensorRT 4.0 and later. import sys import struct import argparse try: import tensorflow as tf from tensorflow.python import pywrap_tensorflow except ImportError as err: sys.stderr.w...
/rllte_core-0.0.1b1.tar.gz/rllte_core-0.0.1b1/deployment/c++/common/dumpTFWts.py
0.466603
0.539529
dumpTFWts.py
pypi
import pandas as pd import requests from loguru import logger as log from prometheus_client import Summary HTTP_REQUEST_TIME = Summary( "rlm_request_response_seconds", "time spent waiting for RLM to return data" ) HTML_PARSING_TIME = Summary( "rlm_parse_data_seconds", "time spent parsing data from the RLM r...
/rlm_prometheus-0.3.2.tar.gz/rlm_prometheus-0.3.2/src/rlm_prometheus/collector.py
0.900253
0.347011
collector.py
pypi
from typing import Sequence, Tuple import rdkit from examples.redox.models import expand_inputs from examples.redox.models import preprocessor as redox_preprocessor from examples.redox.models import redox_model, stability_model from examples.redox.radical_builder import build_radicals from graphenv.vertex import V fro...
/rlmolecule-0.0.8.tar.gz/rlmolecule-0.0.8/examples/redox/radical_state.py
0.878118
0.558447
radical_state.py
pypi
import os from pathlib import Path from typing import Dict import ray import rdkit from graphenv.graph_env import GraphEnv from ray import tune from ray.rllib.utils.framework import try_import_tf from ray.tune.registry import register_env from rlmolecule.builder import MoleculeBuilder from rlmolecule.examples.qed i...
/rlmolecule-0.0.8.tar.gz/rlmolecule-0.0.8/examples/benchmarks/run_qed_aws.py
0.753648
0.325976
run_qed_aws.py
pypi
import os from pathlib import Path from typing import Dict import ray import rdkit from graphenv.graph_env import GraphEnv from ray import tune from ray.rllib.utils.framework import try_import_tf from ray.tune.registry import register_env from rlmolecule.builder import MoleculeBuilder from rlmolecule.examples.qed impo...
/rlmolecule-0.0.8.tar.gz/rlmolecule-0.0.8/examples/benchmarks/qed/run_qed.py
0.814643
0.309154
run_qed.py
pypi
import os from pathlib import Path from typing import Dict import ray import rdkit from graphenv.graph_env import GraphEnv from ray import tune from ray.rllib.utils.framework import try_import_tf from ray.tune.registry import register_env from rlmolecule.builder import MoleculeBuilder from rlmolecule.examples.qed i...
/rlmolecule-0.0.8.tar.gz/rlmolecule-0.0.8/examples/benchmarks/qed/run_qed_aws.py
0.753648
0.325976
run_qed_aws.py
pypi
"""Utils module for rlog_generator.""" import datetime import logging import random import socket import struct import sys import yaml log = logging.getLogger(__name__) def load_config(yaml_file): """Return a Python object given a YAML file Arguments: yaml_file {str} -- path of YAML file Re...
/rlog-generator-0.2.0.tar.gz/rlog-generator-0.2.0/rlog_generator/utils.py
0.754463
0.346818
utils.py
pypi
from collections import Iterable, Sequence from .codec import consume_length_prefix, consume_payload from .exceptions import DecodingError from .atomic import Atomic def decode_lazy(rlp, sedes=None, **sedes_kwargs): """Decode an RLP encoded object in a lazy fashion. If the encoded object is a bytestring, th...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp/lazy.py
0.895831
0.558628
lazy.py
pypi
class RLPException(Exception): """Base class for exceptions raised by this package.""" pass class EncodingError(RLPException): """Exception raised if encoding fails. :ivar obj: the object that could not be encoded """ def __init__(self, message, obj): super(EncodingError, self).__ini...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp/exceptions.py
0.931267
0.342737
exceptions.py
pypi
from eth_utils import ( int_to_big_endian, big_endian_to_int, ) from rlp_cython.exceptions import DeserializationError, SerializationError class BigEndianInt(object): """A sedes for big endian integers. :param l: the size of the serialized representation in bytes or `None` to use the s...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp/sedes/big_endian_int.py
0.727007
0.352898
big_endian_int.py
pypi
import abc import collections import copy import enum import re from eth_utils import ( to_dict, to_set, to_tuple, ) from rlp_cython.exceptions import ( ListSerializationError, ObjectSerializationError, ListDeserializationError, ObjectDeserializationError, ) from .lists import ( List,...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp/sedes/serializable.py
0.596903
0.151529
serializable.py
pypi
from rlp_cython.exceptions import SerializationError, DeserializationError from rlp_cython.atomic import Atomic class Text: """A sedes object for encoded text data of certain length. :param min_length: the minimal length in encoded characters or `None` for no lower limit :param max_length: the maximal le...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp/sedes/text.py
0.858244
0.314787
text.py
pypi
Tutorial ======== Basics ------ There are two types of fundamental items one can encode in RLP: 1) Strings of bytes 2) Lists of other items In this package, byte strings are represented either as Python strings or as ``bytearrays``. Lists can be any sequence, e.g. ``lists`` or ``tuples``. To encode these ki...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/docs/tutorial.rst
0.942062
0.718557
tutorial.rst
pypi
from collections import Iterable, Sequence from .codec import consume_length_prefix, consume_payload from .exceptions import DecodingError from .atomic import Atomic def decode_lazy(rlp, sedes=None, **sedes_kwargs): """Decode an RLP encoded object in a lazy fashion. If the encoded object is a bytestring, th...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp_cython/lazy.py
0.895831
0.558628
lazy.py
pypi
class RLPException(Exception): """Base class for exceptions raised by this package.""" pass class EncodingError(RLPException): """Exception raised if encoding fails. :ivar obj: the object that could not be encoded """ def __init__(self, message, obj): super(EncodingError, self).__ini...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp_cython/exceptions.py
0.931267
0.342737
exceptions.py
pypi
from eth_utils import ( int_to_big_endian, big_endian_to_int, ) from rlp_cython.exceptions import DeserializationError, SerializationError class BigEndianInt(object): """A sedes for big endian integers. :param l: the size of the serialized representation in bytes or `None` to use the s...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp_cython/sedes/big_endian_int.py
0.727007
0.352898
big_endian_int.py
pypi
import abc import collections import copy import enum import re from eth_utils import ( to_dict, to_set, to_tuple, ) from rlp_cython.exceptions import ( ListSerializationError, ObjectSerializationError, ListDeserializationError, ObjectDeserializationError, ) from .lists import ( List,...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp_cython/sedes/serializable.py
0.596903
0.151529
serializable.py
pypi
from rlp_cython.exceptions import SerializationError, DeserializationError from rlp_cython.atomic import Atomic class Text: """A sedes object for encoded text data of certain length. :param min_length: the minimal length in encoded characters or `None` for no lower limit :param max_length: the maximal le...
/rlp-cython-2.1.7.tar.gz/rlp-cython-2.1.7/rlp_cython/sedes/text.py
0.858244
0.314787
text.py
pypi
from src.rlpe.constants import * from src.rlpe.Agents.RL_agents import rl_agent import numpy as np # helper function for flattening irregular nested tuples def mixed_flatten(x): result = [] for el in x: if hasattr(el, "__iter__"): result.extend(mixed_flatten(el)) else: ...
/Observer/anticipated_policy_generator.py
0.479016
0.523603
anticipated_policy_generator.py
pypi
# RLPipes <img src="https://rlbase-data.s3.amazonaws.com/misc/assets/whitebgRLPipes+Logo.png" align="right" alt="logo" width="240" style = "border: none; float: right;"> ![Build Status](https://github.com/Bishop-Laboratory/RLPipes/workflows/tests/badge.svg) [![codecov](https://codecov.io/gh/Bishop-Laboratory/RLPipes/b...
/rlpipes-0.9.3.tar.gz/rlpipes-0.9.3/README.md
0.63341
0.896569
README.md
pypi
import torch import torch.optim as optim import torch.nn.functional as F import numpy as np import random import math import copy from torch import nn from collections import namedtuple from itertools import count from torch.distributions import Categorical from tensorboardX import SummaryWriter SavedAction = namedt...
/rlprop-0.0.4-py3-none-any.whl/prop/algorithms/a2c.py
0.878718
0.330903
a2c.py
pypi
import torch import torch.optim as optim import torch.nn.functional as F import numpy as np import random import math import copy import time from collections import namedtuple from itertools import count, compress from tensorboardX import SummaryWriter from prop.buffers.priority_replay_buffer import PrioritizedReplay...
/rlprop-0.0.4-py3-none-any.whl/prop/algorithms/dqn.py
0.844345
0.219494
dqn.py
pypi
import numpy import random import numpy as np # stored as ( s, a, r, s_ ) in SumTree class PrioritizedReplayBuffer: def __init__(self, capacity, alpha=0.6, beta=0.4, beta_increment_per_sampling=0.001, e=0.01): self.tree = SumTree(capacity) self.alpha = alpha # (0 - no prioritization, 1 - full prio...
/rlprop-0.0.4-py3-none-any.whl/prop/buffers/priority_replay_buffer.py
0.831349
0.313512
priority_replay_buffer.py
pypi
.. _make_agent: .. this is a comment. see http://sphinx-doc.org/rest.html for markup instructions Creating a New Agent ==================== This tutorial describes the standard RLPy :class:`~rlpy.Agents.Agent.Agent` interface, and illustrates a brief example of creating a new learning agent. .. Below taken directly...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/doc/make_agent.rst
0.961335
0.720067
make_agent.rst
pypi
.. _tutorial: Getting Started =============== This tutorial covers the most common type of experiment in reinforcement learning: the control experiment. An agent is supposed to find a good policy while interacting with the domain. .. note:: If you don't use the developer verion of rlpy but installed the toolbo...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/doc/tutorial.rst
0.945914
0.949106
tutorial.rst
pypi
.. _make_domain: .. this is a comment. see http://sphinx-doc.org/rest.html for markup instructions Creating a New Domain ===================== This tutorial describes the standard RLPy :class:`~rlpy.Domains.Domain.Domain` interface, and illustrates a brief example of creating a new problem domain. .. Below taken d...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/doc/make_domain.rst
0.956695
0.695209
make_domain.rst
pypi
.. _make_rep: .. this is a comment. see http://sphinx-doc.org/rest.html for markup instructions Creating a New Representation ============================= This tutorial describes the standard RLPy :class:`~rlpy.Representations.Representation.Representation` interface, and illustrates a brief example of creating a ...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/doc/make_rep.rst
0.948549
0.698291
make_rep.rst
pypi
import rlpy import numpy as np from hyperopt import hp param_space = { 'kernel_resolution': hp.loguniform("kernel_resolution", np.log(5), np.log(50)), 'discover_threshold': hp.loguniform( "discover_threshold", np.log(1e4), np.log(1e8)), 'lambda_': hp.uniform("lambda_", 0., 1...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/bicycle/kifdd_triangle.py
0.443359
0.375449
kifdd_triangle.py
pypi
from rlpy.Domains import PuddleWorld from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp param_space = { 'kernel_resolution': hp.loguniform("kernel_resolution", np.log(3...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/puddleworld/kifdd_triangle.py
0.504639
0.351311
kifdd_triangle.py
pypi
from rlpy.Domains.PuddleWorld import PuddleGapWorld from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy, UniformRandom from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representations import KernelizediFDD param_spac...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/puddleworld/kifdd_gauss_gap.py
0.529993
0.400808
kifdd_gauss_gap.py
pypi
from rlpy.Domains import PuddleWorld from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representations import KernelizediFDD param_space = { 'kernel_resolution':...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/puddleworld/kifdd_gauss.py
0.50415
0.340567
kifdd_gauss.py
pypi
__author__ = "William Dabney" from rlpy.Domains import GridWorld from rlpy.Agents import Q_Learning from rlpy.Representations import iFDDK, IndependentDiscretization from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import os def make_experiment(exp_id=1, path="./Results/Temp"): """ ...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/gridworld/q-ifddk.py
0.666062
0.355048
q-ifddk.py
pypi
from rlpy.Domains.FiniteTrackCartPole import FiniteCartPoleBalanceOriginal, FiniteCartPoleBalanceModern from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representati...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/cartpole_orig/kifdd_triangle.py
0.482673
0.377426
kifdd_triangle.py
pypi
from rlpy.Domains.FiniteTrackCartPole import FiniteCartPoleBalanceOriginal, FiniteCartPoleBalanceModern from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp param_space = {'discr...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/cartpole_orig/ifdd.py
0.443359
0.378402
ifdd.py
pypi
from rlpy.Domains.FiniteTrackCartPole import FiniteCartPoleBalanceOriginal, FiniteCartPoleBalanceModern from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representati...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/cartpole_orig/kifdd_gauss.py
0.489503
0.374648
kifdd_gauss.py
pypi
from rlpy.Domains import Swimmer from rlpy.Agents import Q_Learning, SARSA from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Policies.SwimmerPolicy import SwimmerPolicy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representations import Kernel...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/swimmer/kifdd_triangle.py
0.537041
0.386242
kifdd_triangle.py
pypi
from rlpy.Domains import InfCartPoleBalance from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representations import KernelizediFDD param_space = { 'kernel_resol...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/cartpole2d/kifdd_triangle.py
0.5
0.331039
kifdd_triangle.py
pypi
from rlpy.Domains import InfCartPoleBalance from rlpy.Agents import Greedy_GQ, SARSA, Q_Learning from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp param_space = {'discretization': hp.quniform("discretization", 5, 40, ...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/cartpole2d/ggq-ifdd.py
0.449876
0.360433
ggq-ifdd.py
pypi
from rlpy.Domains import InfCartPoleBalance from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp param_space = { 'kernel_resolution': hp.loguniform("kernel_resolution", n...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/cartpole2d/kifdd_gauss.py
0.503662
0.343865
kifdd_gauss.py
pypi
from rlpy.Domains.HIVTreatment import HIVTreatment from rlpy.Agents import Q_Learning from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representations import KernelizediFDD param_space = { 'kernel_resol...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/hiv/kifdd_triangle.py
0.459804
0.403038
kifdd_triangle.py
pypi
from rlpy.Domains.HIVTreatment import HIVTreatment from rlpy.Agents import Q_Learning from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representations import KernelizediFDD param_space = { 'kernel_resol...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/hiv/kifdd.py
0.467818
0.394201
kifdd.py
pypi
from rlpy.Domains import HelicopterHover from rlpy.Agents import Q_Learning from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp from rlpy.Representations import KernelizediFDD param_space = { 'kernel_resolution': ...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/heli/kifdd.py
0.46563
0.398699
kifdd.py
pypi
from rlpy.Domains.FiniteTrackCartPole import FiniteCartPoleBalanceOriginal, FiniteCartPoleBalanceModern from rlpy.Agents import SARSA, Q_LEARNING from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp param_space = { '...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/cartpole_modern/kifdd.py
0.533154
0.396594
kifdd.py
pypi
from rlpy.Domains import BlocksWorld from rlpy.Agents import Greedy_GQ from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp param_space = {'boyan_N0': hp.loguniform("boyan_N0", np.log(1e1), np.log(1e5)), '...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/blocksworld/ggq-tile.py
0.547464
0.444987
ggq-tile.py
pypi
from rlpy.Domains import PST from rlpy.Agents import Greedy_GQ from rlpy.Representations import * from rlpy.Policies import eGreedy from rlpy.Experiments import Experiment import numpy as np from hyperopt import hp param_space = { # 'discretization': hp.quniform("discretization", 5, 50, 1), 'discover_threshold': ...
/rlpy-1.3.8.tar.gz/rlpy-1.3.8/examples/uav/gq-ifdd.py
0.40028
0.311427
gq-ifdd.py
pypi
import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter import json import os import numpy as np import glob __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. Ho...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Tools/results.py
0.698535
0.490968
results.py
pypi
import click from rlpy.Domains.Domain import Domain from rlpy.Experiments import Experiment def get_experiment( domain_or_domain_selector, agent_selector, default_max_steps=1000, default_num_policy_checks=10, default_checks_per_policy=10, other_options=[], ): @click.group() @click.opti...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Tools/cli.py
0.553505
0.199815
cli.py
pypi
from .MDPSolver import MDPSolver from rlpy.Tools import hhmmss, deltaT, className, clock, l_norm import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __licen...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/MDPSolvers/ValueIteration.py
0.858807
0.512998
ValueIteration.py
pypi
from .MDPSolver import MDPSolver from rlpy.Tools import className, deltaT, hhmmss, clock, l_norm from copy import deepcopy from rlpy.Policies import eGreedy import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph D...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/MDPSolvers/PolicyIteration.py
0.860574
0.396682
PolicyIteration.py
pypi
from .MDPSolver import MDPSolver from rlpy.Tools import deltaT, hhmmss, randSet, className, clock import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __lice...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/MDPSolvers/TrajectoryBasedValueIteration.py
0.805632
0.546194
TrajectoryBasedValueIteration.py
pypi
from abc import ABC, abstractmethod import numpy as np import logging __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __author__ = "Alborz Ger...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Agents/Agent.py
0.925217
0.484624
Agent.py
pypi
import numpy as np from .Agent import Agent from rlpy.Tools import solveLinear, regularize __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __a...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Agents/NaturalActorCritic.py
0.781205
0.522568
NaturalActorCritic.py
pypi
from .LSPI import LSPI from .TDControlAgent import SARSA __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __author__ = "Alborz Geramifard" # E...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Agents/LSPI_SARSA.py
0.649023
0.213254
LSPI_SARSA.py
pypi
from .Agent import Agent import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __author__ = "Alborz Geramifard" class BatchAgen...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Agents/BatchAgent.py
0.779028
0.297095
BatchAgent.py
pypi
from .Agent import Agent, DescentAlgorithm from rlpy.Tools import addNewElementForAllActions, count_nonzero import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How"...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Agents/TDControlAgent.py
0.68784
0.365513
TDControlAgent.py
pypi
import numpy as np import logging from copy import deepcopy __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" class Domain(object): """ ...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/Domain.py
0.8398
0.627951
Domain.py
pypi
from .Domain import Domain import numpy as np from itertools import tee import itertools import os try: from tkinter import Tk, Canvas except ImportError: import warnings warnings.warn("TkInter is not found for Pinball.") from rlpy.Tools import __rlpy_location__ __copyright__ = "Copyright 2013, RLPy http...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/Pinball.py
0.784979
0.359027
Pinball.py
pypi
import numpy as np import itertools from rlpy.Tools import plt, FONTSIZE, linearMap from rlpy.Tools import __rlpy_location__, findElemArray1D, perms import os from .Domain import Domain __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/GridWorld.py
0.673084
0.415966
GridWorld.py
pypi
from rlpy.Tools import FONTSIZE, id2vec, plt from .Domain import Domain import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __a...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/FlipBoard.py
0.595022
0.588268
FlipBoard.py
pypi
from .Domain import Domain import numpy as np from scipy.integrate import odeint from rlpy.Tools import plt __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/HIVTreatment.py
0.59561
0.571587
HIVTreatment.py
pypi
from rlpy.Tools import plt, mpatches, fromAtoB from .Domain import Domain import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" _...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/ChainMDP.py
0.695441
0.520435
ChainMDP.py
pypi
from rlpy.Tools import plt, id2vec, bound_vec import numpy as np from .Domain import Domain import os from rlpy.Tools import __rlpy_location__, FONTSIZE __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabn...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/IntruderMonitoring.py
0.600423
0.437643
IntruderMonitoring.py
pypi
import itertools import numpy as np from rlpy.Tools import __rlpy_location__, plt, with_bold_fonts import os from .GridWorld import GridWorld __license__ = "BSD 3-Clause" __author__ = "Yuji Kanagawa" class AnyRewardGridWorld(GridWorld): """The same as GridWorld, but you can set any reward for each cell. """...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/any_reward_grid_world.py
0.452294
0.237272
any_reward_grid_world.py
pypi
from .Domain import Domain import numpy as np from rlpy.Tools import mpl, plt, rk4, cartesian, colors from rlpy.Policies.SwimmerPolicy import SwimmerPolicy __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William ...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/Swimmer.py
0.800536
0.561095
Swimmer.py
pypi
from .Domain import Domain import numpy as np import matplotlib.pyplot as plt __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __author__ = "Ch...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/PuddleWorld.py
0.660063
0.586996
PuddleWorld.py
pypi
from .Domain import Domain import numpy as np from itertools import product from rlpy.Tools import plt __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/Bicycle.py
0.741861
0.543227
Bicycle.py
pypi
from .CartPoleBase import CartPoleBase, StateIndex import numpy as np from rlpy.Tools import pl, plt __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-C...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/FiniteTrackCartPole.py
0.794146
0.658459
FiniteTrackCartPole.py
pypi
from rlpy.Tools import plt, bound, fromAtoB from rlpy.Tools import lines from .Domain import Domain import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __li...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/MountainCar.py
0.84137
0.62701
MountainCar.py
pypi
from rlpy.Tools import plt, mpatches import numpy as np from .Domain import Domain __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __author__ ...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/FiftyChain.py
0.760028
0.545528
FiftyChain.py
pypi
from .game import Agent from .game import Actions from .game import Directions from .util import manhattanDistance from . import util class GhostAgent(Agent): def __init__(self, index): self.index = index def getAction(self, state): dist = self.getDistribution(state) if len(dist) == 0...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/PacmanPackage/ghostAgents.py
0.741674
0.350157
ghostAgents.py
pypi
from .util import manhattanDistance from .game import Grid import os import random from functools import reduce VISIBILITY_MATRIX_CACHE = {} class Layout(object): """ A Layout manages the static information about the game board. """ def __init__(self, layoutText): self.width = len(layoutTex...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Domains/PacmanPackage/layout.py
0.607081
0.261798
layout.py
pypi
from rlpy.Tools import className, discrete_sample import numpy as np import logging from abc import ABC, abstractmethod __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __l...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Policies/Policy.py
0.86129
0.589716
Policy.py
pypi
from .Policy import Policy import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __author__ = "Alborz Geramifard" class eGreedy...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Policies/eGreedy.py
0.858452
0.497559
eGreedy.py
pypi
from rlpy.Tools import perms from .Representation import Representation import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __a...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Representations/RBF.py
0.806243
0.510008
RBF.py
pypi
from .Representation import Representation import numpy as np from rlpy.Tools.GeneralTools import addNewElementForAllActions import matplotlib.pyplot as plt try: from .kernels import batch except ImportError: from .slow_kernels import batch print("C-Extensions for kernels not available, expect slow runtim...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Representations/LocalBases.py
0.733833
0.437223
LocalBases.py
pypi
from .Representation import Representation import numpy as np from copy import copy __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __author__...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Representations/IndependentDiscretizationCompactBinary.py
0.787114
0.540985
IndependentDiscretizationCompactBinary.py
pypi
from .Representation import Representation import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __author__ = "Alborz Geramifard"...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Representations/IndependentDiscretization.py
0.812756
0.444625
IndependentDiscretization.py
pypi
from .Representation import Representation import numpy as np from .iFDD import iFDD from rlpy.Tools import className, plt from copy import deepcopy __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney",...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Representations/OMPTD.py
0.770033
0.465813
OMPTD.py
pypi
from .Representation import Representation import numpy as np from copy import deepcopy __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How", ] __license__ = "BSD 3-Clause" __auth...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Representations/IncrementalTabular.py
0.730386
0.340047
IncrementalTabular.py
pypi
import numpy as np from .Representation import Representation from itertools import combinations from rlpy.Tools import addNewElementForAllActions, PriorityQueueWithNovelty import matplotlib.pyplot as plt __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "Alborz Geramifard", "Rober...
/rlpy3-2.0.0a0-cp36-cp36m-win_amd64.whl/rlpy/Representations/KernelizediFDD.py
0.616012
0.346431
KernelizediFDD.py
pypi
import itertools import numpy as np class RLSA(object): """ Class that contains the logic to apply the Run Length Smoothing Algorithm (RLSA) on an image. """ @staticmethod def apply_rlsa(img, h_threshold=0, v_threshold=0, hf_threshold=0): """ Method that applies the 'smear_line' ...
/rlsa_python-0.1.tar.gz/rlsa_python-0.1/rlsa_python/rlsa.py
0.924811
0.622861
rlsa.py
pypi
======= RLScore ======= RLScore - regularized least-squares machine learning algorithms package. :Authors: `Tapio Pahikkala <http://staff.cs.utu.fi/~aatapa/>`_, `Antti Airola <https://scholar.google.fi/citations?user=5CPOSr0AAAAJ>`_ :Email: firstname.lastname@utu.fi :Homepage: ...
/rlscore-0.8.1.tar.gz/rlscore-0.8.1/README.rst
0.950881
0.865167
README.rst
pypi
from gym.spaces import Dict from ray.rllib.models.torch.fcnet import FullyConnectedNetwork as TorchFC from ray.rllib.models.torch.torch_modelv2 import TorchModelV2 from ray.rllib.utils.framework import try_import_tf, try_import_torch from ray.rllib.utils.torch_utils import FLOAT_MIN tf1, tf, tfv = try_import_tf() tor...
/models/action_mask_model.py
0.917437
0.473109
action_mask_model.py
pypi
import glob import os from typing import Tuple import ray.tune from ray import init from ray.rllib.agents import ppo from ray.rllib.env import PettingZooEnv from ray.rllib.models import ModelCatalog from ray.rllib.utils.framework import try_import_torch from ray.tune.logger import pretty_print from ray.tune.registry i...
/models/train_model_simple_rllib.py
0.79909
0.300566
train_model_simple_rllib.py
pypi
import math from enum import IntEnum from typing import Any import torch from tensordict import TensorDict from torchrl.data import ( CompositeSpec, DiscreteTensorSpec, UnboundedContinuousTensorSpec, ) from rlstack import Env from rlstack.data import DataKeys, Device class Action(IntEnum): """Enumer...
/rlstack-0.1.2.tar.gz/rlstack-0.1.2/examples/algotrading/env.py
0.893046
0.602997
env.py
pypi
import torch import torch.nn as nn from tensordict import TensorDict from torchrl.data import CompositeSpec, TensorSpec, UnboundedContinuousTensorSpec from rlstack import RecurrentModel from rlstack.data import DataKeys from rlstack.nn import MLP, get_activation FINFO = torch.finfo() class LazyLemur(RecurrentModel)...
/rlstack-0.1.2.tar.gz/rlstack-0.1.2/examples/algotrading/models/lstm.py
0.931509
0.702313
lstm.py
pypi
import torch import torch.nn as nn from tensordict import TensorDict from torchrl.data import TensorSpec from rlstack import Model from rlstack.data import DataKeys from rlstack.nn import ( MLP, SelfAttention, SelfAttentionStack, get_activation, masked_avg, ) from rlstack.views import ViewRequireme...
/rlstack-0.1.2.tar.gz/rlstack-0.1.2/examples/algotrading/models/transformer.py
0.931572
0.757324
transformer.py
pypi
import torch import torch.nn as nn from tensordict import TensorDict from torchrl.data import TensorSpec from rlstack import Model from rlstack.data import DataKeys from rlstack.nn import MLP, get_activation from rlstack.views import ViewRequirement FINFO = torch.finfo() class MischievousMule(Model): """A model...
/rlstack-0.1.2.tar.gz/rlstack-0.1.2/examples/algotrading/models/mlp.py
0.921411
0.745584
mlp.py
pypi
from ibapi import order_condition from ibapi.object_implem import Object from ibapi.utils import * # @UnusedWildImport from ibapi.server_versions import * # @UnusedWildImport from ibapi.order import OrderComboLeg from ibapi.contract import ComboLeg from ibapi.tag_value import TagValue from ibapi.wrapper import DeltaNeu...
/rltrade-ibapi-9.76.1.tar.gz/rltrade-ibapi-9.76.1/ibapi/orderdecoder.py
0.581065
0.151969
orderdecoder.py
pypi
This is the interface that will need to be overloaded by the customer so that his/her code can receive info from the TWS/IBGW. NOTE: the methods use type annotations to describe the types of the arguments. This is used by the Decoder to dynamically and automatically decode the received message into the given EWrapper ...
/rltrade-ibapi-9.76.1.tar.gz/rltrade-ibapi-9.76.1/ibapi/wrapper.py
0.652352
0.459137
wrapper.py
pypi
from toyrobot.models.orientation import Orientation from toyrobot.models.robot import Robot import logging class CommandParser: def __init__(self): self.valid_commands = ["PLACE", "LEFT", "RIGHT", "MOVE", "REPORT"] def _parse_place_cmd_string(self, cmd): return cmd[1].strip().split(",") ...
/rlupat.toyrobot-0.2.1.tar.gz/rlupat.toyrobot-0.2.1/toyrobot/parser/commandparser.py
0.682468
0.309689
commandparser.py
pypi
import json import os import os.path as osp import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns DIV_LINE_WIDTH = 50 # Global vars for tracking and labeling data at load time. exp_idx = 0 units = dict() def smooth_dataframe(dataframe, value, smooth): y = np.ones(smooth) ...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/plot.py
0.479747
0.453141
plot.py
pypi
import atexit import json import os import os.path as osp import shutil import time import numpy as np from rlutils.utils.serialization_utils import convert_json from tensorboardX import SummaryWriter DEFAULT_DATA_DIR = 'data' FORCE_DATESTAMP = False color2num = dict( gray=30, red=31, green=32, yello...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/logx.py
0.733356
0.352648
logx.py
pypi
import torch.nn as nn from .layers import EnsembleDense, SqueezeLayer str_to_activation = { 'relu': nn.ReLU, 'leaky_relu': nn.LeakyReLU, 'tanh': nn.Tanh, 'sigmoid': nn.Sigmoid, 'softplus': nn.Softplus, } def decode_activation(activation): if isinstance(activation, str): act_fn = str_...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/pytorch/nn/functional.py
0.837155
0.33689
functional.py
pypi
import math import torch import torch.nn as nn import torch.nn.functional as F from rlutils.np.functional import inverse_softplus class EnsembleDense(nn.Module): __constants__ = ['num_ensembles', 'in_features', 'out_features'] in_features: int out_features: int weight: torch.Tensor def __init__(...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/pytorch/nn/layers.py
0.920843
0.424412
layers.py
pypi
import copy import rlutils.pytorch.utils as ptu import torch import torch.nn as nn from rlutils.infra.runner import run_func_as_main, PytorchOffPolicyRunner from rlutils.pytorch.functional import soft_update, compute_target_value, to_numpy_or_python_type from rlutils.pytorch.nn import EnsembleMinQNet from rlutils.pyto...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/algos/pytorch/mf/td3.py
0.882504
0.36727
td3.py
pypi
import copy import rlutils.pytorch as rlu import rlutils.pytorch.utils as ptu import torch from rlutils.infra.runner import PytorchOffPolicyRunner, run_func_as_main from torch import nn class SACAgent(nn.Module): def __init__(self, obs_spec, act_spec, num_ensemb...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/algos/pytorch/mf/sac.py
0.893765
0.368093
sac.py
pypi
import numpy as np import rlutils.tf as rlu import tensorflow as tf from rlutils.infra.runner import TFOnPolicyRunner class PPOAgent(tf.keras.Model): def __init__(self, obs_spec, act_spec, mlp_hidden=64, pi_lr=1e-3, vf_lr=1e-3, clip_ratio=0.2, entropy_coef=0.001, target_kl=0.05, ...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/algos/tf/mf/ppo.py
0.883488
0.393968
ppo.py
pypi
import numpy as np import rlutils.tf as rlu import tensorflow as tf import tensorflow_probability as tfp from rlutils.infra.runner import TFOnPolicyRunner class TRPOAgent(tf.keras.Model): def __init__(self, obs_spec, act_spec, mlp_hidden=64, delta=0.01, vf_lr=1e-3, damping_coeff=0.1, cg_iters=10,...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/algos/tf/mf/trpo.py
0.888638
0.44734
trpo.py
pypi
import rlutils.tf as rlu import tensorflow as tf from rlutils.infra.runner import TFOffPolicyRunner class TD3Agent(tf.keras.Model): def __init__(self, obs_spec, act_spec, num_q_ensembles=2, policy_mlp_hidden=256, policy_lr=3e-4, ...
/rlutils-python-0.0.3.tar.gz/rlutils-python-0.0.3/rlutils/algos/tf/mf/td3.py
0.792544
0.236021
td3.py
pypi