shutdown_serverservererror

servererror  时间:2021-04-12  阅读:()
Package'gym'October25,2016Version0.
1.
0TitleProvidesAccesstotheOpenAIGymAPIDescriptionOpenAIGymisaopen-sourcePythontoolkitfordevelopingandcomparingreinforcementlearningalgorithms.
ThisisawrapperfortheOpenAIGymAPI,andenablesaccesstoanever-growingvarietyofenvironments.
FormoredetailsonOpenAIGym,pleaseseehere:.
FormoredetailsontheOpenAIGymAPIspecication,pleaseseehere:.
LicenseMIT+leLICENSELazyDatatrueDependsR(>=3.
3.
1)Importshttr,jsonliteURLhttps://github.
com/paulhendricks/gym-RBugReportshttps://github.
com/paulhendricks/gym-R/issuesRoxygenNote5.
0.
1SuggeststestthatNeedsCompilationnoAuthorPaulHendricks[aut,cre]MaintainerPaulHendricksRepositoryCRANDate/Publication2016-10-2500:57:54Rtopicsdocumented:create_GymClient2env_action_space_contains3env_action_space_info3env_action_space_sample4env_close5env_create612create_GymClientenv_list_all6env_monitor_close7env_monitor_start8env_observation_space_info9env_reset9env_step10get_request11gym11parse_server_error_or_raise_for_status12post_request12print.
GymClient13random_discrete_agent14shutdown_server14upload15Index16create_GymClientCreateaGymClientinstance.
DescriptionThisfunctioninstantiatesaGymClientinstancetointegratewithanOpenAIGymserver.
Usagecreate_GymClient(remote_base)Argumentsremote_baseTheURLoftheOpenAIgymserver.
Thisvalueisusually"http://127.
0.
0.
1:5000".
ValueAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)##End(Notrun)env_action_space_contains3env_action_space_containsEvaluatewhetheranactionisamemberofanenvironments'sactionspace.
DescriptionEvaluatewhetheranactionisamemberofanenvironments'sactionspace.
Usageenv_action_space_contains(x,instance_id,action)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
actionAnactiontotakeintheenvironment.
ValueAbooleanatomicvectoroflengthoneindicatingiftheactionisamemberofanenvironments'sactionspace.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)action<-env_action_space_sample(client,instance_id)env_action_space_contains(client,instance_id,action)##End(Notrun)env_action_space_infoGetinformation(nameanddimensions/bounds)oftheenvironments'sactionspace.
DescriptionGetinformation(nameanddimensions/bounds)oftheenvironments'sactionspace.
4env_action_space_sampleUsageenv_action_space_info(x,instance_id)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
ValueAlistcontaining"name"(suchas"Discrete"),andadditionaldimensionalinfo(suchas"n")whichvariesfromspacetospace.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)env_action_space_info(client,instance_id)##End(Notrun)env_action_space_sampleSampleanactionfromtheenvironments'sactionspace.
DescriptionSampleanactionfromtheenvironments'sactionspace.
Usageenv_action_space_sample(x,instance_id)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
ValueAnactionsampledfromaspace(suchas"Discrete"),whichvariesfromspacetospace.
env_close5Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)env_action_space_sample(client,instance_id)##End(Notrun)env_closeFlushallmonitordatatodisk.
DescriptionFlushallmonitordatatodisk.
Usageenv_close(x,instance_id)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
ValueNULL.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)env_close(client,instance_id)##End(Notrun)6env_list_allenv_createCreateaninstanceofthespeciedenvironment.
DescriptionCreateaninstanceofthespeciedenvironment.
Usageenv_create(x,env_id)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
env_idAshortidentier(suchas"3c657dbc")forthecreatedenvironmentinstance.
Theinstance_idisusedinfutureAPIcallstoidentifytheenvironmenttobemanipulated.
ValueAshortidentier(suchas"3c657dbc")forthecreatedenvironmentinstance.
Theinstance_idisusedinfutureAPIcallstoidentifytheenvironmenttobemanipulated.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"env_create(client,env_id)##End(Notrun)env_list_allListallenvironmentsrunningontheserver.
DescriptionListallenvironmentsrunningontheserver.
Usageenv_list_all(x)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
env_monitor_close7ValueAlistmappinginstance_idtoenv_ide.
g.
list("3c657dbc"="CartPole-v0")foreveryenvontheserver.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_list_all(client)##End(Notrun)env_monitor_closeFlushallmonitordatatodisk.
DescriptionFlushallmonitordatatodisk.
Usageenv_monitor_close(x,instance_id)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
ValueNULL.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)env_monitor_close(client,instance_id)##End(Notrun)8env_monitor_startenv_monitor_startStartmonitoring.
DescriptionStartmonitoring.
Usageenv_monitor_start(x,instance_id,directory,force=FALSE,resume=FALSE)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
directoryThedirectorytowritethetrainingdatato.
DefaultstoFALSE.
forceClearoutexistingtrainingdatafromthisdirectory(bydeletingeverylepre-xedwith"openaigym").
DefaultstoNULL.
resumeRetainthetrainingdataalreadyinthisdirectory,whichwillbemergedwithournewdata.
DefaultstoFALSE.
ValueNULL.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)outdir<-"/tmp/random-agent-results"env_monitor_start(client,instance_id,outdir,force=TRUE,resume=FALSE)##End(Notrun)env_observation_space_info9env_observation_space_infoGetinformation(nameanddimensions/bounds)oftheenvironment'sobservationspace.
DescriptionGetinformation(nameanddimensions/bounds)oftheenvironment'sobservationspace.
Usageenv_observation_space_info(x,instance_id)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
ValueAlistcontaining"name"(suchas"Discrete"),andadditionaldimensionalinfo(suchas"n")whichvariesfromspacetospace.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)env_observation_space_info(client,instance_id)##End(Notrun)env_resetResetthestateoftheenvironmentandreturnaninitialobservation.
DescriptionResetthestateoftheenvironmentandreturnaninitialobservation.
Usageenv_reset(x,instance_id)10env_stepArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
ValueTheinitialobservationofthespace.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)env_reset(client,instance_id)##End(Notrun)env_stepStepthoughanenvironmentusinganaction.
DescriptionStepthoughanenvironmentusinganaction.
Usageenv_step(x,instance_id,action,render=FALSE)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
instance_idAshortidentier(suchas"3c657dbc")fortheenvironmentinstance.
actionAnactiontotakeintheenvironment.
renderWhethertorendertheenvironment.
DefaultstoFALSE.
ValueAlistconsistingofthefollowing:action;anactiontotakeintheenvironment,observation;anagent'sobservationofthecurrentenvironment,reward;theamountofrewardreturnedafterpre-viousaction,done;whethertheepisodehasended,andinfo;alistcontainingauxiliarydiagnosticinformation.
get_request11Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)env_id<-"CartPole-v0"instance_id<-env_create(client,env_id)action<-env_action_space_sample(client,instance_id)env_step(client,instance_id,action)##End(Notrun)get_requestSubmitaGETrequesttoanOpenAIGymserver.
DescriptionSubmitaGETrequesttoanOpenAIGymserver.
Usageget_request(x,route,data=NULL)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
routeTheURLpathorendpoint.
dataURLqueryarguments.
DefaultvalueisNULL.
ValueIftheresponsecodeis200or204,aparsedresponse.
Else,aservererrororraisedexception.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)route<-"/v1/envs/"get_request(client,route)##End(Notrun)gymgym:ProvidesAccesstotheOpenAIGymAPIDescriptiongym:ProvidesAccesstotheOpenAIGymAPI12post_requestparse_server_error_or_raise_for_statusParsetheservererrororraiseforstatus.
DescriptionParsetheservererrororraiseforstatus.
Usageparse_server_error_or_raise_for_status(response)ArgumentsresponseAresponseobjectfromhttr::POSTorhttr::GET.
ValueIftheresponsecodeis200or204,aparsedresponse.
Else,aservererrororraisedexception.
Examples##Notrun:b2<-"http://httpbin.
org/post"response<-httr::POST(b2,body="Asimpletextstring")parse_server_error_or_raise_for_status(response)##End(Notrun)post_requestSubmitaPOSTrequesttoanOpenAIGymserver.
DescriptionSubmitaPOSTrequesttoanOpenAIGymserver.
Usagepost_request(x,route,data=NULL)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
routeTheURLpathorendpoint.
dataURLqueryarguments.
DefaultvalueisNULL.
print.
GymClient13ValueIftheresponsecodeis200or204,aparsedresponse.
Else,aservererrororraisedexception.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)route<-"/v1/envs/"env_id<-"CartPole-v0"data<-list(env_id=env_id)post_request(client,route,data)##End(Notrun)print.
GymClientRepresentaGymClientinstanceonthecommandline.
DescriptionRepresentaGymClientinstanceonthecommandline.
Usage##S3methodforclassGymClientprint(x,.
.
.
)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
.
.
.
Furtherargumentspassedtoorfromothermethods.
ValuexAGymClientinstance.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)print(client)##End(Notrun)14shutdown_serverrandom_discrete_agentAsamplerandomdiscreteagent.
DescriptionAsamplerandomdiscreteagent.
Usagerandom_discrete_agent(n)ArgumentsnThenumberofdiscreteactionspacesavailable.
ValueNULL.
Examplesagent<-random_discrete_agent(10)shutdown_serverRequestaservershutdown.
DescriptionRequestaservershutdown.
Usageshutdown_server(x)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
ValueNULLCurrentlyusedbytheintegrationteststorepeatedlycreateanddestroyfreshcopiesoftheserverrunninginaseparatethread.
upload15Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)shutdown_server(client)##End(Notrun)uploadFlushallmonitordatatodisk.
DescriptionFlushallmonitordatatodisk.
Usageupload(x,training_dir,api_key=NULL,algorithm_id=NULL)ArgumentsxAninstanceofclass"GymClient";thisobjecthas"remote_base"asanattribute.
training_dirAdirectorycontainingtheresultsofatrainingrun.
api_keyYourOpenAIAPIkey.
algorithm_idAnarbitrarystringindicatingtheparicularversionofthealgorithm(includingchoicesofparameters)youarerunning.
ValueNULL.
Examples##Notrun:remote_base<-"http://127.
0.
0.
1:5000"client<-create_GymClient(remote_base)outdir<-"/tmp/random-agent-results"upload(client,outdir)##End(Notrun)Indexcreate_GymClient,2env_action_space_contains,3env_action_space_info,3env_action_space_sample,4env_close,5env_create,6env_list_all,6env_monitor_close,7env_monitor_start,8env_observation_space_info,9env_reset,9env_step,10get_request,11gym,11gym-package(gym),11parse_server_error_or_raise_for_status,12post_request,12print.
GymClient,13random_discrete_agent,14shutdown_server,14upload,1516

Atcloud:全场8折优惠,美国/加拿大/英国/法国/德国/新加坡vps,500g大硬盘/2T流量/480G高防vps,$4/月

atcloud怎么样?atcloud刚刚发布了最新的8折优惠码,该商家主要提供常规cloud(VPS)和storage(大硬盘存储)系列VPS,其数据中心分布在美国(俄勒冈、弗吉尼亚)、加拿大、英国、法国、德国、新加坡,所有VPS默认提供480Gbps的超高DDoS防御。Atcloud高防VPS。atcloud.net,2020年成立,主要提供基于KVM虚拟架构的VPS、只能DNS解析、域名、SS...

10gbiz首月半价月付2.36美元,香港/洛杉矶VPS、硅谷独立服务器/站群服务器

收到10gbiz发来的7月份优惠方案,中国香港、美国洛杉矶机房VPS主机4折优惠码,优惠后洛杉矶VPS月付2.36美元起,香港VPS月付2.75美元起。这是一家2020年成立的主机商,提供的产品包括独立服务器租用和VPS主机等,数据中心在美国洛杉矶、圣何塞和中国香港。商家VPS主机基于KVM架构,支持使用PayPal或者支付宝付款。洛杉矶VPS架构CPU内存硬盘带宽系统价格单核512MB10GB1...

建站选择网站域名和IP主机地址之间关系和注意要点

今天中午的时候有网友联系到在选择网站域名建站和主机的时候问到域名和IP地址有没有关联,或者需要注意的问题。毕竟我们在需要建站的时候,我们需要选择网站域名和主机,而主机有虚拟主机,包括共享和独立IP,同时还有云服务器、独立服务器、站群服务器等形式。通过这篇文章,简单的梳理关于网站域名和IP之间的关系。第一、什么是域名所谓网站域名,就是我们看到的类似"www.laozuo.org",我们可以通过直接记...

servererror为你推荐
phpadmin下载phpmyadmin怎么安装啊?可以直接下载安装吗?还需要下载其他数据库吗?搜狗360360浏览器为什么不能让我自动登录了企业建网站企业为什么要建网站googlepr值seo谷歌pr值和什么有关系cuteftp什么是CuteFTP?如何将网站内容上传(FTP)到网站空间?163yeahyeah邮箱和163邮箱的区别在哪里 那个好用波音737起飞爆胎为什么客机每次起飞都要先跑一段距离大飞资讯单仁资讯集团怎么样刚刚网刚刚网上刷单被骗了5万多怎么办啊 报警有用吗佛山海虹海虹蒸多长时间
虚拟空间租用 成都虚拟空间 企业域名备案 贝锐花生壳域名 星星海 rak机房 美国主机代购 网站监控 2017年万圣节 网盘申请 三拼域名 创梦 秒杀汇 中国网通测速 33456 vip域名 如何注册阿里云邮箱 华为云盘 路由跟踪 smtp服务器地址 更多