Skip to content

Commit

Permalink
Fix account feature set not available. (#2976)
Browse files Browse the repository at this point in the history
* Fix account feature set not available

* Update the command

* Make overwrite equal to true
  • Loading branch information
fredms authored Feb 5, 2024
1 parent 42418cd commit c0a274f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ REDIS_NAME=${RESOURCE_GROUP}rds
FEATURE_VERSION=$(((RANDOM%10)+1))
FEATURESTORE_NAME="my-featurestore"
ACCOUNT_ENTITY_PATH="./featurestore/entities/account.yaml"
ACCOUNT_FEATURESET_PATH="./featurestore/featuresets/transactions/featureset_asset.yaml"
TRANSACTIONS_FEATURESET_PATH="./featurestore/featuresets/transactions/featureset_asset.yaml"
ACCOUNT_FEATURESET_PATH="./featurestore/featuresets/accounts/featureset_asset.yaml"
TRANSACTION_ASSET_MAT_YML="./featurestore/featuresets/transactions/featureset_asset_offline_enabled.yaml"
STORAGE_ACCOUNT_NAME="fstorestorage"
STORAGE_FILE_SYSTEM_NAME="offlinestore"
Expand All @@ -26,7 +27,7 @@ GEN2_CONTAINER_ARM_ID="/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${RESOUR

az ml feature-store create --subscription $SUBSCRIPTION_ID --resource-group $RESOURCE_GROUP --location $LOCATION --name $FEATURESTORE_NAME
az ml feature-store-entity create --file $ACCOUNT_ENTITY_PATH --resource-group $RESOURCE_GROUP --workspace-name $FEATURESTORE_NAME
az ml feature-set create --file $ACCOUNT_FEATURESET_PATH --resource-group $RESOURCE_GROUP --workspace-name $FEATURESTORE_NAME
az ml feature-set create --file $TRANSACTIONS_FEATURESET_PATH --resource-group $RESOURCE_GROUP --workspace-name $FEATURESTORE_NAME
az storage account create --name $STORAGE_ACCOUNT_NAME --enable-hierarchical-namespace true --resource-group $RESOURCE_GROUP --location $LOCATION --subscription $SUBSCRIPTION_ID
az storage fs create --name $STORAGE_FILE_SYSTEM_NAME --account-name $STORAGE_ACCOUNT_NAME --subscription $SUBSCRIPTION_ID

Expand All @@ -36,7 +37,7 @@ UAI_OID=$(az identity show --resource-group $RESOURCE_GROUP -n $UAI_NAME --query
az role assignment create --role "AzureML Data Scientist" --assignee-object-id $UAI_OID --assignee-principal-type ServicePrincipal --scope $FEATURE_STORE_ARM_ID
az role assignment create --role "Storage Blob Data Contributor" --assignee-object-id $UAI_OID --assignee-principal-type ServicePrincipal --scope $GEN2_CONTAINER_ARM_ID


az ml feature-set create --file $ACCOUNT_FEATURESET_PATH --resource-group $RESOURCE_GROUP --feature-store-name $FEATURESTORE_NAME
# az ml feature-set update --file $TRANSACTION_ASSET_MAT_YML --resource-group $RESOURCE_GROUP --workspace-name $FEATURESTORE_NAME

COMPUTE_CLUSTER_NAME="cpu-cluster-fs"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
features:
- name: accountCountry
type: string
- name: isUserRegistered
type: boolean
- name: numPaymentRejects1dPerUser
type: double
- name: accountAge
type: double
index_columns:
- name: accountID
type: string
source:
path: wasbs://[email protected]/feature-store-prp/datasources/accounts-precalculated/*.parquet
timestamp_column:
name: timestamp
type: parquet
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@
"if not os.path.exists(accounts_featureset_spec_folder):\n",
" os.makedirs(accounts_featureset_spec_folder)\n",
"\n",
"accounts_featureset_spec.dump(accounts_featureset_spec_folder)"
"accounts_featureset_spec.dump(accounts_featureset_spec_folder, overwrite=True)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@
"if not os.path.exists(accounts_featureset_spec_folder):\n",
" os.makedirs(accounts_featureset_spec_folder)\n",
"\n",
"accounts_featureset_spec.dump(accounts_featureset_spec_folder, overwrite=False)"
"accounts_featureset_spec.dump(accounts_featureset_spec_folder, overwrite=True)"
]
},
{
Expand Down

0 comments on commit c0a274f

Please sign in to comment.