Skip to content

Commit

Permalink
Merge branch 'main' into cli_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
cms21 authored Oct 31, 2023
2 parents 3eb21c8 + 125b4b1 commit e6f2105
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion balsam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from balsam.util import config_root_logger

__version__ = "0.7.0.a22"
__version__ = "0.7.0.a23"
config_root_logger()
2 changes: 1 addition & 1 deletion balsam/_api/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def __repr__(self) -> str:

def __str__(self) -> str:
d = self.display_dict()
return yaml.dump(d, sort_keys=False, indent=4)
return str(yaml.dump(d, sort_keys=False, indent=4))

def __eq__(self, other: Any) -> bool:
if not isinstance(other, BalsamModel):
Expand Down
10 changes: 5 additions & 5 deletions balsam/_api/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file was auto-generated via /home/turam/miniconda3/bin/python balsam/schemas/api_generator.py
# [git rev 7634992]
# This file was auto-generated via /Users/turam/opt/miniconda3/bin/python balsam/schemas/api_generator.py
# [git rev 5034973]
# Do *not* make changes to the API by changing this file!

import datetime
Expand Down Expand Up @@ -765,7 +765,7 @@ class BatchJob(balsam._api.bases.BatchJobBase):
job_mode = Field[balsam.schemas.batchjob.JobMode]()
optional_params = Field[typing.Dict[str, str]]()
filter_tags = Field[typing.Dict[str, str]]()
partitions = Field[Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]]]()
partitions = Field[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]]()
site_id = Field[int]()
project = Field[str]()
queue = Field[str]()
Expand All @@ -786,7 +786,7 @@ def __init__(
queue: str,
optional_params: Optional[typing.Dict[str, str]] = None,
filter_tags: Optional[typing.Dict[str, str]] = None,
partitions: Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]] = None,
partitions: Optional[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]] = None,
**kwargs: Any,
) -> None:
"""
Expand Down Expand Up @@ -918,7 +918,7 @@ def create(
queue: str,
optional_params: Optional[typing.Dict[str, str]] = None,
filter_tags: Optional[typing.Dict[str, str]] = None,
partitions: Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]] = None,
partitions: Optional[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]] = None,
) -> BatchJob:
"""
Create a new BatchJob object and save it to the API in one step.
Expand Down
10 changes: 6 additions & 4 deletions balsam/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,12 @@ def save(self, path: Union[str, Path]) -> None:
fp.write(self.dump_yaml())

def dump_yaml(self) -> str:
return yaml.dump(
json.loads(self.json()),
sort_keys=False,
indent=4,
return str(
yaml.dump(
json.loads(self.json()),
sort_keys=False,
indent=4,
)
)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion balsam/config/defaults/alcf_thetagpu/job-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#COBALT -n {{ num_nodes }}
#COBALT -q {{ queue }}
#COBALT -t {{ wall_time_min }}
#COBALT --attrs pubnet=true:enable_ssh=1:filesystems=home,grand,eagle,theta-fs0:{% if optional_params.get("mig_count") %}mig-mode=true{% endif %}
#COBALT --attrs pubnet=true:enable_ssh=1:filesystems=home,grand,eagle,theta-fs0{% if optional_params.get("mig_count") %}:mig-mode=true{% endif %}

export https_proxy=http://theta-proxy.tmi.alcf.anl.gov:3128

Expand Down
2 changes: 2 additions & 0 deletions requirements/deploy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ alembic==1.8.1
SQLAlchemy==1.4.41
aredis==1.1.8
redis==4.3.4
starlette==0.19.1
anyio==3.7.1

# Duplicated from setup.cfg (but pinned)
PyYAML==6.0
Expand Down

0 comments on commit e6f2105

Please sign in to comment.