code
stringlengths
3
6.57k
track_start_request(request)
track_end_request(self, request, response)
time.time()
super(SlowQueryTweenView, self)
track_end_request(request, response)
includeme(config)
stack (after authentication, after router, ...)
settings.get("zipkin.tween_factory", "all")
tween_factory.configure(settings)
format(tween_factory.__module__, tween_factory.__name__)
V1Bayes(object)
openapi_types (dict)
attribute_map (dict)
dict(str, object)
__init__(self, kind='bayes', params=None, num_initial_runs=None, max_iterations=None, utility_function=None, metric=None, seed=None, concurrency=None, tuner=None, early_stopping=None, local_vars_configuration=None)
Configuration()
kind(self)
kind(self, kind)
params(self)
dict(str, object)
params(self, params)
dict(str, object)
num_initial_runs(self)
num_initial_runs(self, num_initial_runs)
max_iterations(self)
max_iterations(self, max_iterations)
utility_function(self)
utility_function(self, utility_function)
metric(self)
metric(self, metric)
seed(self)
seed(self, seed)
concurrency(self)
concurrency(self, concurrency)
tuner(self)
tuner(self, tuner)
early_stopping(self)
early_stopping(self, early_stopping)
to_dict(self)
six.iteritems(self.openapi_types)
getattr(self, attr)
isinstance(value, list)
x.to_dict()
hasattr(x, "to_dict")
hasattr(value, "to_dict")
value.to_dict()
isinstance(value, dict)
to_dict()
hasattr(item[1], "to_dict")
value.items()
to_str(self)
pprint.pformat(self.to_dict()
__repr__(self)
self.to_str()
__eq__(self, other)
isinstance(other, V1Bayes)
self.to_dict()
other.to_dict()
__ne__(self, other)
isinstance(other, V1Bayes)
self.to_dict()
other.to_dict()
_parse_args()
argparse.ArgumentParser(description="Run SolTranNet aqueous solubility predictor")
parser.add_argument('input',nargs='?',type=argparse.FileType('r')
parser.add_argument('output',nargs='?',type=argparse.FileType('w')
parser.add_argument('--batchsize',default=32,type=int,help='Batch size for the data loader. Defaults to 32.')
parser.add_argument('--cpus',default=multiprocessing.cpu_count()
parser.add_argument('--cpu_predict',action='store_true',help='Flag to force the predictions to be made on only the CPU. Default behavior is to use GPU if available.')
parser.parse_args()
_run(args)
x.rstrip()
predict(smiles,batch_size=args.batchsize,num_workers=args.cpus,device=torch.device('cpu')
predict(smiles,batch_size=args.batchsize,num_workers=args.cpus)
args.output.write(f'{smi},{pred:.3f},{warn}\n')
val (object)
__init__(self, val)
make_optimizer(optimizer_type, module, **kwargs)
optimizer_type (Union[type, tuple[type, dict]])
e.g. (torch.optim.Adam, {'lr' = 1e-3})
module (torch.nn.Module)
kwargs (dict)
isinstance(optimizer_type, tuple)
kwargs.items()
isinstance(arg, _Default)
format(name)
opt_type(module.parameters()
kwargs.items()
isinstance(arg, _Default)
optimizer_type(module.parameters()
baseline (value function)
Estimation (GAE)
discount (float)
factor (i.e. gamma)
gae_lambda (float)
Estimation (GAE)
max_path_length (int)
baselines (torch.Tensor)
shape (N, T)
dimension (number of episodes)