Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: price prediction for suppliers #1594

Merged
merged 3 commits into from
Oct 5, 2018

Conversation

3Hren
Copy link
Member

@3Hren 3Hren commented Oct 4, 2018

Node service is now capable to obtain an approximate predicted price for devices configuration, i.e. implements price prediction for suppliers.

An example of devices.json:

{
  "Devices": {
    "CPU": {
      "device": {
        "modelName": "Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz",
        "cores": 4,
        "sockets": 4
      },
      "benchmarks": {
        "0": {
          "type": 1,
          "result": 5686,
          "splittingAlgorithm": 1
        },
        "1": {
          "ID": 1,
          "type": 1,
          "result": 1507
        },
        "12": {
          "ID": 12,
          "type": 1,
          "result": 123,
          "splittingAlgorithm": 1
        },
        "2": {
          "ID": 2,
          "code": "cpu-cores",
          "type": 1,
          "result": 4
        }
      }
    },
    "GPUs": [
      {
        "device": {
          "ID": "0000:01:00.0",
          "vendorID": 4318,
          "vendorName": "Nvidia",
          "deviceID": 6918,
          "deviceName": "GeForce GTX 1080 Ti",
          "majorNumber": 226,
          "Memory": 11717836800,
          "hash": "3ade47f4970cc04f74ab63c4c3c1d5a4"
        },
        "benchmarks": {
          "10": {
            "ID": 10,
            "type": 2,
            "result": 692,
            "splittingAlgorithm": 1
          },
          "11": {
            "ID": 11,
            "type": 2,
            "splittingAlgorithm": 1
          },
          "7": {
            "ID": 7,
            "type": 2,
            "result": 1,
            "splittingAlgorithm": 1
          },
          "8": {
            "ID": 8,
            "type": 2,
            "result": 11717836800,
            "splittingAlgorithm": 2
          },
          "9": {
            "ID": 9,
            "type": 2,
            "result": 32443000,
            "splittingAlgorithm": 1
          }
        }
      },
      {
        "device": {
          "ID": "0000:02:00.0",
          "vendorID": 4318,
          "vendorName": "Nvidia",
          "deviceID": 7041,
          "deviceName": "GeForce GTX 1070",
          "majorNumber": 226,
          "minorNumber": 1,
          "Memory": 8513388544,
          "hash": "739a371e55fa7799ab5d1ea523e7c3e8"
        },
        "benchmarks": {
          "10": {
            "ID": 10,
            "type": 2,
            "result": 424,
            "splittingAlgorithm": 1
          },
          "11": {
            "ID": 11,
            "type": 2,
            "splittingAlgorithm": 1
          },
          "7": {
            "ID": 7,
            "type": 2,
            "result": 1,
            "splittingAlgorithm": 1
          },
          "8": {
            "ID": 8,
            "type": 2,
            "result": 8513388544,
            "splittingAlgorithm": 2
          },
          "9": {
            "ID": 9,
            "type": 2,
            "result": 26658000,
            "splittingAlgorithm": 1
          }
        }
      }
    ],
    "RAM": {
      "device": {
        "total": 16747761664,
        "available": 16747761664
      },
      "benchmarks": {
        "3": {
          "ID": 3,
          "type": 3,
          "result": 16747761664,
          "splittingAlgorithm": 1
        }
      }
    },
    "network": {
      "in": 91211150,
      "out": 82288156,
      "netFlags": {
        "flags": 3
      },
      "benchmarksIn": {
        "5": {
          "ID": 5,
          "type": 5,
          "result": 91211150,
          "splittingAlgorithm": 1
        }
      },
      "benchmarksOut": {
        "6": {
          "ID": 6,
          "type": 6,
          "result": 82288156,
          "splittingAlgorithm": 1
        }
      }
    },
    "storage": {
      "device": {
        "bytesAvailable": 218908954624
      },
      "benchmarks": {
        "4": {
          "ID": 4,
          "code": "storage-size",
          "type": 4,
          "result": 218908954624,
          "splittingAlgorithm": 1
        }
      }
    }
  }
}

@3Hren 3Hren added S: Node This PR/Issue changes Node T: WIP This PR/Issue still in progress T: feature This PR/Issue adds a new feature P: HIGH This PR/Issue has the high priority V: minor This PR/Issue required minor version to be bumped labels Oct 4, 2018
@@ -701,7 +701,7 @@ func (m *server) processHandshake(ctx context.Context, conn net.Conn, handshake
defer deleter()

select {
case <-timer.C:
case <-timer.C: // TODO SHIT!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@3Hren 3Hren force-pushed the feat/node/price-prediction-for-suppliers branch from 57b3d62 to f76f5ba Compare October 4, 2018 16:11
Optimization: OptimizationConfig{
Model: optimizationMethodFactory{
OptimizationMethodFactory: &defaultOptimizationMethodFactory{},
//OptimizationMethodFactory: &GreedyLinearRegressionModelFactory{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💩

nikonov1101
nikonov1101 previously approved these changes Oct 4, 2018
Node service is now capable to obtain an approximate predicted price for devices configuration, i.e. implements price prediction for suppliers.
@3Hren 3Hren force-pushed the feat/node/price-prediction-for-suppliers branch from 817d152 to cd6c10d Compare October 5, 2018 10:25
@3Hren 3Hren removed the T: WIP This PR/Issue still in progress label Oct 5, 2018
@3Hren 3Hren merged commit 1292f0b into master Oct 5, 2018
@3Hren 3Hren deleted the feat/node/price-prediction-for-suppliers branch October 5, 2018 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: HIGH This PR/Issue has the high priority S: Node This PR/Issue changes Node T: feature This PR/Issue adds a new feature V: minor This PR/Issue required minor version to be bumped
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants