Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
experiment-impact-tracker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Labooratory AI
experiment-impact-tracker
Commits
d20e55e6
Commit
d20e55e6
authored
Aug 16, 2020
by
Peter Henderson
Browse files
Options
Downloads
Patches
Plain Diff
Add many run example
parent
7e4bc510
No related branches found
No related tags found
Loading
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_context.py
+21
-1
21 additions, 1 deletion
test/test_context.py
with
21 additions
and
1 deletion
test/test_context.py
+
21
−
1
View file @
d20e55e6
...
@@ -23,7 +23,7 @@ def _helper_function():
...
@@ -23,7 +23,7 @@ def _helper_function():
w2
=
torch
.
randn
(
H
,
D_out
,
device
=
device
)
w2
=
torch
.
randn
(
H
,
D_out
,
device
=
device
)
learning_rate
=
1e-6
learning_rate
=
1e-6
for
t
in
range
(
10
0
):
for
t
in
range
(
5
0
):
# Forward pass: compute predicted y
# Forward pass: compute predicted y
h
=
x
.
mm
(
w1
)
h
=
x
.
mm
(
w1
)
h_relu
=
h
.
clamp
(
min
=
0
)
h_relu
=
h
.
clamp
(
min
=
0
)
...
@@ -70,3 +70,23 @@ def test_two_contexts():
...
@@ -70,3 +70,23 @@ def test_two_contexts():
data_interface1
.
total_power
+
data_interface2
.
total_power
data_interface1
.
total_power
+
data_interface2
.
total_power
==
data_interface_both
.
total_power
==
data_interface_both
.
total_power
)
)
def
test_many_contexts
():
"""
Meant to check if we run into any OSError for too many file handles open at once
See https://github.com/Breakend/experiment-impact-tracker/issues/5
:return:
"""
files
=
[]
for
i
in
range
(
10
):
fname
=
tempfile
.
mkdtemp
()
files
.
append
(
fname
)
with
ImpactTracker
(
fname
):
_helper_function
()
DataInterface
(
files
)
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