Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ollmer committed May 6, 2024
1 parent 9556c4a commit c115007
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sweagent/environment/swe_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ def reset(self, index: Optional[int] = None, apply_test_patch: bool = False) ->

if self.args.cache_task_images:
cached_image = f"{self.cached_image_prefix}{index}"
if cached_image is not None and image_exists(cached_image):
if image_exists(cached_image):
logger.info(f"Restore environment from cached image {cached_image}")
self.stop_container() # stop current container
self._init_container(cached_image=cached_image)
self.communicate("export $(xargs </.env)")
envs = self.communicate("env")
logger.debug(f"Environment variables after loading cached image:\n{envs}\n")
logger.debug(f"Environment variables restored from the image:\n{envs}\n")
if apply_test_patch:
self._apply_test_patch()
return None, info
Expand Down

0 comments on commit c115007

Please sign in to comment.