facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.16k stars 346 forks source link

Test/unit tests pareto optimizer #1109

Open Marco-Premier opened 3 weeks ago

Marco-Premier commented 3 weeks ago

Project Robyn

Add tests for pareto_optimizer

Test Plan

testresult

test_coverage

dhavalpatel624624 commented 3 weeks ago

Can you add the pytest run results? Also are we going to be using the unittest library or pytest? We should standardize the libraries we use across all unit tests. Also, I think this needs a rebase on robynpy_release (you are out of date currently)

Also, are there any common best practices that should be followed here for generating mock data. I feel like there is a lot of redundancy in how the data is mocked for each function

Marco-Premier commented 3 weeks ago

Can you add the pytest run results? Also are we going to be using the unittest library or pytest? We should standardize the libraries we use across all unit tests. Also, I think this needs a rebase on robynpy_release (you are out of date currently)

Also, are there any common best practices that should be followed here for generating mock data. I feel like there is a lot of redundancy in how the data is mocked for each function

Goog points. I'm happy to use pytest. I refactor the code to use pytest and to group common mock data setup using pytest fixture. Also I noticed that in tests where we aim to use pytest we still depend on unittest framework, eg. for patch, MagicMock etc...

We may consider using the pytest-mock instead. I'd do that on a separate PR