Skip to content

Cannot download objectnet-1.0-beta test set #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vishaal27 opened this issue Aug 5, 2023 · 1 comment · Fixed by #12
Closed

Cannot download objectnet-1.0-beta test set #11

vishaal27 opened this issue Aug 5, 2023 · 1 comment · Fixed by #12

Comments

@vishaal27
Copy link
Contributor

Hey, I am unable to download the objectnet test set -- is the server down for some reason?

@vishaal27
Copy link
Contributor Author

vishaal27 commented Aug 5, 2023

I was able to fix it with the google client instead of the default vasa one!

def key_exists(bucket, key):
    # Return true if a key exists in s3 bucket
    # TODO: return None from the get functions if the key doesn't exist?
    #       (this would avoid one round-trip to S3)
    client = get_s3_client_google()
    print(client._endpoint.host)
    try:
        client.head_object(Bucket=bucket, Key=key)
        return True
    except botocore.exceptions.ClientError as exc:
        if exc.response['Error']['Code'] != '404':
            raise
        return False
    except:
        raise

instead of

def key_exists(bucket, key):
    # Return true if a key exists in s3 bucket
    # TODO: return None from the get functions if the key doesn't exist?
    #       (this would avoid one round-trip to S3)
    client = get_s3_client()
    print(client._endpoint.host)
    try:
        client.head_object(Bucket=bucket, Key=key)
        return True
    except botocore.exceptions.ClientError as exc:
        if exc.response['Error']['Code'] != '404':
            raise
        return False
    except:
        raise

in src.mldb.s3_utils.py. This issue was helpful for this: #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant