Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hello-ccwf to ci #2316

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,19 @@ tests:
args: { server_model_names: ["server"] }
- path: tests.integration_test.src.validators.NumpySAGResultValidator
args: { expected_result: [ [ 4, 5, 6 ], [ 7, 8, 9 ], [ 10, 11, 12 ] ] }
- test_name: "run hello-ccwf"
# TODO: add a result validator for the "models" saved on client site (ccwf)
event_sequence:
- "trigger":
"type": "server_log"
"data": "Server started"
"actions": [ "submit_job hello-ccwf/jobs/swarm_cse_numpy" ]
"result":
"type": "job_submit_success"
- "trigger":
"type": "run_state"
"data": { "run_finished": True }
"actions": [ "ensure_current_job_done" ]
"result":
"type": "run_state"
"data": { "run_finished": True }
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@


class NumpySAGResultValidator(FinishJobResultValidator):
def __init__(self, expected_result):
def __init__(self, expected_result, model_name: str = "server.npy"):
super().__init__()
self.expected_result = np.array(expected_result)
self.model_name = model_name

def validate_finished_results(self, job_result, client_props) -> bool:
server_run_dir = job_result["workspace_root"]
Expand All @@ -32,7 +33,7 @@ def validate_finished_results(self, job_result, client_props) -> bool:
self.logger.error(f"models dir {models_dir} doesn't exist.")
return False

model_path = os.path.join(models_dir, "server.npy")
model_path = os.path.join(models_dir, self.model_name)
if not os.path.isfile(model_path):
self.logger.error(f"model_path {model_path} doesn't exist.")
return False
Expand Down