Skip to content

Commit

Permalink
[fix] Resolve issues with PR checks
Browse files Browse the repository at this point in the history
  • Loading branch information
mihran113 committed Dec 16, 2024
1 parent 9124e64 commit ac641de
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.7'
python-version: '3.8'
architecture: x64

- name: install deps
Expand Down
5 changes: 3 additions & 2 deletions aim/sdk/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,11 @@ def track(

# artifacts logging API
@property
def artifacts_uri(self) -> str:
def artifacts_uri(self) -> Optional[str]:
if self._run_artifacts_uri is None:
base_uri = self.meta_run_tree.get('artifacts_uri', None)
if base_uri is None: return None
if base_uri is None:
return None
self._run_artifacts_uri = os.path.join(base_uri, self.hash)
return self._run_artifacts_uri

Expand Down
6 changes: 5 additions & 1 deletion aim/storage/artifacts/s3_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,19 @@ def _get_s3_client(self):
def S3ArtifactStorage_factory(**boto3_client_kwargs: dict):
class S3ArtifactStorageCustom(S3ArtifactStorage):
def _get_s3_client(self):
import boto3, botocore
import boto3
import botocore

if 'config' in boto3_client_kwargs and isinstance(boto3_client_kwargs['config'], dict):
config_kwargs = boto3_client_kwargs.pop('config')
boto3_client_kwargs['config'] = botocore.config.Config(**config_kwargs)
client = boto3.client('s3', **boto3_client_kwargs)
return client

return S3ArtifactStorageCustom


def S3ArtifactStorage_clientconfig(**boto3_client_kwargs: dict):
from aim.storage.artifacts import registry

registry.registry['s3'] = S3ArtifactStorage_factory(**boto3_client_kwargs)

0 comments on commit ac641de

Please sign in to comment.