Giter VIP home page Giter VIP logo

oktapi's Introduction

OptimAI 1.1.1

Common

There is a class to add details on errors messages. ( I don't thing it has been used )

Models

Classes for database.

Routers

Create API endpoints

Fast.py

Import all the routers, and run the FastAPi

initialize.py

We create an admin user.

main.py

Contains main logic of the program: Campaign(), State() and AI() classes.

How to run this app using python(3.10).

Step 1.

Add mongo connection string in utils/db_connector.py (in MongoClient())

Step 2.

pip install -r requirements.txt

Step 3.

python initialize.py

Step 4.

uvicorn fast:app (Make sure you are in OktAPI folder.)

Step 5.

Open the url with /api and login with admin/admin.

oktapi's People

Contributors

albertsalgueda avatar mayur4448 avatar

Stargazers

 avatar

Watchers

 avatar

oktapi's Issues

OverSpent

This has been observed with the colab.

https://colab.research.google.com/drive/17fhUhpukiOXwFdP88i9q2tRZXfs-HMbF#scrollTo=SZz_DUz5AQIi

Create 3 campaigns, add them in one state. Start the process. For updating, the way it is now, we update with a new spent every time step that is 600. However, given that the budget for that time step is 666, the spent should be around a half of 666 (since there are two time steps per day) and not that much as it is given (600). Because of this, maybe it could be interesting that the API gives an error when updating with such these big spent values. idk even if i would call it as an error but in any case i point it out here in issues for the future

Remaining budget

I think it would be better to update remaining budget by substracting the total spent in the last time step and not by substracting the assigned budget in last time step. It is important because it can help to avoid problems with overspend, apart from adjusting more efficiently budget per time step

Updating Error

Sometimes it has occurred to me that I tried to upload a campaign with a new spent value but if it was coincident with an existing one in the spent list, it was not added to it. Say this just to add it here and take into account for the future because I m still not very certain why this happens and how.

Lack of connection between class Campaign and State

There were three campaigns at the beginning, I deleted two of them with the method 'Delete Campaigns'. If I try out 'Get Campaigns' I get it correctly, only the one I expect. The problem comes out when I try out 'Get State', it gives the first three initial campaigns with no updates coming from having deleted these two campaigns. Something similar if I 'Delete State'. Once done this, if I 'Get Campaign' I receive the one campaign left but I should receive none since the state was deleted.

NoneType value in /next in the second time step

I create 3 campaigns, I include them in one same state, i call /next for the 1st time step, I update every campaign with new spent plus new conversion value (everything okay so far), BUT now I call /next again, this is what happens

Screenshot 2022-05-04 at 17 39 16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.