Skip to content

[API] Add synchronous experiment API with Path inputs - #1060

Draft
podkidyshev wants to merge 1 commit into
ipod/api-cli-executionfrom
ipod/api-path-inputs
Draft

podkidyshev wants to merge 1 commit into
ipod/api-cli-executionfrom
ipod/api-path-inputs

Conversation

@podkidyshev

@podkidyshev podkidyshev commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add synchronous run_experiment, validate_scenario, list_experiments, and get_experiment in cloudai.api. Scenario and system inputs are configuration-file Path objects; get_experiment accepts a directory or JSON file path.
  • Share execution logic with the CLI. Allow parsing errors to propagate to API callers, raise job-submission errors, and select single-sbatch runners per invocation without changing the registry.
  • Return the existing experiment model, allocate unique result directories, and document the API. Configuration parsing otherwise uses the existing parser.

Test Plan

  • Automated CI.
  • Manual macOS standalone test: validated a scenario file referencing sleep.toml relatively, ran Sleep synchronously, and verified the completed experiment through both listing and retrieval.
PASS: Path inputs, relative test reference, synchronous Sleep, listing and retrieval

Additional Notes

Based on #1064. Follow-ups: #1061 adds TOML-text inputs; #1062 adds background execution.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Ivan Podkidyshev <ipodkidyshev@nvidia.com>
@podkidyshev
podkidyshev changed the base branch from ipod/api-handlers-compat to ipod/api-cli-execution September 28, 2026 16:18

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant