-
Notifications
You must be signed in to change notification settings - Fork 424
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
Add precision inherition for when generating stream clone #911
Add precision inherition for when generating stream clone #911
Conversation
hls4ml/__init__.py
Outdated
@@ -22,3 +22,8 @@ def reseed(newseed): | |||
torch.manual_seed(newseed) | |||
except ImportError: | |||
print('\nPyTorch seed not set') | |||
seed = 42 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is leftover code from testing
hls4ml/__init__.py
Outdated
@@ -22,3 +24,5 @@ def reseed(newseed): | |||
torch.manual_seed(newseed) | |||
except ImportError: | |||
print('\nPyTorch seed not set') | |||
|
|||
os.environ['RANDOM_SEED'] = f'{newseed}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to set the environment variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I have been using these lines since a while ago, but it seems they are not doing anything, at least with recent versions of tensorflows.
A# Description
Based on #906
When creating cloned streams, use the precision of the stream being cloned. Currently, the precision is
model_default
without any special tweak.Type of change
Tests
test/pytest/test_stream_clone.py
Merged with tests from #906.
Checklist
pre-commit
on the files I edited or added.