Skip to content

Commit

Permalink
Fix scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jmsmkn committed Oct 15, 2024
1 parent b884d5a commit 23abda6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions scripts/component_interface_value_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def _create_civ_rich_algorithm_job(creator, interfaces):
algorithm_image=ai,
status=Evaluation.SUCCESS,
time_limit=ai.algorithm.time_limit,
requires_gpu_type=ai.requires_gpu_type,
requires_memory_gb=ai.requires_memory_gb,
requires_gpu_type=ai.algorithm.requires_gpu_type,
requires_memory_gb=ai.algorithm.requires_memory_gb,
)

chart_spec = {
Expand Down
4 changes: 2 additions & 2 deletions scripts/cost_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ def _create_submission(algorithm, challenge, archive_items):
completed_at=now(),
status=Job.SUCCESS,
time_limit=ai.algorithm.time_limit,
requires_gpu_type=ai.requires_gpu_type,
requires_memory_gb=ai.requires_memory_gb,
requires_gpu_type=ai.algorithm.requires_gpu_type,
requires_memory_gb=ai.algorithm.requires_memory_gb,
)
civ = ComponentInterfaceValue.objects.create(
interface=ComponentInterface.objects.get(slug="results-json-file"),
Expand Down
12 changes: 6 additions & 6 deletions scripts/development_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ def _create_demo_challenge(users, algorithm):
phase=phase,
creator=users["demop"],
algorithm_image=algorithm_image,
algorithm_requires_gpu_type=algorithm_image.requires_gpu_type,
algorithm_requires_memory_gb=algorithm_image.requires_memory_gb,
algorithm_requires_gpu_type=algorithm_image.algorithm.requires_gpu_type,
algorithm_requires_memory_gb=algorithm_image.algorithm.requires_memory_gb,
)
submission.save()

Expand All @@ -269,8 +269,8 @@ def _create_demo_challenge(users, algorithm):
method=method,
status=Evaluation.SUCCESS,
time_limit=submission.phase.evaluation_time_limit,
requires_gpu_type=method.requires_gpu_type,
requires_memory_gb=method.requires_memory_gb,
requires_gpu_type=method.phase.requires_gpu_type,
requires_memory_gb=method.phase.requires_memory_gb,
)

def create_result(evaluation, result: dict):
Expand Down Expand Up @@ -383,8 +383,8 @@ def _create_algorithm_demo(users):
algorithm_image=algorithm_image,
status=Evaluation.SUCCESS,
time_limit=60,
requires_gpu_type=algorithm_image.requires_gpu_type,
requires_memory_gb=algorithm_image.requires_memory_gb,
requires_gpu_type=algorithm_image.algorithm.requires_gpu_type,
requires_memory_gb=algorithm_image.algorithm.requires_memory_gb,
)

algorithms_job.inputs.add(input_civ)
Expand Down
4 changes: 2 additions & 2 deletions scripts/pentest_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ def create_algorithm(
)
],
time_limit=algorithm_image.algorithm.time_limit,
requires_gpu_type=algorithm_image.requires_gpu_type,
requires_memory_gb=algorithm_image.requires_memory_gb,
requires_gpu_type=algorithm_image.algorithm.requires_gpu_type,
requires_memory_gb=algorithm_image.algorithm.requires_memory_gb,
)
on_commit(job.execute)

Expand Down

0 comments on commit 23abda6

Please sign in to comment.