Skip to content

Commit 5a12a09

Browse files
authored
Missing model transform folder for hub CLI (#1330)
## Summary ## Checklist - [ ] Added Unit Tests - [ ] Covered by existing CI - [ ] Integration tested - [ ] Documentation update <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for model transforms as a configurable artifact type in the repository. * Model transforms are integrated into repository configuration and mappings so they appear and are manageable alongside other artifact types. * Detection now recognizes model transforms in compiled artifact paths so they are processed consistently. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 71e15ef commit 5a12a09

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

python/src/ai/chronon/repo/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from gen_thrift.api.ttypes import ConfType, GroupBy, Join, Model, StagingQuery
15+
from gen_thrift.api.ttypes import ConfType, GroupBy, Join, Model, ModelTransforms, StagingQuery
1616

1717
JOIN_FOLDER_NAME = "joins"
1818
GROUP_BY_FOLDER_NAME = "group_bys"
1919
STAGING_QUERY_FOLDER_NAME = "staging_queries"
2020
MODEL_FOLDER_NAME = "models"
21+
MODEL_TRANSFORM_FOLDER_NAME = "model_transforms"
2122
# TODO - make team part of thrift API?
2223
TEAMS_FILE_PATH = "teams.json"
2324
OUTPUT_ROOT = "production"
@@ -29,11 +30,13 @@
2930
JOIN_FOLDER_NAME: Join,
3031
STAGING_QUERY_FOLDER_NAME: StagingQuery,
3132
MODEL_FOLDER_NAME: Model,
33+
MODEL_TRANSFORM_FOLDER_NAME: ModelTransforms
3234
}
3335

3436
FOLDER_NAME_TO_CONF_TYPE = {
3537
GROUP_BY_FOLDER_NAME: ConfType.GROUP_BY,
3638
JOIN_FOLDER_NAME: ConfType.JOIN,
3739
STAGING_QUERY_FOLDER_NAME: ConfType.STAGING_QUERY,
3840
MODEL_FOLDER_NAME: ConfType.MODEL,
41+
MODEL_TRANSFORM_FOLDER_NAME: ConfType.MODEL_TRANSFORMS
3942
}

python/src/ai/chronon/repo/hub_runner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def get_conf_type(conf):
7070
return "groupbys"
7171
elif "compiled/models" in conf:
7272
return "models"
73+
elif "compiled/model_transforms" in conf:
74+
return" model_transforms"
7375
else:
7476
raise ValueError(f"Unsupported conf type: {conf}")
7577

0 commit comments

Comments
 (0)