Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdalpino committed Oct 26, 2020
1 parent 430e7d7 commit 7c99cd9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 121 deletions.
120 changes: 0 additions & 120 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,16 @@ $ composer require rubix/server
- [Predict Sample](#predict-sample)
- [Proba](#proba)
- [Proba Sample](#proba-sample)
- [Query Model](#query-model)
- [Score](#score)
- [Score Sample](#score-sample)
- [Server Status](#server-status)
- [Responses](#responses)
- [Error Response](#error-response)
- [Predict Response](#predict-response)
- [Predict Sample Response](#predict-sample-response)
- [Proba Response](#proba-response)
- [Proba Sample Response](#proba-sample-response)
- [Query Model Response](#query-model-response)
- [Score Response](#score-response)
- [Score Sample Response](#score-sample-response)
- [Server Status Response](#server-status-response)

---
### Getting Started
Expand Down Expand Up @@ -414,24 +410,6 @@ use Rubix\Server\Commands\ProbaSample;
$command = new ProbaSample($sample);
```

### Query Model
Query the status of the current model being served.

**Parameters:**

This command does not have any parameters.

**Additional Methods:**

This command does not have any additional methods.

**Example:**
```php
use Rubix\Server\Commands\QueryModel;

$command = new QueryModel();
```

### Score
Score the unknown samples in a dataset in terms of their anomaly score.

Expand Down Expand Up @@ -485,25 +463,6 @@ use Rubix\Server\Commands\ScoreSample;
$command = new ScoreSample($sample);
```

### Server Status
Return statistics regarding the server status such as uptime, requests per minute, and memory usage.

**Parameters:**

This command does not have any parameters.

**Additional Methods:**

This command does not have any additional methods.

**Example:**

```php
use Rubix\Server\Commands\ServerStatus;

$command = new ServerStatus();
```

### Responses
Response objects are returned as a result of a [Command](#commands). They contain the data being sent back from the server.

Expand Down Expand Up @@ -635,49 +594,6 @@ use Rubix\Server\Responses\ProbaSampleResponse;
$response = new ProbaSampleResponse($probabilities);
```

### Query Model Response
This response contains the properties of the underlying estimator instance being served such as type and compatibility.

**Parameters:**

| # | Param | Default | Type | Description |
|--|--|--|--|--|
| 1 | type | | int | The estimator type i.e. classifier, regressor, etc. |
| 2 | compatibility | | array | The data types that the estimator is compatible with. |
| 3 | probabilistic | | bool | Is the model probabilistic? |
| 4 | ranking | | bool | Is the model a ranking estimator? |

**Additional Methods:**

Return the type of estimator:
```php
public type() : string
```

Return the data types the estimator is compatible with:
```php
public compatibility() : array
```

Is the model probabilistic?
```php
public probabilistic() : bool
```

Is the model a ranking estimator?
```php
public ranking() : bool
```

**Example:**

```php
use Rubix\Server\Responses\QueryModelResponse;
use Rubix\ML\Other\Helpers\DataType;

$response = new QueryModelResponse('classifier', [DataType::CONTINUOUS], true, false);
```

### Score Response
Return the anaomaly scores from a Score command.

Expand Down Expand Up @@ -730,42 +646,6 @@ use Rubix\Server\Responses\ScoreSampleResponse;
$response = new ScoreSampleResponse($score);
```

### Server Status Response
A response containing the status of the currently running server.

**Parameters:**

| # | Param | Default | Type | Description |
|--|--|--|--|--|
| 1 | requests | | array | An associative array of request statistics. |
| 2 | memory usage | | array | An associative array of memory usage statistics. |
| 3 | uptime | | int | The number of seconds the server has been up. |

**Additional Methods:**

Return the request statistics:
```php
public requests() : array
```

Return the memory usage statistics:
```php
public memoryUsage() : array
```

Return the uptime of the server.
```php
public uptime() : int
```

**Example:**

```php
use Rubix\Server\Responses\ServerStatusResponse;

$response = new ServerStatusResponse($requests, $memoryUsage, 16);
```

## Testing
Rubix utilizes a combination of static analysis and unit tests for quality assurance and to reduce the number of bugs. Rubix provides three [Composer](https://getcomposer.org/) scripts that can be run from the root directory to automate the testing process.

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Although we take measures to build secure-by-default software, sometimes, we may miss something that leads to a security hole. If you find such a vulnerability within our software we kindly ask that you report it to us so that we can fix the issue in a timely and private manner.

## Reporting a Vulnerability
Please report any security vulnerabilities to [email protected]. In your message please include a brief description of the vulnerabiility as well as the conditions and steps necessary to reproduce the exploit. You should receive a response within 1 - 2 business days.
Please report any security vulnerabilities to [email protected]. In your message please include a brief description of the vulnerability as well as the conditions and steps necessary to reproduce the exploit. You should receive a response within 1 - 2 business days.
1 change: 1 addition & 0 deletions src/Http/Middleware/BasicAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use InvalidArgumentException;

use function is_string;
use function strlen;

use const Rubix\Server\Http\UNAUTHORIZED;

Expand Down

0 comments on commit 7c99cd9

Please sign in to comment.