Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 11, 2024
1 parent 97d9c5e commit d7cf539
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions neuro_config_client/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def create_node_pool_options(payload: dict[str, Any]) -> NodePoolOptions:
memory=payload["memory"],
available_memory=payload["available_memory"],
gpu=payload.get("gpu"),
gpu_model=payload.get("gpu_model")
gpu_model=payload.get("gpu_model"),
)

@classmethod
Expand Down Expand Up @@ -330,9 +330,7 @@ def create_idle_job(self, payload: dict[str, Any]) -> IdleJobConfig:

def create_resources(self, payload: dict[str, Any]) -> Resources:
return Resources(
cpu_m=payload["cpu_m"],
memory=payload["memory"],
gpu=payload.get("gpu", 0)
cpu_m=payload["cpu_m"], memory=payload["memory"], gpu=payload.get("gpu", 0)
)

def create_storage(self, payload: dict[str, Any]) -> StorageConfig:
Expand Down
6 changes: 3 additions & 3 deletions tests/test_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def test_create_resource_pool_type(
factory: EntityFactory,
nvidia_small_gpu: str,
amd_small_gpu: str,
intel_small_gpu: str
intel_small_gpu: str,
) -> None:
result = factory.create_resource_pool_type(
{
Expand Down Expand Up @@ -378,7 +378,7 @@ def test_create_resource_preset_custom(
factory: EntityFactory,
nvidia_small_gpu: str,
amd_small_gpu: str,
intel_small_gpu: str
intel_small_gpu: str,
) -> None:
result = factory.create_resource_preset(
{
Expand Down Expand Up @@ -1602,7 +1602,7 @@ def test_create_resource_pool_type(
factory: PayloadFactory,
nvidia_small_gpu: str,
amd_small_gpu: str,
intel_small_gpu: str
intel_small_gpu: str,
) -> None:
result = factory.create_resource_pool_type(
ResourcePoolType(
Expand Down

0 comments on commit d7cf539

Please sign in to comment.