rapidfireai 0.0.1__py3-none-any.whl → 0.9.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rapidfireai might be problematic. Click here for more details.
- rapidfireai/__init__.py +11 -5
- rapidfireai/automl/__init__.py +20 -0
- rapidfireai/automl/base.py +48 -0
- rapidfireai/automl/datatypes.py +42 -0
- rapidfireai/automl/grid_search.py +125 -0
- rapidfireai/automl/model_config.py +102 -0
- rapidfireai/automl/random_search.py +145 -0
- rapidfireai/backend/__init__.py +0 -0
- rapidfireai/backend/chunks.py +63 -0
- rapidfireai/backend/controller.py +637 -0
- rapidfireai/backend/scheduler.py +137 -0
- rapidfireai/backend/worker.py +272 -0
- rapidfireai/cli.py +380 -0
- rapidfireai/db/__init__.py +0 -0
- rapidfireai/db/db_interface.py +135 -0
- rapidfireai/db/rf_db.py +694 -0
- rapidfireai/db/tables.sql +64 -0
- rapidfireai/dispatcher/dispatcher.py +391 -0
- rapidfireai/dispatcher/gunicorn.conf.py +25 -0
- rapidfireai/experiment.py +168 -0
- rapidfireai/frontend/build/asset-manifest.json +276 -0
- rapidfireai/frontend/build/favicon.ico +0 -0
- rapidfireai/frontend/build/index.html +1 -0
- rapidfireai/frontend/build/manifest.json +15 -0
- rapidfireai/frontend/build/pdf.worker.js +1 -0
- rapidfireai/frontend/build/report.html +39 -0
- rapidfireai/frontend/build/static/css/1482.3b7bf531.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/2730.3f8937ff.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/318.0def90a7.css +7 -0
- rapidfireai/frontend/build/static/css/4762.9b7b71f7.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/4950.487ecc8b.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/5170.2574ce9d.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/6121.4d541986.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/6343.dd6979f2.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/6534.433c213f.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/6920.ffac4b2a.css +2 -0
- rapidfireai/frontend/build/static/css/7246.bf2f0c87.css +9 -0
- rapidfireai/frontend/build/static/css/7367.dd6979f2.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/8690.05d081e5.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/9531.d0910d3c.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/9780.363e4943.chunk.css +1 -0
- rapidfireai/frontend/build/static/css/main~d91a9049.c0be472c.css +1 -0
- rapidfireai/frontend/build/static/js/1000.e5ed264b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1012.ac98ab59.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1079.6c13ac0d.js +1 -0
- rapidfireai/frontend/build/static/js/110.9059f3b8.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1142.872d0010.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1167.9a6da14c.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1248.60890b4f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1262.83dc7673.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1273.56da3e13.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/1273.56da3e13.chunk.js.LICENSE.txt +9 -0
- rapidfireai/frontend/build/static/js/1303.7d19305c.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1351.45076ff3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1355.b896a592.js +1 -0
- rapidfireai/frontend/build/static/js/1357.02c46a02.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1470.c51d60c6.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1482.23b74f50.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1500.19799d8d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1648.d3b9edc7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1860.7d96e3f9.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1909.5b1d9ff4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/1928.44245110.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/1928.44245110.chunk.js.LICENSE.txt +11 -0
- rapidfireai/frontend/build/static/js/1933.deba26ca.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/21.aac92802.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2103.0ca12071.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2258.b3b8fab4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2289.9ad51e87.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2323.7dd927d7.js +2 -0
- rapidfireai/frontend/build/static/js/2323.7dd927d7.js.LICENSE.txt +1 -0
- rapidfireai/frontend/build/static/js/2346.ed99ca72.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2386.0a660834.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2402.465048f9.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/243.5a83bbca.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2589.68571e16.js +1 -0
- rapidfireai/frontend/build/static/js/2647.65092bab.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2691.65d4a4e7.js +1 -0
- rapidfireai/frontend/build/static/js/2730.b38dd6f3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2746.ef752da4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2779.580d4491.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2799.fe5993b2.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2844.9708db79.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/2844.9708db79.chunk.js.LICENSE.txt +21 -0
- rapidfireai/frontend/build/static/js/2901.ee0c606b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2932.7cc0689b.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/2932.7cc0689b.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/2956.a393c8cc.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2972.679bed05.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/2985.7e51cdfa.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/2985.7e51cdfa.chunk.js.LICENSE.txt +51 -0
- rapidfireai/frontend/build/static/js/3093.488df653.js +1 -0
- rapidfireai/frontend/build/static/js/3145.66ee61b9.js +1 -0
- rapidfireai/frontend/build/static/js/3170.a22f966a.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/3170.a22f966a.chunk.js.LICENSE.txt +21 -0
- rapidfireai/frontend/build/static/js/3307.f6fb258c.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3325.d5b03d65.js +1 -0
- rapidfireai/frontend/build/static/js/3334.2d6704df.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/3334.2d6704df.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/3387.bb8edad3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3448.438e6579.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3460.735eea87.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3505.7fd3921a.js +2 -0
- rapidfireai/frontend/build/static/js/3505.7fd3921a.js.LICENSE.txt +9 -0
- rapidfireai/frontend/build/static/js/3510.cd167a00.js +2 -0
- rapidfireai/frontend/build/static/js/3510.cd167a00.js.LICENSE.txt +18 -0
- rapidfireai/frontend/build/static/js/3563.cc828e19.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/359.08960b84.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/359.08960b84.chunk.js.LICENSE.txt +4 -0
- rapidfireai/frontend/build/static/js/3608.403b4b79.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3652.cb8add7f.js +1 -0
- rapidfireai/frontend/build/static/js/3775.5230b157.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3817.53555d18.js +2 -0
- rapidfireai/frontend/build/static/js/3817.53555d18.js.LICENSE.txt +18 -0
- rapidfireai/frontend/build/static/js/3835.d9946ff9.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3964.874f0297.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3968.275cbc3d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/3999.765cbd82.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4020.4452c046.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4138.2f6f6d9f.js +1 -0
- rapidfireai/frontend/build/static/js/4160.f424554c.js +1 -0
- rapidfireai/frontend/build/static/js/4180.50cea095.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4221.b0bba3f5.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4250.5bb49278.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4297.15777d8f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4349.c965f2de.js +2 -0
- rapidfireai/frontend/build/static/js/4349.c965f2de.js.LICENSE.txt +1 -0
- rapidfireai/frontend/build/static/js/4484.4cbe5e7f.js +2 -0
- rapidfireai/frontend/build/static/js/4484.4cbe5e7f.js.LICENSE.txt +10 -0
- rapidfireai/frontend/build/static/js/4578.a8124588.js +1 -0
- rapidfireai/frontend/build/static/js/4596.89a97480.js +1 -0
- rapidfireai/frontend/build/static/js/4748.566f435a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4762.928e8a90.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4768.7945be63.js +2 -0
- rapidfireai/frontend/build/static/js/4768.7945be63.js.LICENSE.txt +1 -0
- rapidfireai/frontend/build/static/js/4804.26b50dd4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4850.62390a45.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4862.a0ccb221.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/491.5dc8ed40.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/492.9262f038.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/492.9262f038.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/4943.6d345fd3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/4950.bc182e62.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5042.d4f0c65a.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/5042.d4f0c65a.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/5170.0065e96f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5222.35c74a52.js +2 -0
- rapidfireai/frontend/build/static/js/5222.35c74a52.js.LICENSE.txt +10 -0
- rapidfireai/frontend/build/static/js/5223.3224f019.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/5223.3224f019.chunk.js.LICENSE.txt +3 -0
- rapidfireai/frontend/build/static/js/5229.7dd42316.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5286.4c1ad26b.js +1 -0
- rapidfireai/frontend/build/static/js/5486.21cff711.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5526.7b368956.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5605.1ee4d87b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5682.40b42d8b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5794.9433d867.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5826.38a56e8c.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/5826.38a56e8c.chunk.js.LICENSE.txt +1 -0
- rapidfireai/frontend/build/static/js/5862.50f42a0b.js +1 -0
- rapidfireai/frontend/build/static/js/5895.e26742f1.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/5919.edd4a5cf.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/598.a0e792ae.js +1 -0
- rapidfireai/frontend/build/static/js/6058.74162bf9.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/618.06051134.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/618.06051134.chunk.js.LICENSE.txt +21 -0
- rapidfireai/frontend/build/static/js/6335.9fca442d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6336.e05e1154.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6343.2bcd28ff.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6363.a319b8f2.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6478.344abf25.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6504.1c004564.js +1 -0
- rapidfireai/frontend/build/static/js/6534.ec7e149b.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6715.55a5c19c.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6756.e6cb993c.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/6756.e6cb993c.chunk.js.LICENSE.txt +10 -0
- rapidfireai/frontend/build/static/js/6762.acfde9fd.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/6762.acfde9fd.chunk.js.LICENSE.txt +19 -0
- rapidfireai/frontend/build/static/js/6846.67103d0e.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6861.34cf0198.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/6899.0eaf36a8.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/6899.0eaf36a8.chunk.js.LICENSE.txt +5 -0
- rapidfireai/frontend/build/static/js/6933.8b564944.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/699.d0437920.js +1 -0
- rapidfireai/frontend/build/static/js/7076.4182f63a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7186.42ad86d5.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7248.a46635fd.js +1 -0
- rapidfireai/frontend/build/static/js/725.6b15a14a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7266.3575539d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7270.0a1e84fc.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/7270.0a1e84fc.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/7367.7120474f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7436.8e226055.js +1 -0
- rapidfireai/frontend/build/static/js/7504.ef223844.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7603.ee049fe3.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7670.2835b49a.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/7670.2835b49a.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/7721.7390b3cc.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7731.5796cced.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/775.660a5deb.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/775.660a5deb.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/7832.7976a3e4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7844.72cc2e81.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/7948.48eab032.js +1 -0
- rapidfireai/frontend/build/static/js/7972.085079d4.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/7972.085079d4.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8017.a9e7dc5a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8023.75f1f3df.js +2 -0
- rapidfireai/frontend/build/static/js/8023.75f1f3df.js.LICENSE.txt +41 -0
- rapidfireai/frontend/build/static/js/8123.b69db974.js +1 -0
- rapidfireai/frontend/build/static/js/813.065a87e5.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/819.2056f122.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/819.2056f122.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8262.04bc17d1.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8300.75adcc4f.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8336.b1d3e764.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8365.26cf64ea.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8398.8bca8e0e.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/8398.8bca8e0e.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/847.33ceed50.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/847.33ceed50.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8486.8ec852a7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8497.19378265.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8541.4c55c9f4.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8690.e305a804.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/8690.e305a804.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8712.a9445fe6.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8763.61761e08.js +1 -0
- rapidfireai/frontend/build/static/js/8823.baf9bffd.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/8823.baf9bffd.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/8867.767462b7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8953.c0f88dea.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/8960.357cb1eb.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/8960.357cb1eb.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/9.f4492795.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/9.f4492795.chunk.js.LICENSE.txt +12 -0
- rapidfireai/frontend/build/static/js/9079.88a8d2a3.js +1 -0
- rapidfireai/frontend/build/static/js/9082.37c40520.chunk.js +10 -0
- rapidfireai/frontend/build/static/js/9133.90ae330d.js +2 -0
- rapidfireai/frontend/build/static/js/9133.90ae330d.js.LICENSE.txt +8 -0
- rapidfireai/frontend/build/static/js/9151.1ac359d5.js +2 -0
- rapidfireai/frontend/build/static/js/9151.1ac359d5.js.LICENSE.txt +8 -0
- rapidfireai/frontend/build/static/js/9168.027bf2fd.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9194.9c5cc548.chunk.js +10 -0
- rapidfireai/frontend/build/static/js/9244.026f4aee.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/936.2e02d037.js +2 -0
- rapidfireai/frontend/build/static/js/936.2e02d037.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/9369.7d1a0a1d.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9427.7c8442e7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/944.55948859.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9499.c53a82da.js +2 -0
- rapidfireai/frontend/build/static/js/9499.c53a82da.js.LICENSE.txt +62 -0
- rapidfireai/frontend/build/static/js/9531.3ce05781.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9547.92fac952.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/9547.92fac952.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/9620.b6e973a7.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9645.6fddfa65.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9669.d38dda6d.js +1 -0
- rapidfireai/frontend/build/static/js/9682.41b6b807.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/9720.19d5ae76.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/9720.19d5ae76.chunk.js.LICENSE.txt +23 -0
- rapidfireai/frontend/build/static/js/9723.d3c7fe9e.js +1 -0
- rapidfireai/frontend/build/static/js/9780.02a27630.chunk.js +10 -0
- rapidfireai/frontend/build/static/js/9808.d0ca9674.chunk.js +2 -0
- rapidfireai/frontend/build/static/js/9808.d0ca9674.chunk.js.LICENSE.txt +6 -0
- rapidfireai/frontend/build/static/js/9815.b8db3c5d.js +1 -0
- rapidfireai/frontend/build/static/js/9886.2940b53a.chunk.js +1 -0
- rapidfireai/frontend/build/static/js/main~1f912138.fa9d03b1.js +1 -0
- rapidfireai/frontend/build/static/js/main~43dd7041.2e00860d.js +1 -0
- rapidfireai/frontend/build/static/js/main~84781932.68deffff.js +1 -0
- rapidfireai/frontend/build/static/media/404-overflow.fad9a31861b0afba6f921ebb8e769688.svg +32 -0
- rapidfireai/frontend/build/static/media/RapidFire_Square_Bug.27ceb48296314a4bc0d4.png +0 -0
- rapidfireai/frontend/build/static/media/chart-bar.0fd4a63680fba840a7b69fbf07969f79.svg +7 -0
- rapidfireai/frontend/build/static/media/chart-contour.0d4b306f2669f3ad25375568935e3ce3.svg +5 -0
- rapidfireai/frontend/build/static/media/chart-difference.16174216d6f3b7c24f40e3541fe0ca2c.svg +20 -0
- rapidfireai/frontend/build/static/media/chart-image.cc434c4dc50780966344e2385a15f8fe.svg +6 -0
- rapidfireai/frontend/build/static/media/chart-line.0adaa2036bb4eb5956db6d0c7e925a3d.svg +4 -0
- rapidfireai/frontend/build/static/media/chart-parallel.da7dedf539b2af4b654d377c679173e4.svg +7 -0
- rapidfireai/frontend/build/static/media/chart-scatter.69118d0023a6ff3973f7fa913834ac47.svg +9 -0
- rapidfireai/frontend/build/static/media/default-error.f246ddf367c6fbd67942e5a13382a7f1.svg +26 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.1e59d2330b4c6deb84b3.ttf +0 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.20fd1704ea223900efa9.woff2 +0 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.8b43027f47b20503057d.eot +0 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.c1e38fd9e0e74ba58f7a.svg +2671 -0
- rapidfireai/frontend/build/static/media/fontawesome-webfont.f691f37e57f04c152e23.woff +0 -0
- rapidfireai/frontend/build/static/media/icon-visible-fill.8d34cd35303828fdfc15154f5536e63b.svg +7 -0
- rapidfireai/frontend/build/static/media/no-experiments.0e4f4a114ef73e7d81c09474aba64b6c.svg +22 -0
- rapidfireai/frontend/build/static/media/parallel-chart-placeholder.234ef0c5b220ef2a5a6fa5bafff173f7.svg +16 -0
- rapidfireai/frontend/build/static/media/permission-denied-lock.16036747d57cd663d7df223781a447b2.svg +14 -0
- rapidfireai/frontend/build/static/media/promo-modal-content.e3b2c6c568ac192b9bec54b838b54850.svg +30 -0
- rapidfireai/frontend/build/static/media/registered-model-grey-ok.8274b58d39504c8d1b8c358aa1c9aa35.svg +23 -0
- rapidfireai/frontend/build/static/media/warning.290a3b14118933547965e91ea61c5a61.svg +3 -0
- rapidfireai/frontend/proxy_middleware.py +233 -0
- rapidfireai/frontend/server.py +25 -0
- rapidfireai/ml/__init__.py +0 -0
- rapidfireai/ml/callbacks.py +176 -0
- rapidfireai/ml/checkpoint_utils.py +540 -0
- rapidfireai/ml/trainer.py +309 -0
- rapidfireai/start.sh +634 -0
- rapidfireai/utils/__init__.py +0 -0
- rapidfireai/utils/automl_utils.py +51 -0
- rapidfireai/utils/constants.py +141 -0
- rapidfireai/utils/datapaths.py +69 -0
- rapidfireai/utils/exceptions.py +82 -0
- rapidfireai/utils/experiment_utils.py +370 -0
- rapidfireai/utils/logging.py +87 -0
- rapidfireai/utils/mlflow_manager.py +121 -0
- rapidfireai/utils/serialize.py +15 -0
- rapidfireai/utils/shm_manager.py +469 -0
- rapidfireai/utils/trainer_config.py +23 -0
- rapidfireai/utils/worker_manager.py +219 -0
- rapidfireai/version.py +6 -0
- rapidfireai-0.9.10.dist-info/METADATA +247 -0
- rapidfireai-0.9.10.dist-info/RECORD +318 -0
- rapidfireai-0.9.10.dist-info/entry_points.txt +2 -0
- rapidfireai-0.0.1.dist-info/METADATA +0 -37
- rapidfireai-0.0.1.dist-info/RECORD +0 -6
- {rapidfireai-0.0.1.dist-info → rapidfireai-0.9.10.dist-info}/WHEEL +0 -0
- {rapidfireai-0.0.1.dist-info → rapidfireai-0.9.10.dist-info}/licenses/LICENSE +0 -0
- {rapidfireai-0.0.1.dist-info → rapidfireai-0.9.10.dist-info}/top_level.txt +0 -0
rapidfireai/start.sh
ADDED
|
@@ -0,0 +1,634 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# RapidFire AI Multi-Service Startup Script
|
|
4
|
+
# This script starts MLflow server, API server, and frontend tracking server
|
|
5
|
+
# Used for pip-installed package mode
|
|
6
|
+
|
|
7
|
+
set -e # Exit on any error
|
|
8
|
+
|
|
9
|
+
# Configuration
|
|
10
|
+
MLFLOW_PORT=5002
|
|
11
|
+
MLFLOW_HOST=127.0.0.1
|
|
12
|
+
FRONTEND_PORT=3000
|
|
13
|
+
FRONTEND_HOST=0.0.0.0
|
|
14
|
+
# API server configuration - these should match DispatcherConfig in constants.py
|
|
15
|
+
API_PORT=8080
|
|
16
|
+
API_HOST=127.0.0.1
|
|
17
|
+
|
|
18
|
+
# Colors for output
|
|
19
|
+
RED='\033[0;31m'
|
|
20
|
+
GREEN='\033[0;32m'
|
|
21
|
+
YELLOW='\033[1;33m'
|
|
22
|
+
BLUE='\033[0;34m'
|
|
23
|
+
NC='\033[0m' # No Color
|
|
24
|
+
|
|
25
|
+
# PID file to track processes
|
|
26
|
+
PID_FILE="rapidfire_pids.txt"
|
|
27
|
+
|
|
28
|
+
# Directory paths for pip-installed package
|
|
29
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
30
|
+
DISPATCHER_DIR="$SCRIPT_DIR/dispatcher"
|
|
31
|
+
FRONTEND_DIR="$SCRIPT_DIR/frontend"
|
|
32
|
+
|
|
33
|
+
# Function to print colored output
|
|
34
|
+
print_status() {
|
|
35
|
+
echo -e "${BLUE}[$(date '+%Y-%m-%d %H:%M:%S')]${NC} $1"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
print_success() {
|
|
39
|
+
echo -e "${GREEN}[$(date '+%Y-%m-%d %H:%M:%S')]${NC} $1"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
print_error() {
|
|
43
|
+
echo -e "${RED}[$(date '+%Y-%m-%d %H:%M:%S')]${NC} $1"
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
print_warning() {
|
|
47
|
+
echo -e "${YELLOW}[$(date '+%Y-%m-%d %H:%M:%S')]${NC} $1"
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Function to setup Python environment
|
|
51
|
+
setup_python_env() {
|
|
52
|
+
print_status "Setting up Python environment..."
|
|
53
|
+
|
|
54
|
+
# Check if the package can be imported
|
|
55
|
+
print_status "Verifying rapidfireai package availability..."
|
|
56
|
+
|
|
57
|
+
if python3 -c "import rapidfireai; print('Package imported successfully with python3')" 2>/dev/null; then
|
|
58
|
+
print_success "rapidfireai package is available with python3"
|
|
59
|
+
else
|
|
60
|
+
print_error "rapidfireai package is not available with python3"
|
|
61
|
+
|
|
62
|
+
# Try with python as fallback
|
|
63
|
+
print_status "Trying to import with python..."
|
|
64
|
+
if python -c "import rapidfireai; print('Package imported successfully with python')" 2>/dev/null; then
|
|
65
|
+
print_success "rapidfireai package is available with python"
|
|
66
|
+
else
|
|
67
|
+
print_error "rapidfireai package is not available with python"
|
|
68
|
+
print_warning "Try reinstalling the package: pip install rapidfireai"
|
|
69
|
+
return 1
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# Install any missing dependencies
|
|
74
|
+
print_status "Checking for required dependencies..."
|
|
75
|
+
if python3 -c "import mlflow, gunicorn, flask" 2>/dev/null; then
|
|
76
|
+
print_success "All required dependencies are available"
|
|
77
|
+
else
|
|
78
|
+
print_warning "Some dependencies may be missing. Installing requirements..."
|
|
79
|
+
pip install mlflow gunicorn flask flask-cors
|
|
80
|
+
fi
|
|
81
|
+
|
|
82
|
+
return 0
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
# Function to cleanup processes on exit
|
|
86
|
+
cleanup() {
|
|
87
|
+
print_warning "Shutting down services..."
|
|
88
|
+
|
|
89
|
+
# Kill processes by port (more reliable for MLflow)
|
|
90
|
+
for port in $MLFLOW_PORT $FRONTEND_PORT $API_PORT; do
|
|
91
|
+
local pids=$(lsof -ti :$port 2>/dev/null || true)
|
|
92
|
+
if [[ -n "$pids" ]]; then
|
|
93
|
+
print_status "Killing processes on port $port"
|
|
94
|
+
echo "$pids" | xargs kill -TERM 2>/dev/null || true
|
|
95
|
+
sleep 2
|
|
96
|
+
# Force kill if still running
|
|
97
|
+
local remaining_pids=$(lsof -ti :$port 2>/dev/null || true)
|
|
98
|
+
if [[ -n "$remaining_pids" ]]; then
|
|
99
|
+
echo "$remaining_pids" | xargs kill -9 2>/dev/null || true
|
|
100
|
+
fi
|
|
101
|
+
fi
|
|
102
|
+
done
|
|
103
|
+
|
|
104
|
+
# Clean up tracked PIDs
|
|
105
|
+
if [[ -f "$PID_FILE" ]]; then
|
|
106
|
+
while read -r pid service; do
|
|
107
|
+
if kill -0 "$pid" 2>/dev/null; then
|
|
108
|
+
print_status "Stopping $service (PID: $pid)"
|
|
109
|
+
# Kill process group to get child processes too
|
|
110
|
+
kill -TERM -$pid 2>/dev/null || kill -TERM $pid 2>/dev/null || true
|
|
111
|
+
sleep 1
|
|
112
|
+
# Force kill if still running
|
|
113
|
+
if kill -0 "$pid" 2>/dev/null; then
|
|
114
|
+
kill -9 -$pid 2>/dev/null || kill -9 $pid 2>/dev/null || true
|
|
115
|
+
fi
|
|
116
|
+
fi
|
|
117
|
+
done < "$PID_FILE"
|
|
118
|
+
rm -f "$PID_FILE"
|
|
119
|
+
fi
|
|
120
|
+
|
|
121
|
+
# Final cleanup - kill any remaining MLflow, gunicorn, or Flask processes
|
|
122
|
+
pkill -f "mlflow server" 2>/dev/null || true
|
|
123
|
+
pkill -f "gunicorn.*rapidfireai" 2>/dev/null || true
|
|
124
|
+
pkill -f "python3.*server.py" 2>/dev/null || true
|
|
125
|
+
pkill -f "python.*server.py" 2>/dev/null || true
|
|
126
|
+
|
|
127
|
+
# Additional cleanup for any remaining processes on our ports
|
|
128
|
+
for port in $MLFLOW_PORT $FRONTEND_PORT $API_PORT; do
|
|
129
|
+
local remaining_pids=$(lsof -ti :$port 2>/dev/null || true)
|
|
130
|
+
if [[ -n "$remaining_pids" ]]; then
|
|
131
|
+
print_status "Force killing remaining processes on port $port"
|
|
132
|
+
echo "$remaining_pids" | xargs kill -9 2>/dev/null || true
|
|
133
|
+
fi
|
|
134
|
+
done
|
|
135
|
+
|
|
136
|
+
print_success "All services stopped"
|
|
137
|
+
exit 0
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
# Function to check if a port is available
|
|
141
|
+
check_port() {
|
|
142
|
+
local port=$1
|
|
143
|
+
local service=$2
|
|
144
|
+
|
|
145
|
+
if lsof -Pi :$port -sTCP:LISTEN -t >/dev/null 2>&1; then
|
|
146
|
+
print_error "Port $port is already in use. Cannot start $service."
|
|
147
|
+
print_status "Processes using port $port:"
|
|
148
|
+
lsof -Pi :$port -sTCP:LISTEN 2>/dev/null || true
|
|
149
|
+
return 1
|
|
150
|
+
fi
|
|
151
|
+
return 0
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
# Function to check for common startup issues
|
|
155
|
+
check_startup_issues() {
|
|
156
|
+
print_status "Checking for common startup issues..."
|
|
157
|
+
|
|
158
|
+
# Check Python version and packages
|
|
159
|
+
if command -v python3 &> /dev/null; then
|
|
160
|
+
local python_version=$(python3 --version 2>&1)
|
|
161
|
+
print_status "Python version: $python_version"
|
|
162
|
+
|
|
163
|
+
# Check for required packages
|
|
164
|
+
local missing_packages=()
|
|
165
|
+
for package in mlflow gunicorn flask; do
|
|
166
|
+
if ! python3 -c "import $package" 2>/dev/null; then
|
|
167
|
+
missing_packages+=("$package")
|
|
168
|
+
fi
|
|
169
|
+
done
|
|
170
|
+
|
|
171
|
+
if [[ ${#missing_packages[@]} -gt 0 ]]; then
|
|
172
|
+
print_warning "Missing packages: ${missing_packages[*]}"
|
|
173
|
+
print_status "Installing missing packages..."
|
|
174
|
+
pip3 install "${missing_packages[@]}" || print_error "Failed to install packages"
|
|
175
|
+
fi
|
|
176
|
+
fi
|
|
177
|
+
|
|
178
|
+
# Check disk space
|
|
179
|
+
local available_space=$(df . | awk 'NR==2 {print $4}')
|
|
180
|
+
if [[ $available_space -lt 1000000 ]]; then
|
|
181
|
+
print_warning "Low disk space: ${available_space}KB available"
|
|
182
|
+
fi
|
|
183
|
+
|
|
184
|
+
# Check if we can write to current directory
|
|
185
|
+
if ! touch "$SCRIPT_DIR/test_write.tmp" 2>/dev/null; then
|
|
186
|
+
print_error "Cannot write to script directory: $SCRIPT_DIR"
|
|
187
|
+
return 1
|
|
188
|
+
fi
|
|
189
|
+
rm -f "$SCRIPT_DIR/test_write.tmp"
|
|
190
|
+
|
|
191
|
+
return 0
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
# Function to wait for service to be ready
|
|
195
|
+
wait_for_service() {
|
|
196
|
+
local host=$1
|
|
197
|
+
local port=$2
|
|
198
|
+
local service=$3
|
|
199
|
+
local max_attempts=${4:-30} # Allow custom timeout, default 30 seconds
|
|
200
|
+
local attempt=1
|
|
201
|
+
|
|
202
|
+
print_status "Waiting for $service to be ready on $host:$port (timeout: ${max_attempts}s)..."
|
|
203
|
+
|
|
204
|
+
while [ $attempt -le $max_attempts ]; do
|
|
205
|
+
if nc -z "$host" "$port" 2>/dev/null; then
|
|
206
|
+
print_success "$service is ready!"
|
|
207
|
+
return 0
|
|
208
|
+
fi
|
|
209
|
+
sleep 1
|
|
210
|
+
((attempt++))
|
|
211
|
+
done
|
|
212
|
+
|
|
213
|
+
print_error "$service failed to start within expected time (${max_attempts}s)"
|
|
214
|
+
return 1
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
# Function to start MLflow server
|
|
218
|
+
start_mlflow() {
|
|
219
|
+
print_status "Starting MLflow server..."
|
|
220
|
+
|
|
221
|
+
if ! check_port $MLFLOW_PORT "MLflow server"; then
|
|
222
|
+
return 1
|
|
223
|
+
fi
|
|
224
|
+
|
|
225
|
+
# Start MLflow server in background with logging
|
|
226
|
+
print_status "MLflow logs will be written to: $SCRIPT_DIR/mlflow.log"
|
|
227
|
+
|
|
228
|
+
# Use setsid on Linux, nohup on macOS
|
|
229
|
+
if command -v setsid &> /dev/null; then
|
|
230
|
+
setsid mlflow server \
|
|
231
|
+
--host $MLFLOW_HOST \
|
|
232
|
+
--port $MLFLOW_PORT \
|
|
233
|
+
--backend-store-uri sqlite:///mlflow.db > "$SCRIPT_DIR/mlflow.log" 2>&1 &
|
|
234
|
+
else
|
|
235
|
+
nohup mlflow server \
|
|
236
|
+
--host $MLFLOW_HOST \
|
|
237
|
+
--port $MLFLOW_PORT \
|
|
238
|
+
--backend-store-uri sqlite:///mlflow.db > "$SCRIPT_DIR/mlflow.log" 2>&1 &
|
|
239
|
+
fi
|
|
240
|
+
|
|
241
|
+
local mlflow_pid=$!
|
|
242
|
+
echo "$mlflow_pid MLflow" >> "$PID_FILE"
|
|
243
|
+
|
|
244
|
+
# Wait for MLflow to be ready
|
|
245
|
+
if wait_for_service $MLFLOW_HOST $MLFLOW_PORT "MLflow server"; then
|
|
246
|
+
print_success "MLflow server started (PID: $mlflow_pid)"
|
|
247
|
+
return 0
|
|
248
|
+
else
|
|
249
|
+
print_error "MLflow server failed to start. Checking for errors..."
|
|
250
|
+
|
|
251
|
+
# Check if process is still running
|
|
252
|
+
if ! kill -0 "$mlflow_pid" 2>/dev/null; then
|
|
253
|
+
print_error "MLflow process has died. Checking logs for startup errors:"
|
|
254
|
+
else
|
|
255
|
+
print_error "MLflow process is running but not responding. Checking logs:"
|
|
256
|
+
fi
|
|
257
|
+
|
|
258
|
+
if [[ -f "$SCRIPT_DIR/mlflow.log" ]]; then
|
|
259
|
+
echo "=== Last 30 lines of mlflow.log ==="
|
|
260
|
+
tail -30 "$SCRIPT_DIR/mlflow.log"
|
|
261
|
+
echo "=== End of logs ==="
|
|
262
|
+
echo ""
|
|
263
|
+
|
|
264
|
+
# Look for specific error patterns
|
|
265
|
+
if grep -q "Error\|Exception\|Traceback\|Failed\|ImportError\|ModuleNotFoundError" "$SCRIPT_DIR/mlflow.log"; then
|
|
266
|
+
print_error "Found error messages in logs:"
|
|
267
|
+
grep -A 5 -B 2 "Error\|Exception\|Traceback\|Failed\|ImportError\|ModuleNotFoundError" "$SCRIPT_DIR/mlflow.log" | head -20
|
|
268
|
+
fi
|
|
269
|
+
else
|
|
270
|
+
print_error "No mlflow.log file found"
|
|
271
|
+
fi
|
|
272
|
+
|
|
273
|
+
# Check if there are any Python errors in the process
|
|
274
|
+
if kill -0 "$mlflow_pid" 2>/dev/null; then
|
|
275
|
+
print_status "MLflow process details:"
|
|
276
|
+
ps -p "$mlflow_pid" -o pid,ppid,cmd,etime 2>/dev/null || true
|
|
277
|
+
fi
|
|
278
|
+
|
|
279
|
+
return 1
|
|
280
|
+
fi
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
# Function to start API server
|
|
284
|
+
start_api_server() {
|
|
285
|
+
print_status "Starting API server with Gunicorn..."
|
|
286
|
+
|
|
287
|
+
# Check if dispatcher directory exists
|
|
288
|
+
if [[ ! -d "$DISPATCHER_DIR" ]]; then
|
|
289
|
+
print_error "Dispatcher directory not found at $DISPATCHER_DIR"
|
|
290
|
+
return 1
|
|
291
|
+
fi
|
|
292
|
+
|
|
293
|
+
# Check if gunicorn config file exists
|
|
294
|
+
if [[ ! -f "$DISPATCHER_DIR/gunicorn.conf.py" ]]; then
|
|
295
|
+
print_error "gunicorn.conf.py not found in dispatcher directory"
|
|
296
|
+
return 1
|
|
297
|
+
fi
|
|
298
|
+
|
|
299
|
+
# Create database directory
|
|
300
|
+
print_status "Creating database directory..."
|
|
301
|
+
mkdir -p ~/db
|
|
302
|
+
# Ensure proper permissions
|
|
303
|
+
chmod 755 ~/db
|
|
304
|
+
|
|
305
|
+
# Change to dispatcher directory and start Gunicorn server
|
|
306
|
+
cd "$DISPATCHER_DIR"
|
|
307
|
+
|
|
308
|
+
# Start Gunicorn server in background with logging
|
|
309
|
+
print_status "API server logs will be written to: $SCRIPT_DIR/api.log"
|
|
310
|
+
gunicorn -c gunicorn.conf.py > "$SCRIPT_DIR/api.log" 2>&1 &
|
|
311
|
+
|
|
312
|
+
local api_pid=$!
|
|
313
|
+
cd "$SCRIPT_DIR" # Return to original directory
|
|
314
|
+
echo "$api_pid API_Server" >> "$PID_FILE"
|
|
315
|
+
|
|
316
|
+
# Wait for API server to be ready - use longer timeout for API server
|
|
317
|
+
if wait_for_service $API_HOST $API_PORT "API server" 60; then
|
|
318
|
+
print_success "API server started (PID: $api_pid)"
|
|
319
|
+
print_status "API server available at: http://$API_HOST:$API_PORT"
|
|
320
|
+
return 0
|
|
321
|
+
else
|
|
322
|
+
print_error "API server failed to start. Checking for errors..."
|
|
323
|
+
|
|
324
|
+
# Check if process is still running
|
|
325
|
+
if ! kill -0 "$api_pid" 2>/dev/null; then
|
|
326
|
+
print_error "API process has died. Checking logs for startup errors:"
|
|
327
|
+
else
|
|
328
|
+
print_error "API process is running but not responding. Checking logs:"
|
|
329
|
+
fi
|
|
330
|
+
|
|
331
|
+
if [[ -f "$SCRIPT_DIR/api.log" ]]; then
|
|
332
|
+
echo "=== Last 30 lines of api.log ==="
|
|
333
|
+
tail -30 "$SCRIPT_DIR/api.log"
|
|
334
|
+
echo "=== End of logs ==="
|
|
335
|
+
echo ""
|
|
336
|
+
|
|
337
|
+
# Look for specific error patterns
|
|
338
|
+
if grep -q "Error\|Exception\|Traceback\|Failed\|ImportError\|ModuleNotFoundError" "$SCRIPT_DIR/api.log"; then
|
|
339
|
+
print_error "Found error messages in logs:"
|
|
340
|
+
grep -A 5 -B 2 "Error\|Exception\|Traceback\|Failed\|ImportError\|ModuleNotFoundError" "$SCRIPT_DIR/api.log" | head -20
|
|
341
|
+
fi
|
|
342
|
+
else
|
|
343
|
+
print_error "No api.log file found"
|
|
344
|
+
fi
|
|
345
|
+
|
|
346
|
+
# Check if there are any Python errors in the process
|
|
347
|
+
if kill -0 "$api_pid" 2>/dev/null; then
|
|
348
|
+
print_status "API process details:"
|
|
349
|
+
ps -p "$api_pid" -o pid,ppid,cmd,etime 2>/dev/null || true
|
|
350
|
+
fi
|
|
351
|
+
|
|
352
|
+
return 1
|
|
353
|
+
fi
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
# Function to start frontend server
|
|
357
|
+
start_frontend() {
|
|
358
|
+
print_status "Starting frontend tracking server..."
|
|
359
|
+
|
|
360
|
+
if ! check_port $FRONTEND_PORT "Frontend server"; then
|
|
361
|
+
return 1
|
|
362
|
+
fi
|
|
363
|
+
|
|
364
|
+
# Check if frontend directory exists
|
|
365
|
+
if [[ ! -d "$FRONTEND_DIR" ]]; then
|
|
366
|
+
print_error "Frontend directory not found at $FRONTEND_DIR"
|
|
367
|
+
return 1
|
|
368
|
+
fi
|
|
369
|
+
|
|
370
|
+
# Change to frontend directory
|
|
371
|
+
cd "$FRONTEND_DIR"
|
|
372
|
+
|
|
373
|
+
# Check if build directory exists
|
|
374
|
+
if [[ ! -d "build" ]]; then
|
|
375
|
+
print_error "Build directory not found. Please run 'npm run build' in the frontend directory first."
|
|
376
|
+
cd "$SCRIPT_DIR"
|
|
377
|
+
return 1
|
|
378
|
+
fi
|
|
379
|
+
|
|
380
|
+
# Check if Flask server exists
|
|
381
|
+
if [[ ! -f "server.py" ]]; then
|
|
382
|
+
print_error "Flask server (server.py) not found in frontend directory"
|
|
383
|
+
cd "$SCRIPT_DIR"
|
|
384
|
+
return 1
|
|
385
|
+
fi
|
|
386
|
+
|
|
387
|
+
# Test if the server can be imported without errors
|
|
388
|
+
print_status "Testing frontend server imports..."
|
|
389
|
+
if ! python3 -c "import server" 2>/dev/null; then
|
|
390
|
+
print_error "Frontend server has import errors. Testing with verbose output:"
|
|
391
|
+
python3 -c "import server" 2>&1 | head -20
|
|
392
|
+
cd "$SCRIPT_DIR"
|
|
393
|
+
return 1
|
|
394
|
+
fi
|
|
395
|
+
print_success "Frontend server imports successfully"
|
|
396
|
+
|
|
397
|
+
print_status "Starting production frontend server with Flask..."
|
|
398
|
+
|
|
399
|
+
# Start Flask server in background with process group
|
|
400
|
+
print_status "Frontend logs will be written to: $SCRIPT_DIR/frontend.log"
|
|
401
|
+
cd "$FRONTEND_DIR"
|
|
402
|
+
|
|
403
|
+
# Use setsid on Linux, nohup on macOS for better process management
|
|
404
|
+
if command -v setsid &> /dev/null; then
|
|
405
|
+
PORT=$FRONTEND_PORT setsid python3 server.py > "$SCRIPT_DIR/frontend.log" 2>&1 &
|
|
406
|
+
else
|
|
407
|
+
PORT=$FRONTEND_PORT nohup python3 server.py > "$SCRIPT_DIR/frontend.log" 2>&1 &
|
|
408
|
+
fi
|
|
409
|
+
|
|
410
|
+
local frontend_pid=$!
|
|
411
|
+
cd "$SCRIPT_DIR" # Return to original directory
|
|
412
|
+
|
|
413
|
+
# Store both PID and process group ID for better cleanup
|
|
414
|
+
if command -v setsid &> /dev/null; then
|
|
415
|
+
# On Linux, we can get the process group ID
|
|
416
|
+
echo "$frontend_pid Frontend_Flask" >> "$PID_FILE"
|
|
417
|
+
else
|
|
418
|
+
# On macOS, just store the PID
|
|
419
|
+
echo "$frontend_pid Frontend_Flask" >> "$PID_FILE"
|
|
420
|
+
fi
|
|
421
|
+
|
|
422
|
+
# Wait for frontend to be ready - check both localhost and 127.0.0.1
|
|
423
|
+
local frontend_ready=false
|
|
424
|
+
local check_hosts=("localhost" "127.0.0.1")
|
|
425
|
+
|
|
426
|
+
for host in "${check_hosts[@]}"; do
|
|
427
|
+
if wait_for_service $host $FRONTEND_PORT "Frontend server" 15; then
|
|
428
|
+
print_success "Frontend Flask server started (PID: $frontend_pid) on $host:$FRONTEND_PORT"
|
|
429
|
+
frontend_ready=true
|
|
430
|
+
break
|
|
431
|
+
fi
|
|
432
|
+
done
|
|
433
|
+
|
|
434
|
+
if [[ "$frontend_ready" == false ]]; then
|
|
435
|
+
print_error "Frontend Flask server failed to start. Checking for errors..."
|
|
436
|
+
|
|
437
|
+
# Check if process is still running
|
|
438
|
+
if ! kill -0 "$frontend_pid" 2>/dev/null; then
|
|
439
|
+
print_error "Frontend process has died. Checking logs for startup errors:"
|
|
440
|
+
else
|
|
441
|
+
print_error "Frontend process is running but not responding. Checking logs:"
|
|
442
|
+
fi
|
|
443
|
+
|
|
444
|
+
if [[ -f "$SCRIPT_DIR/frontend.log" ]]; then
|
|
445
|
+
echo "=== Last 30 lines of frontend.log ==="
|
|
446
|
+
tail -30 "$SCRIPT_DIR/frontend.log"
|
|
447
|
+
echo "=== End of logs ==="
|
|
448
|
+
echo ""
|
|
449
|
+
|
|
450
|
+
# Look for specific error patterns
|
|
451
|
+
if grep -q "Error\|Exception\|Traceback\|Failed" "$SCRIPT_DIR/frontend.log"; then
|
|
452
|
+
print_error "Found error messages in logs:"
|
|
453
|
+
grep -A 5 -B 2 "Error\|Exception\|Traceback\|Failed" "$SCRIPT_DIR/frontend.log" | head -20
|
|
454
|
+
fi
|
|
455
|
+
else
|
|
456
|
+
print_error "No frontend.log file found"
|
|
457
|
+
fi
|
|
458
|
+
|
|
459
|
+
# Check if there are any Python errors in the process
|
|
460
|
+
if kill -0 "$frontend_pid" 2>/dev/null; then
|
|
461
|
+
print_status "Frontend process details:"
|
|
462
|
+
ps -p "$frontend_pid" -o pid,ppid,cmd,etime 2>/dev/null || true
|
|
463
|
+
fi
|
|
464
|
+
|
|
465
|
+
return 1
|
|
466
|
+
fi
|
|
467
|
+
|
|
468
|
+
return 0
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
# Function to display running services
|
|
472
|
+
show_status() {
|
|
473
|
+
print_status "RapidFire AI Services Status:"
|
|
474
|
+
echo "=================================="
|
|
475
|
+
|
|
476
|
+
if [[ -f "$PID_FILE" ]]; then
|
|
477
|
+
while read -r pid service; do
|
|
478
|
+
if kill -0 "$pid" 2>/dev/null; then
|
|
479
|
+
print_success "$service is running (PID: $pid)"
|
|
480
|
+
else
|
|
481
|
+
print_error "$service is not running (PID: $pid)"
|
|
482
|
+
fi
|
|
483
|
+
done < "$PID_FILE"
|
|
484
|
+
else
|
|
485
|
+
print_warning "No services are currently tracked"
|
|
486
|
+
fi
|
|
487
|
+
|
|
488
|
+
echo ""
|
|
489
|
+
print_success "🚀 RapidFire Frontend is ready!"
|
|
490
|
+
print_status "👉 Open your browser and navigate to: http://$FRONTEND_HOST:$FRONTEND_PORT"
|
|
491
|
+
print_status " (Click the link above or copy/paste the URL into your browser)"
|
|
492
|
+
|
|
493
|
+
# Show log file status
|
|
494
|
+
echo ""
|
|
495
|
+
print_status "Log files:"
|
|
496
|
+
for log_file in "mlflow.log" "api.log" "frontend.log"; do
|
|
497
|
+
if [[ -f "$SCRIPT_DIR/$log_file" ]]; then
|
|
498
|
+
local size=$(du -h "$SCRIPT_DIR/$log_file" | cut -f1)
|
|
499
|
+
print_status "- $log_file: $size"
|
|
500
|
+
else
|
|
501
|
+
print_warning "- $log_file: not found"
|
|
502
|
+
fi
|
|
503
|
+
done
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
# Function to start services based on mode
|
|
507
|
+
start_services() {
|
|
508
|
+
local services_started=0
|
|
509
|
+
local total_services=3
|
|
510
|
+
|
|
511
|
+
# Start MLflow server
|
|
512
|
+
if start_mlflow; then
|
|
513
|
+
((services_started++))
|
|
514
|
+
else
|
|
515
|
+
print_error "Failed to start MLflow server"
|
|
516
|
+
fi
|
|
517
|
+
|
|
518
|
+
# Start API server
|
|
519
|
+
if start_api_server; then
|
|
520
|
+
((services_started++))
|
|
521
|
+
else
|
|
522
|
+
print_error "Failed to start API server"
|
|
523
|
+
fi
|
|
524
|
+
|
|
525
|
+
# Start frontend server
|
|
526
|
+
if start_frontend; then
|
|
527
|
+
((services_started++))
|
|
528
|
+
else
|
|
529
|
+
print_error "Failed to start frontend server"
|
|
530
|
+
fi
|
|
531
|
+
|
|
532
|
+
return $((total_services - services_started))
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
# Main execution
|
|
536
|
+
main() {
|
|
537
|
+
print_status "Starting RapidFire AI services..."
|
|
538
|
+
|
|
539
|
+
# Remove old PID file
|
|
540
|
+
rm -f "$PID_FILE"
|
|
541
|
+
|
|
542
|
+
# Set up signal handlers for cleanup
|
|
543
|
+
trap cleanup SIGINT SIGTERM EXIT
|
|
544
|
+
|
|
545
|
+
# Check for required commands
|
|
546
|
+
for cmd in mlflow gunicorn; do
|
|
547
|
+
if ! command -v $cmd &> /dev/null; then
|
|
548
|
+
print_error "$cmd is not installed or not in PATH"
|
|
549
|
+
exit 1
|
|
550
|
+
fi
|
|
551
|
+
done
|
|
552
|
+
|
|
553
|
+
# Setup Python environment
|
|
554
|
+
if ! setup_python_env; then
|
|
555
|
+
print_error "Failed to setup Python environment"
|
|
556
|
+
exit 1
|
|
557
|
+
fi
|
|
558
|
+
|
|
559
|
+
# Check for common startup issues
|
|
560
|
+
if ! check_startup_issues; then
|
|
561
|
+
print_error "Startup checks failed"
|
|
562
|
+
exit 1
|
|
563
|
+
fi
|
|
564
|
+
|
|
565
|
+
# Start services
|
|
566
|
+
if start_services; then
|
|
567
|
+
print_success "All services started successfully!"
|
|
568
|
+
show_status
|
|
569
|
+
|
|
570
|
+
print_status "Press Ctrl+C to stop all services"
|
|
571
|
+
|
|
572
|
+
# Keep script running and monitor processes
|
|
573
|
+
while true; do
|
|
574
|
+
sleep 5
|
|
575
|
+
# Check if any process died
|
|
576
|
+
if [[ -f "$PID_FILE" ]]; then
|
|
577
|
+
while read -r pid service; do
|
|
578
|
+
if ! kill -0 "$pid" 2>/dev/null; then
|
|
579
|
+
print_error "$service (PID: $pid) has stopped unexpectedly"
|
|
580
|
+
fi
|
|
581
|
+
done < "$PID_FILE"
|
|
582
|
+
fi
|
|
583
|
+
done
|
|
584
|
+
else
|
|
585
|
+
print_error "Failed to start one or more services"
|
|
586
|
+
|
|
587
|
+
# Show summary of all log files for debugging
|
|
588
|
+
print_status "=== Startup Failure Summary ==="
|
|
589
|
+
for log_file in "mlflow.log" "api.log" "frontend.log"; do
|
|
590
|
+
if [[ -f "$SCRIPT_DIR/$log_file" ]]; then
|
|
591
|
+
echo ""
|
|
592
|
+
print_status "=== $log_file ==="
|
|
593
|
+
if [[ -s "$SCRIPT_DIR/$log_file" ]]; then
|
|
594
|
+
tail -10 "$SCRIPT_DIR/$log_file"
|
|
595
|
+
else
|
|
596
|
+
echo "(empty log file)"
|
|
597
|
+
fi
|
|
598
|
+
fi
|
|
599
|
+
done
|
|
600
|
+
|
|
601
|
+
cleanup
|
|
602
|
+
exit 1
|
|
603
|
+
fi
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
# Handle command line arguments
|
|
607
|
+
case "${1:-start}" in
|
|
608
|
+
"start")
|
|
609
|
+
main
|
|
610
|
+
;;
|
|
611
|
+
"stop")
|
|
612
|
+
cleanup
|
|
613
|
+
;;
|
|
614
|
+
"status")
|
|
615
|
+
show_status
|
|
616
|
+
;;
|
|
617
|
+
"restart")
|
|
618
|
+
cleanup
|
|
619
|
+
sleep 2
|
|
620
|
+
main
|
|
621
|
+
;;
|
|
622
|
+
"setup")
|
|
623
|
+
setup_python_env
|
|
624
|
+
;;
|
|
625
|
+
*)
|
|
626
|
+
echo "Usage: $0 {start|stop|status|restart|setup}"
|
|
627
|
+
echo " start - Start all services (default)"
|
|
628
|
+
echo " stop - Stop all services"
|
|
629
|
+
echo " status - Show service status"
|
|
630
|
+
echo " restart - Restart all services"
|
|
631
|
+
echo " setup - Setup Python environment only"
|
|
632
|
+
exit 1
|
|
633
|
+
;;
|
|
634
|
+
esac
|
|
File without changes
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""This module contains utility functions for the ML module."""
|
|
2
|
+
|
|
3
|
+
from typing import Any
|
|
4
|
+
|
|
5
|
+
from rapidfireai.automl.base import AutoMLAlgorithm
|
|
6
|
+
|
|
7
|
+
# TODO: add code to validate param_config
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_flattened_config_leaf(param_config: dict[str, Any], prefix: str = "") -> dict[str, Any]:
|
|
11
|
+
"""Flattens the param_config dictionary into a single hierarchy"""
|
|
12
|
+
items = []
|
|
13
|
+
for k, v in param_config.items():
|
|
14
|
+
# Skip empty keys and specific keys
|
|
15
|
+
if not k or k in ["compute_metrics", "formatting_func", "output_dir", "logging_dir", "reward_funcs", "task_type","torch_dtype"]:
|
|
16
|
+
continue
|
|
17
|
+
|
|
18
|
+
# Create the full key name with prefix to avoid collisions
|
|
19
|
+
full_key = f"{prefix}.{k}" if prefix else str(k)
|
|
20
|
+
|
|
21
|
+
if isinstance(v, dict):
|
|
22
|
+
# Recursively flatten nested dictionaries
|
|
23
|
+
items.extend(get_flattened_config_leaf(v, full_key).items())
|
|
24
|
+
else:
|
|
25
|
+
# Handle output_dir conversion safely
|
|
26
|
+
if k == "output_dir" and hasattr(v, "as_posix"):
|
|
27
|
+
# Only call as_posix() if it's actually a Path object
|
|
28
|
+
v = v.as_posix()
|
|
29
|
+
elif k == "output_dir" and isinstance(v, str):
|
|
30
|
+
# If it's already a string, leave it as is
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
# add to items
|
|
34
|
+
items.append((full_key, v))
|
|
35
|
+
return dict(items)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def get_runs(param_config: AutoMLAlgorithm | dict[str, Any] | list[Any], seed: int) -> list[dict[str, Any]]:
|
|
39
|
+
"""Get the runs for the given param_config."""
|
|
40
|
+
# FIXME: how do we handle seed for dict and list?
|
|
41
|
+
if isinstance(param_config, AutoMLAlgorithm):
|
|
42
|
+
return param_config.get_runs(seed)
|
|
43
|
+
if isinstance(param_config, dict):
|
|
44
|
+
return [param_config]
|
|
45
|
+
if isinstance(param_config, list):
|
|
46
|
+
config_leaves = []
|
|
47
|
+
for config in param_config:
|
|
48
|
+
config_leaves.extend(get_runs(config, seed))
|
|
49
|
+
return config_leaves
|
|
50
|
+
else:
|
|
51
|
+
raise ValueError(f"Invalid param_config type: {type(param_config)}")
|