)]}'
{"cyborg/agent/resource_tracker.py":[{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"f686cd4a1da34904f9d78cba79ee7a0487919d2c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"AGENT_RESOURCE_SEMAPHORE \u003d \"agent_resources\""},{"line_number":34,"context_line":"SUPPORT_DEVICE_TYPE_LIST \u003d [\"fpga\", \"spdk\"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class ResourceTracker(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_6a2bd581","line":34,"range":{"start_line":34,"start_character":27,"end_line":34,"end_character":43},"updated":"2018-08-30 05:50:27.000000000","message":"we don\u0027t support gpu for now?","commit_id":"388d8c13664a1fae0c30a064074ef3c9f042f087"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"b7a1055ab1467356870a42ba1461afe32e84a079","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"AGENT_RESOURCE_SEMAPHORE \u003d \"agent_resources\""},{"line_number":34,"context_line":"SUPPORT_DEVICE_TYPE_LIST \u003d [\"fpga\", \"spdk\"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class ResourceTracker(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_eacb6547","line":34,"range":{"start_line":34,"start_character":27,"end_line":34,"end_character":43},"in_reply_to":"3f79a3b5_0ab4a1f1","updated":"2018-08-30 06:18:23.000000000","message":"doesn\u0027t...","commit_id":"388d8c13664a1fae0c30a064074ef3c9f042f087"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"dec3d4490cd9e5f651dc3dd9dd41aa7f7cdc9b0a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"AGENT_RESOURCE_SEMAPHORE \u003d \"agent_resources\""},{"line_number":34,"context_line":"SUPPORT_DEVICE_TYPE_LIST \u003d [\"fpga\", \"spdk\"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class ResourceTracker(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_0ab4a1f1","line":34,"range":{"start_line":34,"start_character":27,"end_line":34,"end_character":43},"in_reply_to":"3f79a3b5_6a2bd581","updated":"2018-08-30 06:17:42.000000000","message":"Yes, we didn\u0027t merge the gpu driver. It\u0027s another patch.","commit_id":"388d8c13664a1fae0c30a064074ef3c9f042f087"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"f686cd4a1da34904f9d78cba79ee7a0487919d2c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def _initialize_acc_type_drivers(self):"},{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        Load accelerator\u0027s type drivers."},{"line_number":50,"context_line":"        :return: {\"gpu\": gpu_driver_obj, \"fpga\": gpu_driver_obj}"},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        acc_drviers \u003d {}"},{"line_number":53,"context_line":"        support_device_types \u003d copy.deepcopy(SUPPORT_DEVICE_TYPE_LIST)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_ca39c9d8","line":50,"range":{"start_line":50,"start_character":49,"end_line":50,"end_character":53},"updated":"2018-08-30 05:50:27.000000000","message":"s/gpu/fpga","commit_id":"388d8c13664a1fae0c30a064074ef3c9f042f087"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"dec3d4490cd9e5f651dc3dd9dd41aa7f7cdc9b0a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def _initialize_acc_type_drivers(self):"},{"line_number":48,"context_line":"        \"\"\""},{"line_number":49,"context_line":"        Load accelerator\u0027s type drivers."},{"line_number":50,"context_line":"        :return: {\"gpu\": gpu_driver_obj, \"fpga\": gpu_driver_obj}"},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        acc_drviers \u003d {}"},{"line_number":53,"context_line":"        support_device_types \u003d copy.deepcopy(SUPPORT_DEVICE_TYPE_LIST)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_2ab5ddcd","line":50,"range":{"start_line":50,"start_character":49,"end_line":50,"end_character":53},"in_reply_to":"3f79a3b5_ca39c9d8","updated":"2018-08-30 06:17:42.000000000","message":"Done. Thx","commit_id":"388d8c13664a1fae0c30a064074ef3c9f042f087"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0c4ec924f00517eba20819bb0dda63a2d4d72fb4","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        for device_type in support_device_types:"},{"line_number":55,"context_line":"            device_type_driver \u003d None"},{"line_number":56,"context_line":"            try:"},{"line_number":57,"context_line":"                device_type_driver \u003d \\"},{"line_number":58,"context_line":"                    driver.DriverManager(namespace\u003d\u0027cyborg.accelerator.driver\u0027,"},{"line_number":59,"context_line":"                                         name\u003ddevice_type).driver"},{"line_number":60,"context_line":"            except NoMatches:"},{"line_number":61,"context_line":"                SUPPORT_DEVICE_TYPE_LIST.remove(device_type)"},{"line_number":62,"context_line":"                LOG.warn(\"No accelerator driver named %s in namespace: \""}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_2a3e3dda","line":59,"range":{"start_line":57,"start_character":16,"end_line":59,"end_character":65},"updated":"2018-08-30 06:33:37.000000000","message":"im glad to see your moving to stevadore :)","commit_id":"36ebda4ca2dbb10c613ed221f3d8e0a17140137e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0c4ec924f00517eba20819bb0dda63a2d4d72fb4","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                                             self.host,"},{"line_number":84,"context_line":"                                                             device_type)"},{"line_number":85,"context_line":"            for v in vendors:"},{"line_number":86,"context_line":"                acc_driver \u003d device_type_driver.create(v)"},{"line_number":87,"context_line":"                acc_list.extend(acc_driver.discover())"},{"line_number":88,"context_line":"            driverhost_from_driver \u003d objects.DriverHost("},{"line_number":89,"context_line":"                host\u003dself.host,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_0d559bfa","line":86,"range":{"start_line":86,"start_character":15,"end_line":86,"end_character":57},"updated":"2018-08-30 06:33:37.000000000","message":"we should not create the driver instances here.\nwe should statically create the instance of the driver in _initialize_acc_type_drivers and store them in a dictonary then retrive them here so that we dont pay the cost of creating the drivers every time we update the usage.","commit_id":"36ebda4ca2dbb10c613ed221f3d8e0a17140137e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"32a98362586eb3c10e1ffce13d0bfb3f250c09d2","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import copy"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from oslo_log import log as logging"},{"line_number":24,"context_line":"from stevedore import driver"},{"line_number":25,"context_line":"from stevedore.exception import NoMatches"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from cyborg.common import utils"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_082f7e3e","line":24,"updated":"2018-09-16 02:24:16.000000000","message":"Please pattern this after how others use stevedore. E.g. os-vif: https://github.com/openstack/os-vif/blob/master/os_vif/__init__.py#L38\n\nThe operator lists the needed drivers in setup.cfg. The os-acc spec talks about it.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"75ad537121d5e200ee5cca7512bbe8333e7cefff","unresolved":false,"context_lines":[{"line_number":21,"context_line":"import copy"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from oslo_log import log as logging"},{"line_number":24,"context_line":"from stevedore import driver"},{"line_number":25,"context_line":"from stevedore.exception import NoMatches"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"from cyborg.common import utils"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_db9f6b00","line":24,"updated":"2018-09-24 21:35:20.000000000","message":"the operator is not allowed to modify the setup.cfg\nsetup.cfg is not a cyborg config file.\nsetup.cfg is a python setuptools config file that discribes\nhow the python module (in this case cyborg) should be packaged.\n\nos-vif uses the steavador extention manager workflow to manage our plugins.\n\nhttps://docs.openstack.org/stevedore/latest/user/patterns_loading.html#extensions-many-names-many-entry-points\n\ni belive this would also be the most approate for cyborg\n\nin os-vif we have exeactly 1 extention point, the vif plugin so we decaler only one extention point named os-vif. this is done as a  setuptools entrypoints. all modules in\ntree that are implemnetations of the plugin interfaces are listed in the setup.cfg.\n\nhttps://github.com/openstack/os-vif/blob/master/setup.cfg#L46-L50\n\nexternal packages that implement the os-vif plugin interface likewise declare there\nsupport for that entrypoint the same way.\n\nhttps://github.com/openstack/kuryr-kubernetes/blob/master/setup.cfg#L26-L28\n\nthis allows stevadore to dynamically find all installed modules that conform to the interface.\n\nin the cyborg case you will need a unique entry point name per driver type(FPGA,GPU,HPTS)\nif each driver has a different interface or a single cyborg entrypoint if all driver have the same interfaces.\n\nin either cases cyborg develops should be able to update the setup.cfg when\nadding new drivers intree but operators should never modify this file.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"32a98362586eb3c10e1ffce13d0bfb3f250c09d2","unresolved":false,"context_lines":[{"line_number":33,"context_line":"AGENT_RESOURCE_SEMAPHORE \u003d \"agent_resources\""},{"line_number":34,"context_line":"# TODO(wangzhh): spdk driver trigger a bug. Remove it from"},{"line_number":35,"context_line":"# SUPPORT_DEVICE_TYPE_LIST in this patch."},{"line_number":36,"context_line":"SUPPORT_DEVICE_TYPE_LIST \u003d [\"fpga\"]"},{"line_number":37,"context_line":"VENDOR_DRIVERS \u003d {}"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_c828a634","line":36,"updated":"2018-09-16 02:24:16.000000000","message":"Why do we need this? Why can\u0027t we just discover all drivers, independent of what device type it handles?\n\nWe don\u0027t need device type drivers and vendor drivers. Every driver is basically vendor-specific and could inherit from a generic base class for that device type. The operator lists the needed drivers in setup.cfg.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"75ad537121d5e200ee5cca7512bbe8333e7cefff","unresolved":false,"context_lines":[{"line_number":33,"context_line":"AGENT_RESOURCE_SEMAPHORE \u003d \"agent_resources\""},{"line_number":34,"context_line":"# TODO(wangzhh): spdk driver trigger a bug. Remove it from"},{"line_number":35,"context_line":"# SUPPORT_DEVICE_TYPE_LIST in this patch."},{"line_number":36,"context_line":"SUPPORT_DEVICE_TYPE_LIST \u003d [\"fpga\"]"},{"line_number":37,"context_line":"VENDOR_DRIVERS \u003d {}"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_7b8417b3","line":36,"updated":"2018-09-24 21:35:20.000000000","message":"there are several reasons why allowing any driver is undisable.\n\nto allow any driver to be loaded rather then filtering by supported\ndriver types implies people external to the cybog project are allowed\nto add new acclorator types.\n\nthat means that the core data modle can be extended outside of the cyborg tree\nvia plugins. if new driver types can be loaded dynamically it also means that those\ndrivers generate data that will be sotred in the db such as the acclorator_type that will\nnot be versioned or sanitsed by cyborg core codbase  making upgrades/schama migrations difficutl and potentially resulting in rpc issues if the plugins that provideds the new accleartor type is not installed on all nodes runing cyborg conductor and agents.\n\nallowing plugable implmentations of acclortor type drivers is fine.\nhowever allowing arbairay device types is not. regarding\nsetup.cfg as i said above operators may not modify it to control\ndriver loading it is used for packaging cyborg not configuring it.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"a7b764a7325f8c2bf77e1d0fb354723bc199f65f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"AGENT_RESOURCE_SEMAPHORE \u003d \"agent_resources\""},{"line_number":34,"context_line":"# TODO(wangzhh): spdk driver trigger a bug. Remove it from"},{"line_number":35,"context_line":"# SUPPORT_DEVICE_TYPE_LIST in this patch."},{"line_number":36,"context_line":"SUPPORT_DEVICE_TYPE_LIST \u003d [\"fpga\"]"},{"line_number":37,"context_line":"VENDOR_DRIVERS \u003d {}"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_be34794a","line":36,"in_reply_to":"3f79a3b5_c828a634","updated":"2018-09-17 07:40:22.000000000","message":"Workaround here. For spdk driver triggers a bug. I\u0027ll use ExtensionManager to load all type drivers later.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"32a98362586eb3c10e1ffce13d0bfb3f250c09d2","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def _initialize_acc_type_drivers(self):"},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        Load accelerator\u0027s type drivers."},{"line_number":53,"context_line":"        :return: {\"gpu\": gpu_driver_obj, \"fpga\": fpga_driver_obj}"},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        acc_drviers \u003d {}"},{"line_number":56,"context_line":"        support_device_types \u003d copy.deepcopy(SUPPORT_DEVICE_TYPE_LIST)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_08d45e1e","line":53,"updated":"2018-09-16 02:24:16.000000000","message":"Does this imply that there is only one kind of gpu driver and one kind of fpga driver? If so, that is not what we want!","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"a7b764a7325f8c2bf77e1d0fb354723bc199f65f","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    def _initialize_acc_type_drivers(self):"},{"line_number":51,"context_line":"        \"\"\""},{"line_number":52,"context_line":"        Load accelerator\u0027s type drivers."},{"line_number":53,"context_line":"        :return: {\"gpu\": gpu_driver_obj, \"fpga\": fpga_driver_obj}"},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        acc_drviers \u003d {}"},{"line_number":56,"context_line":"        support_device_types \u003d copy.deepcopy(SUPPORT_DEVICE_TYPE_LIST)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_9ecbbd1b","line":53,"in_reply_to":"3f79a3b5_08d45e1e","updated":"2018-09-17 07:40:22.000000000","message":"This method is for loading type drivers. Not one kind of xxx driver, it is this type driver.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"32a98362586eb3c10e1ffce13d0bfb3f250c09d2","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        Load accelerator\u0027s type drivers."},{"line_number":53,"context_line":"        :return: {\"gpu\": gpu_driver_obj, \"fpga\": fpga_driver_obj}"},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        acc_drviers \u003d {}"},{"line_number":56,"context_line":"        support_device_types \u003d copy.deepcopy(SUPPORT_DEVICE_TYPE_LIST)"},{"line_number":57,"context_line":"        for device_type in support_device_types:"},{"line_number":58,"context_line":"            device_type_driver \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_c8dd0642","line":55,"updated":"2018-09-16 02:24:16.000000000","message":"typo: acc_drivers","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"a7b764a7325f8c2bf77e1d0fb354723bc199f65f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        Load accelerator\u0027s type drivers."},{"line_number":53,"context_line":"        :return: {\"gpu\": gpu_driver_obj, \"fpga\": fpga_driver_obj}"},{"line_number":54,"context_line":"        \"\"\""},{"line_number":55,"context_line":"        acc_drviers \u003d {}"},{"line_number":56,"context_line":"        support_device_types \u003d copy.deepcopy(SUPPORT_DEVICE_TYPE_LIST)"},{"line_number":57,"context_line":"        for device_type in support_device_types:"},{"line_number":58,"context_line":"            device_type_driver \u003d None"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_bed0f9c9","line":55,"in_reply_to":"3f79a3b5_c8dd0642","updated":"2018-09-17 07:40:22.000000000","message":"Thx","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"32a98362586eb3c10e1ffce13d0bfb3f250c09d2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            device_type_driver \u003d None"},{"line_number":59,"context_line":"            try:"},{"line_number":60,"context_line":"                device_type_driver \u003d \\"},{"line_number":61,"context_line":"                    driver.DriverManager(namespace\u003d\u0027cyborg.accelerator.driver\u0027,"},{"line_number":62,"context_line":"                                         name\u003ddevice_type).driver"},{"line_number":63,"context_line":"            except NoMatches:"},{"line_number":64,"context_line":"                SUPPORT_DEVICE_TYPE_LIST.remove(device_type)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_28eefaec","line":61,"updated":"2018-09-16 02:24:16.000000000","message":"The name space can be just cyborg.driver instead of cyborg.accelerator.driver.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"75ad537121d5e200ee5cca7512bbe8333e7cefff","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            device_type_driver \u003d None"},{"line_number":59,"context_line":"            try:"},{"line_number":60,"context_line":"                device_type_driver \u003d \\"},{"line_number":61,"context_line":"                    driver.DriverManager(namespace\u003d\u0027cyborg.accelerator.driver\u0027,"},{"line_number":62,"context_line":"                                         name\u003ddevice_type).driver"},{"line_number":63,"context_line":"            except NoMatches:"},{"line_number":64,"context_line":"                SUPPORT_DEVICE_TYPE_LIST.remove(device_type)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_9b81f3a3","line":61,"updated":"2018-09-24 21:35:20.000000000","message":"if you use the extention manager rather then driver manager it symplifes this somwhat but\ni would not modify the module layout in this commit to convert form cyborg.accllerator.drivers to acclerator drivers if you contiue to use the driverManager","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"a7b764a7325f8c2bf77e1d0fb354723bc199f65f","unresolved":false,"context_lines":[{"line_number":58,"context_line":"            device_type_driver \u003d None"},{"line_number":59,"context_line":"            try:"},{"line_number":60,"context_line":"                device_type_driver \u003d \\"},{"line_number":61,"context_line":"                    driver.DriverManager(namespace\u003d\u0027cyborg.accelerator.driver\u0027,"},{"line_number":62,"context_line":"                                         name\u003ddevice_type).driver"},{"line_number":63,"context_line":"            except NoMatches:"},{"line_number":64,"context_line":"                SUPPORT_DEVICE_TYPE_LIST.remove(device_type)"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_5e7525cb","line":61,"in_reply_to":"3f79a3b5_28eefaec","updated":"2018-09-17 07:40:22.000000000","message":"Is it necassary? \nAnd the namespace was defined in setup.cfg, this file is like a \"code map\" in python project, making module path same as namespace is more clear for reader. You can see that nova use nova.scheduler.driver, nova.compute.monitors.cpu and so on.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"32a98362586eb3c10e1ffce13d0bfb3f250c09d2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                acc_drviers[device_type] \u003d device_type_driver"},{"line_number":71,"context_line":"        return acc_drviers"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _load_vendor_driver(self, device_type, vendor):"},{"line_number":74,"context_line":"        vendor_driver \u003d self.acc_type_drivers[device_type].create(vendor)"},{"line_number":75,"context_line":"        VENDOR_DRIVERS[device_type] \u003d {vendor: vendor_driver}"},{"line_number":76,"context_line":"        return vendor_driver"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_c8b666fa","line":73,"updated":"2018-09-16 02:24:16.000000000","message":"I don\u0027t understand why we need vendor drivers separately. Each driver is a vendor-specific driver. E.g. all vendor FPGA drivers inherit from a base class for FPGA drivers, and the operator lists the vendor drivers in setup.cfg.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"75ad537121d5e200ee5cca7512bbe8333e7cefff","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                acc_drviers[device_type] \u003d device_type_driver"},{"line_number":71,"context_line":"        return acc_drviers"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _load_vendor_driver(self, device_type, vendor):"},{"line_number":74,"context_line":"        vendor_driver \u003d self.acc_type_drivers[device_type].create(vendor)"},{"line_number":75,"context_line":"        VENDOR_DRIVERS[device_type] \u003d {vendor: vendor_driver}"},{"line_number":76,"context_line":"        return vendor_driver"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_3b8e9fd1","line":73,"updated":"2018-09-24 21:35:20.000000000","message":"as wangzhh pointinted out above there are two aixis to this problem.\nthe frist is the acclerator type drivers\nthe scond is the vendor specfic implementation of the type driver\n\nthe acclerator type drivers should not be externally plugable.\n\nthe vendor sepecic backend driver that conforms to the generic type driver\ninterfaces should should be.\n\nthe worflow is effectivly \n\n1.) loop over all acclerator types and create an instance of the driver manager for each acllerator type. \n2.) for each driver manager load all conforming drivers.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"a7b764a7325f8c2bf77e1d0fb354723bc199f65f","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                acc_drviers[device_type] \u003d device_type_driver"},{"line_number":71,"context_line":"        return acc_drviers"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def _load_vendor_driver(self, device_type, vendor):"},{"line_number":74,"context_line":"        vendor_driver \u003d self.acc_type_drivers[device_type].create(vendor)"},{"line_number":75,"context_line":"        VENDOR_DRIVERS[device_type] \u003d {vendor: vendor_driver}"},{"line_number":76,"context_line":"        return vendor_driver"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_7e682120","line":73,"in_reply_to":"3f79a3b5_c8b666fa","updated":"2018-09-17 07:40:22.000000000","message":"They just two options. If there must be a reason, we should modify setup.cfg again and again as your suggestions.(Every vendor drivers.)","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"09cdc0838ec4bf75cb73e01ab4ebe9cdf521d170","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                                                             self.host,"},{"line_number":93,"context_line":"                                                             device_type)"},{"line_number":94,"context_line":"            for v in vendors:"},{"line_number":95,"context_line":"                if VENDOR_DRIVERS[device_type].get(v, None):"},{"line_number":96,"context_line":"                    acc_driver \u003d VENDOR_DRIVERS[device_type].get(v)"},{"line_number":97,"context_line":"                else:"},{"line_number":98,"context_line":"                    acc_driver \u003d self._load_vendor_driver(device_type, v)"},{"line_number":99,"context_line":"                acc_list.extend(acc_driver.discover())"},{"line_number":100,"context_line":"            driverhost_from_driver \u003d objects.DriverHost("},{"line_number":101,"context_line":"                host\u003dself.host,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_64719da8","line":98,"range":{"start_line":95,"start_character":15,"end_line":98,"end_character":73},"updated":"2018-08-31 16:41:33.000000000","message":"i was going to suggest using the setdefault here\ne.g.\nacc_driver \u003d VENDOR_DRIVERS[device_type].setdefault(v,\n    self._load_vendor_driver(device_type, v))\nor \nacc_driver \u003d VENDOR_DRIVERS[device_type].setdefault(v,\n    self.acc_type_drivers.[device_type].create(v)))\n\nbut that would force evaultion of the default even when\nthe key exists which would recreate the driver and sice\nthat is what we are trying to avoid that would be dumb\n\nso yes +1 this code looks fine to me","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"c49db7988c70fa081878a204d6cab4440bdee4fa","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                    acc_driver \u003d VENDOR_DRIVERS[device_type].get(v)"},{"line_number":97,"context_line":"                else:"},{"line_number":98,"context_line":"                    acc_driver \u003d self._load_vendor_driver(device_type, v)"},{"line_number":99,"context_line":"                acc_list.extend(acc_driver.discover())"},{"line_number":100,"context_line":"            driverhost_from_driver \u003d objects.DriverHost("},{"line_number":101,"context_line":"                host\u003dself.host,"},{"line_number":102,"context_line":"                dev_type\u003ddevice_type,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_a677a43b","line":99,"range":{"start_line":99,"start_character":32,"end_line":99,"end_character":53},"updated":"2018-09-03 07:23:45.000000000","message":"Here, the discover should return a driver_accelerator object right? I saw in your gpu driver patch, it returns a list of dict. Just want to make sure if driver.discover() should generate a driver_accelerator to agent.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7deb01576a1a9db7f0623163ff8852b374e17031","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                    acc_driver \u003d VENDOR_DRIVERS[device_type].get(v)"},{"line_number":97,"context_line":"                else:"},{"line_number":98,"context_line":"                    acc_driver \u003d self._load_vendor_driver(device_type, v)"},{"line_number":99,"context_line":"                acc_list.extend(acc_driver.discover())"},{"line_number":100,"context_line":"            driverhost_from_driver \u003d objects.DriverHost("},{"line_number":101,"context_line":"                host\u003dself.host,"},{"line_number":102,"context_line":"                dev_type\u003ddevice_type,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_7ce59809","line":99,"range":{"start_line":99,"start_character":32,"end_line":99,"end_character":53},"in_reply_to":"3f79a3b5_a677a43b","updated":"2018-09-03 12:19:15.000000000","message":"i had actually assumed discover was returning a list of accelerator objects. not a list of dictionaries. i would expect all operation to be performed using the ovo form rather then the dictionary representation.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"7deb01576a1a9db7f0623163ff8852b374e17031","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            driverhost_from_driver \u003d objects.DriverHost("},{"line_number":101,"context_line":"                host\u003dself.host,"},{"line_number":102,"context_line":"                dev_type\u003ddevice_type,"},{"line_number":103,"context_line":"                accelerator_list\u003dacc_list"},{"line_number":104,"context_line":"            )"},{"line_number":105,"context_line":"            objects.DriverHost.diff_save(context,"},{"line_number":106,"context_line":"                                         new_driver_obj\u003ddriverhost_from_driver,"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_9c38b43b","line":103,"range":{"start_line":103,"start_character":16,"end_line":103,"end_character":41},"updated":"2018-09-03 12:19:15.000000000","message":"looking at the defintion of the accelerator_list\n\nhttps://git.openstack.org/cgit/openstack/cyborg/tree/cyborg/objects/driver_objects/driver_accelerator.py?h\u003drefs/changes/91/596691/8#n213-n224\n\nit is defined as a list of DriverAccelerator objects\n\n\u0027accelerator_list\u0027: object_fields.ListOfObjectsField(\n            \u0027DriverAccelerator\u0027, default\u003d[], nullable\u003dFalse)\n\nwhich should imply that acc_driver above is infarct returning a list of DriverAccelerator objects also and that the gpu driver simply has not been updated yet.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"709603e4fe144f0c7c29000dc4405ff30fb38156","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def __init__(self, host, cond_api):"},{"line_number":41,"context_line":"        self.host \u003d host"},{"line_number":42,"context_line":"        self.conductor_api \u003d cond_api"},{"line_number":43,"context_line":"        self.acc_type_drivers \u003d self._initialize_acc_type_drivers()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _initialize_acc_type_drivers(self):"},{"line_number":46,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_c7d3c962","line":43,"updated":"2018-10-10 04:52:46.000000000","message":"Could you explain why you need a concept of type driver vs. vendor driver? IMHO, it is simpler if we just have a set of drivers; FPGA drivers inherit from a base FPGA driver class, GPU drivers inherit from their base class, etc. but they are all just Cyborg drivers, which are listed in cyborg.conf by te operator.\nWhen Cyborg agent needs to pick a driver for a specific operation, it can do isinstance(\u003cbaseclass\u003e) for the known drivers.","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"f432d402db0dd302f4d8143f2d50d3b62395c286","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def __init__(self, host, cond_api):"},{"line_number":41,"context_line":"        self.host \u003d host"},{"line_number":42,"context_line":"        self.conductor_api \u003d cond_api"},{"line_number":43,"context_line":"        self.acc_type_drivers \u003d self._initialize_acc_type_drivers()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _initialize_acc_type_drivers(self):"},{"line_number":46,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_4ea25499","line":43,"in_reply_to":"3f79a3b5_c7d3c962","updated":"2018-10-11 08:42:47.000000000","message":"If we want to extend another driver, in this way, developer just need to imply it and place it in the right module. The vendor driver would be auto-load.\nIf we just have a set of drivers, developer should modify setup.cfg so that stevedore can load it.","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"709603e4fe144f0c7c29000dc4405ff30fb38156","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        Load accelerator\u0027s type drivers."},{"line_number":48,"context_line":"        :return: {\"gpu\": gpu_driver_obj, \"fpga\": fpga_driver_obj}"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        acc_drviers \u003d {}"},{"line_number":51,"context_line":"        device_type_drivers \u003d ExtensionManager("},{"line_number":52,"context_line":"            namespace\u003d\u0027cyborg.accelerator.driver\u0027)"},{"line_number":53,"context_line":"        for device_type in device_type_drivers.names():"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_75193e85","line":50,"updated":"2018-10-10 04:52:46.000000000","message":"Typo: acc_drivers","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"f432d402db0dd302f4d8143f2d50d3b62395c286","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        Load accelerator\u0027s type drivers."},{"line_number":48,"context_line":"        :return: {\"gpu\": gpu_driver_obj, \"fpga\": fpga_driver_obj}"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        acc_drviers \u003d {}"},{"line_number":51,"context_line":"        device_type_drivers \u003d ExtensionManager("},{"line_number":52,"context_line":"            namespace\u003d\u0027cyborg.accelerator.driver\u0027)"},{"line_number":53,"context_line":"        for device_type in device_type_drivers.names():"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_6ec87055","line":50,"in_reply_to":"3f79a3b5_75193e85","updated":"2018-10-11 08:42:47.000000000","message":"Oops.","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"709603e4fe144f0c7c29000dc4405ff30fb38156","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        acc_drviers \u003d {}"},{"line_number":51,"context_line":"        device_type_drivers \u003d ExtensionManager("},{"line_number":52,"context_line":"            namespace\u003d\u0027cyborg.accelerator.driver\u0027)"},{"line_number":53,"context_line":"        for device_type in device_type_drivers.names():"},{"line_number":54,"context_line":"            device_type_driver \u003d driver.DriverManager("},{"line_number":55,"context_line":"                namespace\u003d\u0027cyborg.accelerator.driver\u0027, name\u003ddevice_type).driver"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_874b9126","line":52,"range":{"start_line":52,"start_character":30,"end_line":52,"end_character":41},"updated":"2018-10-10 04:52:46.000000000","message":"Why is the namespace \"cyborg.accelerator.driver\" instead of \"cyborg.driver\"? Do you expect some other kind of driver?","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"f432d402db0dd302f4d8143f2d50d3b62395c286","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        acc_drviers \u003d {}"},{"line_number":51,"context_line":"        device_type_drivers \u003d ExtensionManager("},{"line_number":52,"context_line":"            namespace\u003d\u0027cyborg.accelerator.driver\u0027)"},{"line_number":53,"context_line":"        for device_type in device_type_drivers.names():"},{"line_number":54,"context_line":"            device_type_driver \u003d driver.DriverManager("},{"line_number":55,"context_line":"                namespace\u003d\u0027cyborg.accelerator.driver\u0027, name\u003ddevice_type).driver"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_ee1000ae","line":52,"range":{"start_line":52,"start_character":30,"end_line":52,"end_character":41},"in_reply_to":"3f79a3b5_874b9126","updated":"2018-10-11 08:42:47.000000000","message":"I remember that I have replied u. Maybe u missed it. It is for developing friendly. Plz look at my comment in previous commit.","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"709603e4fe144f0c7c29000dc4405ff30fb38156","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        return acc_drviers"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    @utils.synchronized(AGENT_RESOURCE_SEMAPHORE)"},{"line_number":61,"context_line":"    def claim(self, context):"},{"line_number":62,"context_line":"        pass"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @utils.synchronized(AGENT_RESOURCE_SEMAPHORE)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_67e2f532","line":61,"updated":"2018-10-10 04:52:46.000000000","message":"What is this meant to do?","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"709603e4fe144f0c7c29000dc4405ff30fb38156","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    @utils.synchronized(AGENT_RESOURCE_SEMAPHORE)"},{"line_number":65,"context_line":"    def update_usage(self, context):"},{"line_number":66,"context_line":"        \"\"\"Update the resource usage and stats after a change in an"},{"line_number":67,"context_line":"        instance"},{"line_number":68,"context_line":"        \"\"\""},{"line_number":69,"context_line":"        for device_type, device_type_driver in self.acc_type_drivers.\\"},{"line_number":70,"context_line":"                iteritems():"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_27339dc6","line":67,"updated":"2018-10-10 04:52:46.000000000","message":"\"After a change in an instance\"? I thought this would be periodic.","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"709603e4fe144f0c7c29000dc4405ff30fb38156","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                iteritems():"},{"line_number":71,"context_line":"            acc_list \u003d []"},{"line_number":72,"context_line":"            try:"},{"line_number":73,"context_line":"                vendors \u003d device_type_driver.discover_vendors()"},{"line_number":74,"context_line":"            # TODO(wangzhh): Remove this exception after add discover_vendors"},{"line_number":75,"context_line":"            # to spdk driver."},{"line_number":76,"context_line":"            except AttributeError as e:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_87b63125","line":73,"updated":"2018-10-10 04:52:46.000000000","message":"Why do we need to discover vendors and then drivers for that vendor? The operator would list the allowed drivers in cyborg.conf, the agent loads all of them using stevedore, and then polls each of them.\n\nAlso, as Sean said, it is better to load all the drivers early on, rather than create each of them for each poll.","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"f432d402db0dd302f4d8143f2d50d3b62395c286","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                iteritems():"},{"line_number":71,"context_line":"            acc_list \u003d []"},{"line_number":72,"context_line":"            try:"},{"line_number":73,"context_line":"                vendors \u003d device_type_driver.discover_vendors()"},{"line_number":74,"context_line":"            # TODO(wangzhh): Remove this exception after add discover_vendors"},{"line_number":75,"context_line":"            # to spdk driver."},{"line_number":76,"context_line":"            except AttributeError as e:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f79a3b5_0e1c5c75","line":73,"in_reply_to":"3f79a3b5_87b63125","updated":"2018-10-11 08:42:47.000000000","message":"Do we need to let operator config allowed driver list? I think we can load all the drivers after start agent. Of course, we are discussing how to load them, it\u0027s another thing.\nIt\u0027s my mistake, I committed the wrong code. I lazy_load drivers here. Just once. As 8th commit. U can review it when I correct it.","commit_id":"64c9f04a28b14d7c6f30b3e10bf3c376e276685d"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"709642a048e700597b9d421a14a4588479a9366a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.acc_drivers \u003d []"},{"line_number":43,"context_line":"        self._initialize_acc_drivers()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _initialize_acc_drivers(self, enabled_drivers\u003d[]):"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        Load accelerator drivers."},{"line_number":48,"context_line":"        :return: [nvidia_gpu_driver_obj, intel_fpga_driver_obj]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_9088251a","line":45,"range":{"start_line":45,"start_character":8,"end_line":45,"end_character":31},"updated":"2018-12-11 02:00:49.000000000","message":"Why not call it just _initialize_drivers?","commit_id":"73b9417bd95747a18af4882018affa8d8a81b40c"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"82798532703845a770eb4415174700f037ae275a","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        self.acc_drivers \u003d []"},{"line_number":43,"context_line":"        self._initialize_acc_drivers()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def _initialize_acc_drivers(self, enabled_drivers\u003d[]):"},{"line_number":46,"context_line":"        \"\"\""},{"line_number":47,"context_line":"        Load accelerator drivers."},{"line_number":48,"context_line":"        :return: [nvidia_gpu_driver_obj, intel_fpga_driver_obj]"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_304a71ad","line":45,"range":{"start_line":45,"start_character":8,"end_line":45,"end_character":31},"in_reply_to":"3f79a3b5_9088251a","updated":"2019-01-12 08:17:05.000000000","message":"I think there is no difference.","commit_id":"73b9417bd95747a18af4882018affa8d8a81b40c"},{"author":{"_account_id":25738,"name":"Xinran WANG","email":"xin-ran.wang@intel.com","username":"Xinran"},"change_message_id":"bdd9ea8122156dc8e90d2b9ef00fc54ae8890452","unresolved":false,"context_lines":[{"line_number":48,"context_line":"        :return: [nvidia_gpu_driver_obj, intel_fpga_driver_obj]"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        acc_drivers \u003d []"},{"line_number":51,"context_line":"        if not enabled_drivers:"},{"line_number":52,"context_line":"            enabled_drivers \u003d CONF.agent.enabled_drivers"},{"line_number":53,"context_line":"        for d in enabled_drivers:"},{"line_number":54,"context_line":"            acc_driver \u003d driver.DriverManager("}],"source_content_type":"text/x-python","patch_set":11,"id":"3f79a3b5_4102c10e","line":51,"range":{"start_line":51,"start_character":7,"end_line":51,"end_character":31},"updated":"2018-12-11 05:59:52.000000000","message":"if enabled_drivers mismatches with config file, there should be an exception thrown.","commit_id":"caf1afec79d6366bbafe66dfff36c1d7dd304b86"}],"cyborg/conf/agent.py":[{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"709642a048e700597b9d421a14a4588479a9366a","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                         title\u003d\u0027Options for the cyborg-agent service\u0027)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"API_OPTS \u003d (opts)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"def register_opts(conf):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_70aa296c","line":50,"range":{"start_line":50,"start_character":0,"end_line":50,"end_character":8},"updated":"2018-12-11 02:00:49.000000000","message":"These are not API options. Could we call them DRV_OPTS or something like that?","commit_id":"73b9417bd95747a18af4882018affa8d8a81b40c"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"fac6cd16e1f49401aa5d7eb28a366bcb83101465","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"opts \u003d ["},{"line_number":21,"context_line":"    cfg.ListOpt(\u0027enabled_drivers\u0027,"},{"line_number":22,"context_line":"                default\u003d[],"},{"line_number":23,"context_line":"                help\u003d_(\u0027The accelerator drivers enabled on this agent. Such \u0027"},{"line_number":24,"context_line":"                       \u0027as intel_fpga_driver, nvidia_gpu_driver, etc.\u0027)),"},{"line_number":25,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":12,"id":"dfd5e7cf_668d4630","line":22,"range":{"start_line":22,"start_character":24,"end_line":22,"end_character":26},"updated":"2019-01-10 04:47:34.000000000","message":"what\u0027s the behavior of default empty? \n\nThe agent auto detect and load the drivers？ \nOr do nothing?","commit_id":"ca225fc1bfb1df4e9241847b054e0d345c2708db"},{"author":{"_account_id":17813,"name":"wangzhh","email":"wzh_1993@126.com","username":"wangzhh"},"change_message_id":"82798532703845a770eb4415174700f037ae275a","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"opts \u003d ["},{"line_number":21,"context_line":"    cfg.ListOpt(\u0027enabled_drivers\u0027,"},{"line_number":22,"context_line":"                default\u003d[],"},{"line_number":23,"context_line":"                help\u003d_(\u0027The accelerator drivers enabled on this agent. Such \u0027"},{"line_number":24,"context_line":"                       \u0027as intel_fpga_driver, nvidia_gpu_driver, etc.\u0027)),"},{"line_number":25,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":12,"id":"bfdaf3ff_8f5c354c","line":22,"range":{"start_line":22,"start_character":24,"end_line":22,"end_character":26},"in_reply_to":"dfd5e7cf_668d4630","updated":"2019-01-12 08:17:05.000000000","message":"Do nothing.","commit_id":"ca225fc1bfb1df4e9241847b054e0d345c2708db"}],"cyborg/tests/unit/agent/test_resource_tracker.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"0c4ec924f00517eba20819bb0dda63a2d4d72fb4","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        # has stored into DB by conductor correctly?"},{"line_number":59,"context_line":"        pass"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def test_get_fpga_devices(self):"},{"line_number":62,"context_line":"        expect \u003d {"},{"line_number":63,"context_line":"            \u00270000:5e:00.0\u0027: {"},{"line_number":64,"context_line":"                \u0027function\u0027: \u0027pf\u0027, \u0027assignable\u0027: False, \u0027pr_num\u0027: \u00271\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_2df657fb","side":"PARENT","line":61,"range":{"start_line":61,"start_character":4,"end_line":61,"end_character":36},"updated":"2018-08-30 06:33:37.000000000","message":"removing this is ok but you should provide new unittest in this patch to vailidate the new logic for loading drivers via stevador in _initialize_acc_type_drivers and also the changes to update_usage.","commit_id":"3ca009ecf53090ad785f1482d38d5be26fb60259"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"09cdc0838ec4bf75cb73e01ab4ebe9cdf521d170","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        pass"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def test_load_vendor_driver(self):"},{"line_number":48,"context_line":"        vendor_driver \u003d self.rt._load_vendor_driver(\u0027fpga\u0027, \u00270x8086\u0027)"},{"line_number":49,"context_line":"        self.assertEqual(VENDOR_DRIVERS[\"fpga\"][\u00270x8086\u0027], vendor_driver)"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def initialize_acc_type_drivers(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3f79a3b5_0472297d","line":48,"range":{"start_line":48,"start_character":8,"end_line":48,"end_character":69},"updated":"2018-08-31 16:41:33.000000000","message":"this  is going to have several sideffects such as caching the driver instance that will outlive the livetime of the test.\n\nsince the tests can be executed concurently and out of order\nwe proably want to mock VENDOR_DRIVERS in this case so that we dont get race between the tests.","commit_id":"cb7253752d9d3468309d11bf8bb90ddf42bebb9e"}]}
