Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Alphafold3
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RC Data Science
community-containers
Alphafold3
Commits
83c4be2e
Commit
83c4be2e
authored
7 months ago
by
Augustin Zidek
Browse files
Options
Downloads
Patches
Plain Diff
Don't print whole param payload if it is corrupt
PiperOrigin-RevId: 697635175
parent
4b2b5671
No related branches found
No related tags found
1 merge request
!1
Cloned AlphaFold 3 repo into this one
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/alphafold3/model/params.py
+2
-2
2 additions, 2 deletions
src/alphafold3/model/params.py
with
2 additions
and
2 deletions
src/alphafold3/model/params.py
+
2
−
2
View file @
83c4be2e
...
...
@@ -57,7 +57,7 @@ def _read_record(stream: IO[bytes]) -> tuple[str, str, np.ndarray] | None:
if
not
header
:
return
None
if
len
(
header
)
<
header_size
:
raise
RecordError
(
f
'
Incomplete header:
{
header
}
'
)
raise
RecordError
(
f
'
Incomplete header:
{
len
(
header
)
=
}
<
{
header_size
=
}
'
)
(
scope_len
,
name_len
,
dtype_len
,
shape_len
,
arr_buffer_len
)
=
struct
.
unpack
(
'
<5i
'
,
header
)
...
...
@@ -65,7 +65,7 @@ def _read_record(stream: IO[bytes]) -> tuple[str, str, np.ndarray] | None:
payload_size
=
struct
.
calcsize
(
fmt
)
+
arr_buffer_len
payload
=
stream
.
read
(
payload_size
)
if
len
(
payload
)
<
payload_size
:
raise
RecordError
(
f
'
Incomplete payload:
{
payload
}
'
)
raise
RecordError
(
f
'
Incomplete payload:
{
len
(
payload
)
=
}
<
{
payload_size
=
}
'
)
scope
,
name
,
dtype
,
*
shape
=
struct
.
unpack_from
(
fmt
,
payload
)
scope
=
scope
.
decode
(
'
utf-8
'
)
name
=
name
.
decode
(
'
utf-8
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment