Skip to content

Commit

Permalink
test the random forest model in the main pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
panstav1 committed Nov 21, 2023
1 parent 8ebd294 commit e16f893
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 4 additions & 2 deletions components/test_regression_model/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ channels:
- defaults
dependencies:
- pandas=1.1.4
- numpy==1.24.4
- pip=20.3.3
- mlflow=1.14.1
- scikit-learn=0.24.1
- pip:
- wandb==0.10.31
- protobuf==3.20.*
- mlflow==2.2.2
- wandb==0.12.17
- git+https://github.com/udacity/nd0821-c2-build-model-workflow-starter.git#egg=wandb-utils&subdirectory=components
2 changes: 1 addition & 1 deletion components/test_regression_model/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def go(args):
test_dataset_path = run.use_artifact(args.test_dataset).file()

# Read test dataset
X_test = pd.read_csv(test_dataset_path)
X_test = pd.read_parquet(test_dataset_path)
y_test = X_test.pop("price")

logger.info("Loading model and performing inference on test set")
Expand Down
13 changes: 6 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,12 @@ def go(config: DictConfig):


if "test_regression_model" in active_steps:

##################
# Implement here #
##################

pass

_ = mlflow.run (os.path.join(root_path, f"{config['main']['components_repository']}/test_regression_model"),
'main',
parameters={
"mlflow_model": config['modeling']['output_artifact'] +':prod',
"test_dataset": 'test_data.parquet:latest'
})

if __name__ == "__main__":
go()

0 comments on commit e16f893

Please sign in to comment.