diff --git a/pyproject.toml b/pyproject.toml index f8cf5d7..2747860 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,6 +8,7 @@ version = "0.1.0" description = "Surrogate modeling." authors = ["Miki Verma "] readme = "README.md" +package-mode = false # The priorities of these are backwards relative to what they should # actually be. See diff --git a/src/util.py b/src/util.py index 9afedf8..e81bb51 100644 --- a/src/util.py +++ b/src/util.py @@ -3,15 +3,17 @@ from cloudpathlib import CloudPath import collections from functools import reduce, partial +import os import re from typing import List, Dict from pyspark.sql import DataFrame import pyspark.sql.functions as F from pyspark.sql.types import BooleanType, DoubleType, LongType, StructField, StructType -from src import constants +import constants -from databricks.sdk.runtime import * +if os.environ.get("DATABRICKS_RUNTIME_VERSION", None): + from databricks.sdk.runtime import * # move into a new resstock.py util? def clean_columns(