Skip to content

feat: experimentation engine#1446

Open
dipratap wants to merge 3 commits intomainfrom
expe
Open

feat: experimentation engine#1446
dipratap wants to merge 3 commits intomainfrom
expe

Conversation

@dipratap
Copy link
Contributor

Please ensure your pull request adheres to the following guidelines:

  • make sure to link the related issues in this description
  • when merging / squashing, make sure the fixed issue references are visible in the commits, for easy compilation of release notes

Related Issues

Thanks for contributing!

@github-actions
Copy link

This PR will trigger a patch release when merged.

const DEFAULT_EXPERIMENT_PLATFORMS = ['chatgpt_free', 'perplexity'];
const PRE_PHASE_CRON_EXPRESSION = '0 * * * *';
const POST_PHASE_CRON_EXPRESSION = '0 0 * * *';
const PRE_PHASE_EXPIRY_MS = 10 * 60 * 60 * 1000; // 10 hours
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

14 hours - to make sure we have 14 runs each for pre and post phase.

submitScrapeJob(params: ScrapeJobParams): Promise<DrsJobResult>;
lookupScrapeResults(params: ScrapeLookupParams): Promise<ScrapeLookupResponse | null>;
triggerBrandDetection(siteId: string, options?: BrandDetectionOptions): Promise<Record<string, unknown> | null>;
submitExperiment(params: SubmitExperimentParams): Promise<ExperimentSubmitResult>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submitExperiment and getExperimentStatus are not required now

DEPLOYED: 'deployed',
POST_ANALYSIS_SUBMITTED: 'post_analysis_submitted',
POST_ANALYSIS_DONE: 'post_analysis_done',
FAILED: 'failed',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does failed mean here?
we should also have pre analysis failed


/**
* Creates an experiment schedule in DRS and optionally triggers it immediately.
* Uses the schedules API instead of legacy experiments API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no legacy experiments API

throw new Error('scheduleId is required');
}

this.log.info('Getting DRS schedule status', { siteId, scheduleId });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also requires ?include_jobs=true query param

Copy link
Contributor

@nit23uec nit23uec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline comments.

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.

2 participants