Skip to content

Commit

Permalink
fix: make completion action optional
Browse files Browse the repository at this point in the history
  • Loading branch information
adeprez committed Oct 1, 2024
1 parent f7aefc3 commit c158919
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lavague-sdk/lavague/sdk/trajectory/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ def is_running(self):

def next_action(self):
ret = self._controller.next_step(self.run_id)
self.actions.append(ret.action)
self.status = ret.run_status
if ret.action:
self.actions.append(ret.action)
return ret.action

def run_to_completion(self):
Expand Down
4 changes: 2 additions & 2 deletions lavague-sdk/lavague/sdk/trajectory/model.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from enum import Enum
from typing import List, Tuple
from typing import List, Tuple, Optional
from pydantic import BaseModel, SerializeAsAny
from lavague.sdk.action import Action

Expand Down Expand Up @@ -31,4 +31,4 @@ def write_to_file(self, file_path: str):

class StepCompletion(BaseModel):
run_status: RunStatus
action: Action
action: Optional[Action]

0 comments on commit c158919

Please sign in to comment.