Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
if request.source is not None and request.index is not None:
source = request.source
layer_num = get_layer_num_from_sae_id(source)
index = int(request.index)
index = request.index

Check warning on line 55 in apps/inference/neuronpedia_inference/endpoints/activation/single.py

View check run for this annotation

Codecov / codecov/patch

apps/inference/neuronpedia_inference/endpoints/activation/single.py#L55

Added line #L55 was not covered by tests

sae = sae_manager.get_sae(source)

Expand Down
291 changes: 68 additions & 223 deletions apps/inference/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/webapp/lib/utils/inference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export const getActivationForFeature = async (
prompt: defaultTestText,
model: transformerLensModelId,
source: feature.layer,
index: feature.index,
index: Number(feature.index),
},
})
.then((result: ActivationSinglePost200Response) => {
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"mjml": "^5.0.0-alpha.6",
"ms": "^2.1.3",
"neuronpedia-autointerp-client": "^1.0.0",
"neuronpedia-inference-client": "^1.2.0",
"neuronpedia-inference-client": "^2.0.0",
"next": "^14.2.23",
"next-auth": "^4.22.1",
"next-mdx-remote": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/python/neuronpedia-inference-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.1.0
- Package version: 1.2.0
- Package version: 2.0.0
- Generator version: 7.12.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Name | Type | Description | Notes
**prompt** | **str** | Input text prompt to get activations for |
**model** | **str** | Name of the model to test activations on |
**source** | **str** | Source identifier - could be an SAE ID (eg 5-gemmascope-res-16k). Must be specified with \"index\", or not at all. | [optional]
**index** | **str** | Index of the SAE. Must be specified with \"source\", or not at all. | [optional]
**index** | **int** | Index of the SAE. Must be specified with \"source\", or not at all. | [optional]
**vector** | **List[float]** | Custom vector to test activations. Must be specified with \"hook\". | [optional]
**hook** | **str** | Hook that the custom vector applies to. Must be specified with \"vector\". | [optional]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "1.2.0"
__version__ = "2.0.0"

# import apis into sdk package
from neuronpedia_inference_client.api.default_api import DefaultApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/1.2.0/python'
self.user_agent = 'OpenAPI-Generator/2.0.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ def to_debug_report(self) -> str:
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.1.0\n"\
"SDK Package Version: 1.2.0".\
"SDK Package Version: 2.0.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ActivationSinglePostRequest(BaseModel):
prompt: StrictStr = Field(description="Input text prompt to get activations for")
model: StrictStr = Field(description="Name of the model to test activations on")
source: Optional[StrictStr] = Field(default=None, description="Source identifier - could be an SAE ID (eg 5-gemmascope-res-16k). Must be specified with \"index\", or not at all.")
index: Optional[StrictStr] = Field(default=None, description="Index of the SAE. Must be specified with \"source\", or not at all.")
index: Optional[StrictInt] = Field(default=None, description="Index of the SAE. Must be specified with \"source\", or not at all.")
vector: Optional[List[Union[StrictFloat, StrictInt]]] = Field(default=None, description="Custom vector to test activations. Must be specified with \"hook\".")
hook: Optional[StrictStr] = Field(default=None, description="Hook that the custom vector applies to. Must be specified with \"vector\".")
__properties: ClassVar[List[str]] = ["prompt", "model", "source", "index", "vector", "hook"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "neuronpedia_inference_client"
version = "1.2.0"
version = "2.0.0"
description = "Neuronpedia - Inference Server"
authors = ["OpenAPI Generator Community <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion packages/python/neuronpedia-inference-client/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "neuronpedia-inference-client"
VERSION = "1.2.0"
VERSION = "2.0.0"
PYTHON_REQUIRES = ">= 3.8"
REQUIRES = [
"urllib3 >= 1.25.3, < 3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def make_instance(self, include_optional) -> ActivationSinglePostRequest:
prompt = '',
model = '',
source = '',
index = '',
index = 56,
vector = [
1.337
],
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript/neuronpedia-inference-client/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## neuronpedia-inference-client@1.2.0
## neuronpedia-inference-client@2.0.0

This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:

Expand Down Expand Up @@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
_published:_

```
npm install neuronpedia-inference-client@1.2.0 --save
npm install neuronpedia-inference-client@2.0.0 --save
```

_unPublished (not recommended):_
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "neuronpedia-inference-client",
"version": "1.2.0",
"version": "2.0.0",
"description": "OpenAPI client for neuronpedia-inference-client",
"author": "OpenAPI-Generator",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ export interface ActivationSinglePostRequest {
source?: string;
/**
* Index of the SAE. Must be specified with "source", or not at all.
* @type {string}
* @type {number}
* @memberof ActivationSinglePostRequest
*/
index?: string;
index?: number;
/**
* Custom vector to test activations. Must be specified with "hook".
* @type {Array<number>}
Expand Down
2 changes: 1 addition & 1 deletion schemas/openapi/inference/paths/activation/single.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ post:
type: string
description: Source identifier - could be an SAE ID (eg 5-gemmascope-res-16k). Must be specified with "index", or not at all.
index:
type: string
type: integer
description: Index of the SAE. Must be specified with "source", or not at all.
vector:
type: array
Expand Down
Loading