Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagodallacqua-hpe committed Oct 18, 2024
1 parent 5300545 commit 7a1644e
Showing 1 changed file with 27 additions and 13 deletions.
40 changes: 27 additions & 13 deletions webui/react/src/e2e/tests/experimentList.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,19 +568,33 @@ test.describe('Experiment List', () => {
let experimentId: number;

// create a new project, workspace and experiment
test.beforeAll(async ({ backgroundApiProject, backgroundApiWorkspace, newProject: { response: { project } } }) => {
destinationWorkspace = (await backgroundApiWorkspace.createWorkspace(backgroundApiWorkspace.new())).workspace;
destinationProject = (await backgroundApiProject.createProject(
project.workspaceId,
backgroundApiProject.new({ projectProps: { workspaceId: project.workspaceId } }),
)).project;

const expId = Number(detExecSync(
`experiment create ${fullPath('examples/tutorials/mnist_pytorch/adaptive.yaml')} --paused --project_id ${project.id}`,
).split(' ')[2]); // returns in the format "Created experiment <exp_id>"

if (!Number.isNaN(expId)) experimentId = expId;
});
test.beforeAll(
async ({
backgroundApiProject,
backgroundApiWorkspace,
newProject: {
response: { project },
},
}) => {
destinationWorkspace = (
await backgroundApiWorkspace.createWorkspace(backgroundApiWorkspace.new())
).workspace;
destinationProject = (
await backgroundApiProject.createProject(
project.workspaceId,
backgroundApiProject.new({ projectProps: { workspaceId: project.workspaceId } }),
)
).project;

const expId = Number(
detExecSync(
`experiment create ${fullPath('examples/tutorials/mnist_pytorch/adaptive.yaml')} --paused --project_id ${project.id}`,
).split(' ')[2],
); // returns in the format "Created experiment <exp_id>"

if (!Number.isNaN(expId)) experimentId = expId;
},
);

// cleanup
test.afterAll(async ({ backgroundApiProject, backgroundApiWorkspace }) => {
Expand Down

0 comments on commit 7a1644e

Please sign in to comment.