1import { GcpEnvironment } from "@/GCP/Environment";
2import { MinimumLogLevel } from "effect/References";
3import * as Effect from "effect/Effect";
4
5export const logLevel = Effect.provideService(
6 MinimumLogLevel,
7 process.env.DEBUG ? "Debug" : "Info",
8);
9
10// AI Platform Training & Prediction (`ml.googleapis.com`) is deprecated: new
11// projects get AiPlatformDeprecated ("Cloud AI Platform has been deprecated. Please use
12// Vertex AI … instead."). Set GCP_TEST_ML_LEGACY_PROJECT=1 on a project that
13// still has legacy access. Version create also needs a trained SavedModel at
14// GCP_TEST_ML_DEPLOYMENT_URI.
15export const runLifecycle = !!process.env.GCP_TEST_ML_LEGACY_PROJECT;
16
17export const runVersionLifecycle =
18 runLifecycle && !!process.env.GCP_TEST_ML_DEPLOYMENT_URI;
19
20export const currentProject = GcpEnvironment.current.pipe(
21 Effect.map((env) => env.project),
22);
23
24export const region = "us-central1";