| 1 | import { GcpEnvironment } from "@/GCP/Environment"; |
| 2 | import { MinimumLogLevel } from "effect/References"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | |
| 5 | export 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. |
| 15 | export const runLifecycle = !!process.env.GCP_TEST_ML_LEGACY_PROJECT; |
| 16 | |
| 17 | export const runVersionLifecycle = |
| 18 | runLifecycle && !!process.env.GCP_TEST_ML_DEPLOYMENT_URI; |
| 19 | |
| 20 | export const currentProject = GcpEnvironment.current.pipe( |
| 21 | Effect.map((env) => env.project), |
| 22 | ); |
| 23 | |
| 24 | export const region = "us-central1"; |