Skip to content

Commit

Permalink
addition to requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
cmuslima committed Sep 7, 2023
1 parent 7037814 commit 3e35365
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
26 changes: 14 additions & 12 deletions App/trial.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ async def run(self):
print('waiting for messages')
print('self.play', self.play)
print('self.done', self.done)
await self.render_all_frames()
# while(self.play):
# #print('self.play', self.play)
# await self.render_all_frames()
while(self.play):
print('self.play', self.play)

# if self.modality == 'pref':
# await self.render_policy()

# else:
# print('rendering frame')
# render = await self.get_render()
# await self.send_render(render)
# await self.take_step()
# time.sleep(1/self.framerate)
if self.modality == 'pref':
await self.render_policy()
else:
print('rendering frame')
render = await self.get_render()
await self.send_render(render)
await self.take_step()
time.sleep(1/self.framerate)



Expand Down Expand Up @@ -256,6 +256,7 @@ async def handle_command(self, message):
print(f"{TAG} handle_command function: ", command)
print('Pass this?')
if command == 'start':

self.play = True

if self.modality == 'pref':
Expand Down Expand Up @@ -478,6 +479,7 @@ async def render_policy(self):
# print('done')
# break
self.play = False
self.action = 'None'
print('self.play is now False')
async def main():
trial = Trial()
Expand Down
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ project:
finalStep: exampleThank.html # required, filename can be same as last numbered step
teamMembers: # str
trial:
modality: demo
modality: pref
actionBufferLifespan: 1 # int
maxEpisodes: 20 # int
game: MountainCar-v0 # full environment name
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ python-dotenv==0.14.0
pyYaml==5.4
joblib==1.0.1
numpy==1.21.0
scikit-learn==0.24.2
scipy==1.7.0
sklearn==0.0
threadpoolctl==2.1.0
pexpect
pexpect
gym==0.21.0
pyglet==1.5.27

0 comments on commit 3e35365

Please sign in to comment.